@@ -130,14 +130,13 @@ class ViewController: UIViewController, UIScrollViewDelegate {
130130
131131 private lazy var segmentedControl5 : FWSegmentedControl = {
132132
133- let imageTitles5 = [ " 叶子 " , " " , " 叶紫 " ]
133+ let imageTitles5 = [ " 福建 " , " 直播 " , " 小视频 " , " 附近 " ]
134134
135135 let sectionSelectedImageDict = [
136- 0 : FWSectionImageItem ( itemImage: UIImage ( named: " a " ) !, itemSelectedImage: UIImage ( named: " a-selected " ) ) ,
137- 1 : FWSectionImageItem ( itemImage: UIImage ( named: " b " ) !, itemSelectedImage: UIImage ( named: " b-selected " ) ) ,
136+ 0 : FWSectionImageItem ( itemImage: UIImage ( named: " hm_hot_city " ) !, itemSelectedImage: UIImage ( named: " hm_hot_city_selected " ) ) ,
138137 ]
139138
140- let segmentedControl = FWSegmentedControl . segmentedWith ( scType: SCType . textImages, scWidthStyle: SCWidthStyle . dynamicFixedSuper , sectionTitleArray: imageTitles5, sectionSelectedImageDict: sectionSelectedImageDict, frame: CGRect ( x: 0 , y: Int ( self . segmentedControl4. frame. maxY) + 10 , width: Int ( UIScreen . main. bounds. width) , height: 40 ) )
139+ let segmentedControl = FWSegmentedControl . segmentedWith ( scType: SCType . textImages, scWidthStyle: SCWidthStyle . dynamic , sectionTitleArray: imageTitles5, sectionSelectedImageDict: sectionSelectedImageDict, frame: CGRect ( x: 0 , y: Int ( self . segmentedControl4. frame. maxY) + 10 , width: Int ( UIScreen . main. bounds. width) , height: 40 ) )
141140
142141 segmentedControl. scSelectionIndicatorStyle = . contentWidthStripe
143142 segmentedControl. scSelectionIndicatorLocation = . down
@@ -148,10 +147,6 @@ class ViewController: UIViewController, UIScrollViewDelegate {
148147 segmentedControl. selectionIndicatorHeight = 3
149148 segmentedControl. selectionIndicatorEdgeInsets = UIEdgeInsetsMake ( 0 , 5 , 0 , 5 ) ;
150149
151- segmentedControl. verticalDividerEnabled = true
152- segmentedControl. verticalDividerColor = UIColor . lightGray
153- segmentedControl. verticalDividerWidth = 1.0
154-
155150 segmentedControl. textImageSpacing = 4
156151
157152 segmentedControl. titleTextAttributes = [ NSAttributedStringKey . foregroundColor: UIColor . gray, NSAttributedStringKey . font : UIFont . systemFont ( ofSize: CGFloat ( kSegmentTitleFont) ) ]
0 commit comments