Comment on page
DocumentModel
A base class containing images for a scanned document
@objc public class DocumentModel : NSObject, Encodable {
@objc public var portraitImage: UIImage? { get }
@objc public var documentImage: UIImage? { get }
@objc public var croppedDocumentImage: UIImage? { get }
@objc public var portraitImagePath: String? { get }
@objc public var documentImagePath: String? { get }
@objc public var croppedDocumentImagePath: String? { get }
@objc public func saveImages()
public func encode(to encoder: Encoder) throws
}
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Name | Type | Description | Data source |
UIImage? | Front of document | ||
UIImage? | Contains an original image of the document. | Front of document | |
UIImage? | Front of document | ||
String? | Local storage | ||
String? | Local storage | ||
String? | Local storage |
Signature | Return Type | Description |
Void | Saves the portraitImage, documentImage and croppedDocumentImage and populates their respective path variables. | |
Void | Encodes the model using the encoder provided. Used to convert the model to JSON. |
@objc public var portraitImage: UIImage? { get }
@objc public var documentImage: UIImage? { get }
Contains an original image of the document.
@objc public var croppedDocumentImage: UIImage? { get }
@objc public var portraitImagePath: String? { get }
@objc public var documentImagePath: String? { get }
@objc public var croppedDocumentImagePath: String? { get }
@objc public func saveImages()
Saves the portraitImage, documentImage and croppedDocumentImage and populates their respective path variables.
public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Last modified 1yr ago