private lazy var pageTitleView: MFPageTitleView = {
let config = MFPageTitleViewConfig()
config.titleColor = colorWithRGB(r: 43, g: 43, b: 43)
config.titleSelectedColor = colorWithRGB(r: 211, g: 0, b: 0)
config.titleFont = UIFont.systemFont(ofSize: 14, weight: .regular)
config.indicatorColor = colorWithRGB(r: 211, g: 0, b: 0)
let pageTitleView = MFPageTitleView(frame: CGRect(x: 0, y: navHeight, width: SCREEN_WIDTH, height: 41), titles: ["推荐", "快讯", "深度", "试点对话", "行情分析"], config: config)
pageTitleView.pageTitleViewDelegate = self as? MFPageTitleViewDelegate
return pageTitleView
}()
private lazy var pageContentView: MFPageContentView = {
var childControllers = [UIViewController]()
for _ in 0..<5 {
let vc = UIViewController()
let red: CGFloat = CGFloat(arc4random() % 256)
swift 导航条分段+滑动效果 用第三方PageTitleView
最新推荐文章于 2024-05-24 09:49:33 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)