PTPDFLayerViewController


@interface PTPDFLayerViewController : UITableViewController <PTOverridable>

The PTPDFLayerViewController class displays a list of the document’s Optional Content Groups (OCGs), also known as layers.

The visibility of each layer can be toggled on or off using this control.

  • An array of PDF layers (Optional Content Groups) and their state (visibility) in the current context

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSArray<PTLayerInfo *> *_Nonnull flatLayers;

    Swift

    var flatLayers: [PTLayerInfo] { get }
  • Returns a new instance of a PTPDFLayerViewController.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:
        (nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)
  • An object that conforms to the PTPDFLayerViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTPDFLayerViewControllerDelegate> delegate;

    Swift

    weak var delegate: (any PTPDFLayerViewControllerDelegate)? { get set }
  • Whether OCG top layers and sublayers can be viewed and edited. When disabled, any sublayers will not be shown.

    The default value of this property is NO.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=areSublayersEnabled) BOOL sublayersEnabled;

    Swift

    var areSublayersEnabled: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;