AppDelegate+Appearance.swift 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // AppDelegate+Appearance.swift
  3. // SheeeeeeeeetExample
  4. //
  5. // Created by Daniel Saidi on 2018-10-08.
  6. // Copyright © 2018 Daniel Saidi. All rights reserved.
  7. //
  8. import UIKit
  9. import Sheeeeeeeeet
  10. extension AppDelegate {
  11. func applyAppearance() {
  12. let blue = UIColor(hex: 0x0FA2F5)
  13. let green = UIColor(hex: 0x81c03f)
  14. let pink = UIColor(hex: 0xec5f72)
  15. let purple = UIColor(hex: 0xd9007b)
  16. let red = UIColor(hex: 0xff3333)
  17. let robotoBlack = "Roboto-Black"
  18. let robotoMedium = "Roboto-Medium"
  19. let robotoRegular = "Roboto-Regular"
  20. let appearance = ActionSheetAppearance.standard
  21. // appearance.popover.width = 500
  22. appearance.item.font = UIFont(name: robotoRegular, size: 17)
  23. appearance.item.textColor = .darkText
  24. appearance.item.tintColor = .darkGray
  25. appearance.item.subtitleFont = UIFont(name: robotoRegular, size: 14)
  26. appearance.item.subtitleTextColor = blue
  27. // appearance.separatorColor = .red
  28. // appearance.itemsSeparatorColor = .blue
  29. // appearance.buttonsSeparatorColor = .green
  30. appearance.title.hideSeparator()
  31. appearance.title.font = UIFont(name: robotoMedium, size: 15)
  32. appearance.sectionTitle.hideSeparator()
  33. appearance.sectionTitle.font = UIFont(name: robotoMedium, size: 13)
  34. appearance.sectionTitle.height = 20
  35. appearance.sectionMargin.height = 20
  36. appearance.selectItem.selectedIcon = UIImage(named: "ic_checkmark")
  37. appearance.selectItem.selectedTintColor = blue
  38. appearance.selectItem.selectedTextColor = green
  39. appearance.selectItem.selectedIconTintColor = purple
  40. appearance.singleSelectItem.selectedIcon = UIImage(named: "ic_checkmark")
  41. appearance.singleSelectItem.selectedTintColor = green
  42. appearance.singleSelectItem.selectedTextColor = purple
  43. appearance.singleSelectItem.selectedIconTintColor = blue
  44. appearance.multiSelectItem.selectedIcon = UIImage(named: "ic_checkmark")
  45. appearance.multiSelectItem.selectedTintColor = purple
  46. appearance.multiSelectItem.selectedTextColor = blue
  47. appearance.multiSelectItem.selectedIconTintColor = green
  48. appearance.multiSelectToggleItem.hideSeparator()
  49. appearance.multiSelectToggleItem.font = UIFont(name: robotoMedium, size: 13)
  50. appearance.multiSelectToggleItem.selectAllTextColor = .lightGray
  51. appearance.multiSelectToggleItem.deselectAllTextColor = red
  52. appearance.linkItem.linkIcon = UIImage(named: "ic_arrow_right")
  53. appearance.okButton.textColor = .darkGray
  54. appearance.okButton.font = UIFont(name: robotoBlack, size: 17)
  55. appearance.dangerButton.textColor = pink
  56. appearance.dangerButton.font = UIFont(name: robotoMedium, size: 17)
  57. appearance.cancelButton.textColor = .lightGray
  58. appearance.cancelButton.font = UIFont(name: robotoMedium, size: 17)
  59. }
  60. }