ActionSheetOkButton.swift 764 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // ActionSheetOkButton.swift
  3. // Sheeeeeeeeet
  4. //
  5. // Created by Daniel Saidi on 2017-11-26.
  6. // Copyright © 2017 Daniel Saidi. All rights reserved.
  7. //
  8. /*
  9. OK buttons have no special behavior, but can be used when a
  10. user should apply action sheet changes by tapping an button.
  11. The value of an OK button is `ButtonType.ok`.
  12. */
  13. import UIKit
  14. open class ActionSheetOkButton: ActionSheetButton {
  15. // MARK: - Initialization
  16. public init(title: String) {
  17. super.init(title: title, type: .ok)
  18. }
  19. // MARK: - Functions
  20. open override func applyAppearance(_ appearance: ActionSheetAppearance) {
  21. self.appearance = customAppearance ?? ActionSheetOkButtonAppearance(copy: appearance.okButton)
  22. }
  23. }