优惠券swift版马甲包

MFPageTitleViewConfig.swift 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // MFPageTitleViewConfig.swift
  3. // MFPagingViewExample
  4. // GitHub: https://github.com/wwx1991/MFPagingView
  5. // Created by iOS on 2018/6/12.
  6. // Copyright © 2018年 GM. All rights reserved.
  7. //
  8. import UIKit
  9. let SCREEN_WIDTH = UIScreen.main.bounds.size.width
  10. let SCREEN_HEIGHT = UIScreen.main.bounds.size.height
  11. let navHeight: CGFloat = {
  12. let statusBarHeight = UIApplication.shared.statusBarFrame.height
  13. if statusBarHeight == 20.0 {
  14. return 64
  15. }else {
  16. return 88
  17. }
  18. }()
  19. func colorWithRGB(r: CGFloat, g: CGFloat, b: CGFloat) -> UIColor {
  20. return UIColor(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: 1)
  21. }
  22. class MFPageTitleViewConfig: NSObject {
  23. /** 是否显示底部分割线,默认为true */
  24. var showBottomSeparator: Bool = true
  25. /** 按钮之间的间距,默认为 20.0f */
  26. var spacingBetweenButtons: CGFloat = 20
  27. /** 标题文字字号大小,默认 15 号字体 */
  28. var titleFont: UIFont = UIFont.systemFont(ofSize: 15)
  29. /** 普通状态下标题按钮文字的颜色,默认为黑色 */
  30. var titleColor: UIColor = UIColor.black
  31. /** 选中状态下标题按钮文字的颜色,默认为红色 */
  32. var titleSelectedColor: UIColor = UIColor.red
  33. /** 指示器颜色,默认为红色 */
  34. var indicatorColor: UIColor = UIColor.red
  35. }