CPDFChoiceWidgetAnnotation Class Reference
| Inherits from | CPDFWidgetAnnotation : CPDFAnnotation : NSObject |
|---|---|
| Declared in | CPDFChoiceWidgetAnnotation.h |
Overview
A CPDFChoiceWidgetAnnotation object provides user interactivity on a page of a PDF document, in the form of pop-up menus and lists.
CPDFButtonWidgetAnnotation inherits general annotation behavior from the CPDFWidgetAnnotation class.
Note: Migration from previous versions: Use @c -initWithPage:document:listChoice: to create choice widget annotations, then call @c [CPDFPage updateAndAddAnnotation:] to attach them.
– initWithPage:document:listChoice:
Initializes a choice widget annotation with page, document and list choice flag.
- (nullable instancetype)initWithPage:(CPDFPage *)page document:(CPDFDocument *)document listChoice:(BOOL)isListChoiceParameters
page |
The page on which the annotation will reside. |
|---|---|
document |
The document that owns the page. |
isListChoice |
YES to create a list-box; NO for a combo-box. |
Discussion
Initializes a choice widget annotation with page, document and list choice flag.
Creates the engine object and binds it to the page. Call @c [CPDFPage updateAndAddAnnotation:] to finish registration.
Declared In
CPDFChoiceWidgetAnnotation.h
isListChoice
Returns a Boolean value indicating whether the widget annotation is a list.
@property (nonatomic, readonly) BOOL isListChoiceDiscussion
Returns a Boolean value indicating whether the widget annotation is a list.
There are two flavors of Choice widget annotations, lists and pop-up menus. These methods allow you to differentiate.
Declared In
CPDFChoiceWidgetAnnotation.h
items
Returns an array of CPDFChoiceWidgetItem that represent the items available in the list or pop-up menu of the choice widget annotation.
@property (nonatomic, strong) NSArray<CPDFChoiceWidgetItem*> *itemsDiscussion
Returns an array of CPDFChoiceWidgetItem that represent the items available in the list or pop-up menu of the choice widget annotation.
Declared In
CPDFChoiceWidgetAnnotation.h