OOMeetingConfirmHeaderView.swift 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // OOMeetingConfirmHeaderView.swift
  3. // o2app
  4. //
  5. // Created by 刘振兴 on 2018/1/22.
  6. // Copyright © 2018年 zone. All rights reserved.
  7. //
  8. import UIKit
  9. import BetterSegmentedControl
  10. protocol OOMeetingConfirmHeaderViewDelegate {
  11. func confirmHeaderView(_ segmentedControlIndex: Int)
  12. }
  13. class OOMeetingConfirmHeaderView: UIView {
  14. @IBOutlet weak var control1: BetterSegmentedControl!
  15. var delegate:OOMeetingConfirmHeaderViewDelegate?
  16. override func awakeFromNib() {
  17. control1.bounds = CGRect(x: 0, y: 0, width: kScreenW, height: 40)
  18. control1.segments = LabelSegment.segments(withTitles: ["收到的邀请","发出的邀请"])
  19. // control1.normalFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
  20. // control1.selectedFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
  21. // control1.titles = ["收到的邀请","发出的邀请"]
  22. //// control1.autoresizingMask = [.flexibleWidth,.flexibleHeight]
  23. // control1.titleFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
  24. // control1.selectedTitleFont = UIFont(name: "PingFangSC-Regular", size: 16.0)!
  25. }
  26. @IBAction func betterSegmentedControlClick(_ sender: BetterSegmentedControl) {
  27. guard let block = delegate else {
  28. return
  29. }
  30. block.confirmHeaderView(sender.index)
  31. }
  32. }