Last active
October 22, 2020 15:22
-
-
Save rorodriguez116/02c642fc4ef4a502346438bf13c352be to your computer and use it in GitHub Desktop.
AlertError and Photo struct declarations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct Photo: Identifiable, Equatable { | |
// The ID of the captured photo | |
public var id: String | |
// Data representation of the captured photo | |
public var originalData: Data | |
public init(id: String = UUID().uuidString, originalData: Data) { | |
self.id = id | |
self.originalData = originalData | |
} | |
} | |
public struct AlertError { | |
public var title: String = "" | |
public var message: String = "" | |
public var primaryButtonTitle = "Accept" | |
public var secondaryButtonTitle: String? | |
public var primaryAction: (() -> ())? | |
public var secondaryAction: (() -> ())? | |
public init(title: String = "", message: String = "", primaryButtonTitle: String = "Accept", secondaryButtonTitle: String? = nil, primaryAction: (() -> ())? = nil, secondaryAction: (() -> ())? = nil) { | |
self.title = title | |
self.message = message | |
self.primaryAction = primaryAction | |
self.primaryButtonTitle = primaryButtonTitle | |
self.secondaryAction = secondaryAction | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment