123456789101112131415161718192021222324252627282930313233 |
- //
- // OpenDetailTableViewHeaderView.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/3/28.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- @objc protocol WalletHeaderViewDelegate {
- func segmentDidClickedWithIndex(index: NSInteger)
- }
- class MyWalletTableViewHeaderView: UIView {
- weak open var delegate: WalletHeaderViewDelegate?
- var selectedIndex = 0
- @IBOutlet weak var lblName: UILabel!
- func initView(section: Int) {
- lblName.text = "收益详情"
- let sgment = XF_Segment.init(frame: CGRect.init(x: 0, y: 50, width: ScreenWidth, height: 50), titles: ["海付POS机", "海付传统POS", "海科传统POS(山东河南)", "快益刷传统POS"], selectedIndex: selectedIndex, defaultColor: CommonUntils.getUIColorFromRGB(rgbValue: 0x333333), selectedColor: CommonUntils.getUIColorFromRGB(rgbValue: 0x2094f5)) { [weak self](index) in
- self!.selectedIndex = index
- self!.delegate?.segmentDidClickedWithIndex(index: index)
- }
- self.addSubview(sgment)
- }
- }
|