         topScrollView.addSubview(slideView)
         
         if sliderStyle == .center {
-            let attr = [NSAttributedStringKey.font: UIFont.systemFont(ofSize: titleFontSize)]
+            let attr = [NSAttributedStringKey.font: titleFont]
             let rect = titles[0].size(withAttributes: attr)
             let x = (width - rect.width) * 0.5
             let v = UIView(frame: CGRect(x: x, y: 0, width: rect.width, height: slideHeight))

    /// 底部分割线高度
    var lineHeight: CGFloat = 1
    
    /// 标题按钮字体大小
    var titleFontSize: CGFloat = 17
    /// 标题按钮背景颜色（普通状态）
    var titleBackgroundColor = UIColor.white
    /// 标题按钮背景颜色（选中状态）

            btn.tag = i
            btn.setTitle(titles[i], for: .normal)
            btn.setTitleColor(titleNomalColor, for: .normal)
            btn.titleLabel?.font = titleFont
            btn.titleLabel?.textAlignment = .center
            btn.backgroundColor = titleBackgroundColor
            btn.addTarget(self, action: #selector(btnClick), for: .touchUpInside)
