PTDiffViewController

@interface PTDiffViewController : UIViewController

The PTDiffViewController class provides functionality to produce a document representing the visual difference between two documents. Instances of this class must be embedded inside a UINavigationController.

  • Initializes a new PTDiffViewController instance with two documents to compare.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocument:(nullable PTPDFDoc *)firstDocument
                              secondDocument:(nullable PTPDFDoc *)secondDocument;

    Swift

    convenience init(document firstDocument: PTPDFDoc?, secondDocument: PTPDFDoc?)

    Parameters

    firstDocument

    The first PTPDFDoc instance to compare.

    secondDocument

    The second PTPDFDoc instance to compare.

    Return Value

    an initialized PTDiffViewController.

  • Initializes a new PTDiffViewController instance with two documents to compare and their display color.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocument:(nullable PTPDFDoc *)firstDocument
                              secondDocument:(nullable PTPDFDoc *)secondDocument
                          firstDocumentColor:(nullable UIColor *)firstDocumentColor
                         secondDocumentColor:
                             (nullable UIColor *)secondDocumentColor;

    Swift

    init(document firstDocument: PTPDFDoc?, secondDocument: PTPDFDoc?, firstDocumentColor: UIColor?, secondDocumentColor: UIColor?)

    Parameters

    firstDocument

    The first PTPDFDoc instance to compare.

    secondDocument

    The second PTPDFDoc instance to compare.

    firstDocumentColor

    The display color for firstDocument.

    secondDocumentColor

    The display color for secondDocument.

    Return Value

    an initialized PTDiffViewController.

  • An object conforming to the PTdiffViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<PTDiffViewControllerDelegate>
        delegate;

    Swift

    weak var delegate: PTDiffViewControllerDelegate? { get set }
  • The first document to compare.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) PTPDFDoc *firstDocument;

    Swift

    var firstDocument: PTPDFDoc? { get set }
  • The second document to compare.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) PTPDFDoc *secondDocument;

    Swift

    var secondDocument: PTPDFDoc? { get set }
  • The display color to use for the first document.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIColor *firstDocumentColor;

    Swift

    var firstDocumentColor: UIColor? { get set }
  • The display color to use for the second document.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIColor *secondDocumentColor;

    Swift

    var secondDocumentColor: UIColor? { get set }
  • The blend mode used for comparing documents.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PTBlendMode blendMode;

    Swift

    var blendMode: PTBlendMode { get set }