PTDocumentTabItem


@interface PTDocumentTabItem : NSObject <NSSecureCoding>

A PTDocumentTabItem represents a document in a tabbed user interface, where the document is displayed in a PTDocumentBaseViewController subclass.

  • Initializes a newly created PTDocumentTabItem instance.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()

    Return Value

    an initialized PTDocumentTabItem instance

  • Returns an object initialized from data in a given unarchiver.

    Declaration

    Objective-C

    - (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;

    Swift

    init?(coder: NSCoder)

    Parameters

    coder

    An unarchiver object

    Return Value

    self, initialized using the data in decoder, or nil if the object could not be initialized

  • The original source URL of the document.

    For non-file URLs (eg. HTTP(S) scheme URLs) or documents that require conversion before being displayed, this property will be different from the documentURL property.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSURL *sourceURL;

    Swift

    var sourceURL: URL? { get set }
  • The file URL of the document displayed in the viewController.

    For non-file URLs (eg. HTTP(S) scheme URLs) or documents that require conversion before being displayed, this URL will be different from the sourceURL property.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSURL *documentURL;

    Swift

    var documentURL: URL? { get set }
  • The time and date that this tab was last accessed.

    The default value of this property is NSDate.distantPast until the tab item is accessed for the first time.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSDate *_Nonnull lastAccessedDate;

    Swift

    var lastAccessedDate: Date { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) __kindof PTDocumentBaseViewController *viewController

    Swift

    weak var viewController: PTDocumentBaseViewController? { get set }
  • The view to be displayed above any tabbed user interface when this tab item is selected.

    The default value of this property is nil.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIView *headerView;

    Swift

    var headerView: UIView? { get set }
  • Sets the view to be displayed above any tabbed user interface when this tab item is selected, optionally animating the change.

    Declaration

    Objective-C

    - (void)setHeaderView:(nullable UIView *)headerView animated:(BOOL)animated;

    Swift

    func setHeaderView(_ headerView: UIView?, animated: Bool)

    Parameters

    headerView

    the view to be displayed

    animated

    YES if the change should be animated, NO otherwise