No Description

AlertAction.swift 634B

1234567891011121314151617181920212223242526272829
  1. //
  2. // AlertAction.swift
  3. // PaiaiUIKit
  4. //
  5. // Created by ffib on 2019/1/22.
  6. // Copyright © 2019 yb. All rights reserved.
  7. //
  8. import Foundation
  9. public struct AlertAction {
  10. public enum Style {
  11. case `default`
  12. case cancel
  13. case custom(AlertItem)
  14. }
  15. public private(set) var title: String
  16. public private(set) var style: Style
  17. public private(set) var handler: ((AlertItem) -> Void)?
  18. public init(title: String, style: Style = .default,
  19. handler: ((AlertItem) -> Void)? = nil) {
  20. self.style = style
  21. self.title = title
  22. self.handler = handler
  23. }
  24. }