1.導(dǎo)入第三方文件
2.在頁面添加滾動(dòng)條
//頂部LinkView
private lazy var pageTitleView: MFPageTitleView = {
let config = MFPageTitleViewConfig()
let pageTitleView = MFPageTitleView(frame: CGRect(x: 0, y: navHeight, width: SCREEN_WIDTH, height: 41), titles: ["推薦","快訊","深度","實(shí)時(shí)對(duì)話","行情分析"], config: config)
pageTitleView.pageTitleViewDelegate = self as? MFPageTitleViewDelegate
return pageTitleView
}()
// 別忘了最后加載在視圖上:
self.view.addSubview(pageTitleView)