问题描述
我正在使用 HMSegmentedControl 创建细分,
为此,我在项目中安装了 cocopod 并且
我在情节提要中添加了视图并给出了一个类 HMSegmentedControl
和我的代码:
import UIKit
import HMSegmentedControl
class MyAppliedRequestsVC: UIViewController {
@IBOutlet weak var topContainerVIew: UIView!
@IBOutlet weak var segmentedController: HMSegmentedControl!
override func viewDidLoad() {
super.viewDidLoad()
segmentedController = HMSegmentedControl(sectionTitles: ["POPULAR","SPECIAL RECHARGE","TOP UP"])
// Do any additional setup after loading the view.
designSegmentedControl()
}
func designSegmentedControl(){
segmentedController?.selectionIndicatorLocation = .down
segmentedController?.selectionIndicatorColor = UIColor(red: 63/255,green: 191/255,blue: 255/255,alpha: 1.0)//UIColor.red//
segmentedController?.selectionIndicatorHeight = 2.5
//segmentedControl?.segmentWidthStyle = .dynamic
segmentedController?.titleTextAttributes = [
NSAttributedString.Key.foregroundColor : #colorLiteral(red: 0.1411764771,green: 0.3960784376,blue: 0.5647059083,alpha: 1),NSAttributedString.Key.font : UIFont.systemFont(ofSize: 15)
]
segmentedController?.selectedTitleTextAttributes = [
NSAttributedString.Key.foregroundColor : #colorLiteral(red: 0.4392156899,green: 0.01176470611,blue: 0.1921568662,NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15)
]
print("out index")
segmentedController?.indexChangeBlock = { index in
print(index)
}
我的视图段中的上述代码没有出现为什么?我哪里错了?请帮忙
Interface Builder 文件输出索引中的未知类 _TtC11AveryAndEve18HMSegmentedControl
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)