We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大神你好,求救,单独拿TYTabPageBar使用,为什么datasouce里的pagerTabBar(_ pagerTabBar: TYTabPagerBar, cellForItemAt index: Int) -> UICollectionViewCell & TYTabPagerBarCellProtocol 不走啊,只走了numberOfItemsInPagerTabBar,请问怎么回事 private let barTitles = ["xx", "xx", "xx"] private let pagerBar = TYTabPagerBar().then { $0.layout.barStyle = .progressBounceView $0.layout.cellWidth = Metric.cellWidth $0.layout.progressColor = Metric.pagerBarFontColorS $0.layout.progressWidth = Metric.progressWidth $0.layout.normalTextColor = Metric.pagerBarFontColorN $0.layout.selectedTextColor = Metric.pagerBarFontColorS $0.layout.progressHeight = Metric.progressHeight $0.backgroundColor = .white $0.layout.cellSpacing = 0 $0.layout.cellEdging = 0 $0.layout.normalTextFont = Metric.pagerBarFontSize $0.layout.selectedTextFont = Metric.pagerBarFontSize $0.height = Metric.pagerBarHeight $0.register(TYTabPagerBarCell.self, forCellWithReuseIdentifier: "TYTabPagerBarCell") }
override func viewDidLoad() { super.viewDidLoad() pagerBar.delegate = self pagerBar.dataSource = self navigationItem.titleView = pagerBar }
func numberOfItemsInPagerTabBar() -> Int { return 3 } func pagerTabBar(_ pagerTabBar: TYTabPagerBar, cellForItemAt index: Int) -> UICollectionViewCell & TYTabPagerBarCellProtocol { let cell = TYTabPagerBarCell.init() cell.titleLabel?.text = barTitles[index] return cell }
The text was updated successfully, but these errors were encountered:
reloadData 没
Sorry, something went wrong.
No branches or pull requests
大神你好,求救,单独拿TYTabPageBar使用,为什么datasouce里的pagerTabBar(_ pagerTabBar: TYTabPagerBar, cellForItemAt index: Int) -> UICollectionViewCell & TYTabPagerBarCellProtocol 不走啊,只走了numberOfItemsInPagerTabBar,请问怎么回事
private let barTitles = ["xx", "xx", "xx"]
private let pagerBar = TYTabPagerBar().then {
$0.layout.barStyle = .progressBounceView
$0.layout.cellWidth = Metric.cellWidth
$0.layout.progressColor = Metric.pagerBarFontColorS
$0.layout.progressWidth = Metric.progressWidth
$0.layout.normalTextColor = Metric.pagerBarFontColorN
$0.layout.selectedTextColor = Metric.pagerBarFontColorS
$0.layout.progressHeight = Metric.progressHeight
$0.backgroundColor = .white
$0.layout.cellSpacing = 0
$0.layout.cellEdging = 0
$0.layout.normalTextFont = Metric.pagerBarFontSize
$0.layout.selectedTextFont = Metric.pagerBarFontSize
$0.height = Metric.pagerBarHeight
$0.register(TYTabPagerBarCell.self, forCellWithReuseIdentifier: "TYTabPagerBarCell")
}
override func viewDidLoad() {
super.viewDidLoad()
pagerBar.delegate = self
pagerBar.dataSource = self
navigationItem.titleView = pagerBar
}
The text was updated successfully, but these errors were encountered: