@@ -204,12 +204,12 @@ settings.style.buttonBarLeftContentInset: CGFloat?
204
204
settings.style .buttonBarRightContentInset : CGFloat?
205
205
206
206
// selected bar view is created programmatically so it's important to set up the following 2 properties properly
207
- settings.style .selectedBarBackgroundColor = UIColor.blackColor ()
207
+ settings.style .selectedBarBackgroundColor = UIColor.black
208
208
settings.style .selectedBarHeight : CGFloat = 5
209
209
210
210
// each buttonBar item is a UICollectionView cell of type ButtonBarViewCell
211
211
settings.style .buttonBarItemBackgroundColor : UIColor?
212
- settings.style .buttonBarItemFont = UIFont.systemFontOfSize ( 18 )
212
+ settings.style .buttonBarItemFont = UIFont.systemFont ( ofSize : 18 )
213
213
// helps to determine the cell width, it represent the space before and after the title label
214
214
settings.style .buttonBarItemLeftRightMargin : CGFloat = 8
215
215
settings.style .buttonBarItemTitleColor : UIColor?
@@ -223,7 +223,7 @@ public var buttonBarHeight: CGFloat?
223
223
``` swift
224
224
override func viewDidLoad () {
225
225
self .settings .style .selectedBarHeight = 2
226
- self .settings .style .selectedBarBackgroundColor = UIColor.whiteColor ()
226
+ self .settings .style .selectedBarBackgroundColor = UIColor.white
227
227
228
228
super .viewDidLoad ()
229
229
}
@@ -245,17 +245,17 @@ changeCurrentIndexProgressive = { (oldCell: ButtonBarViewCell?, newCell: ButtonB
245
245
guard changeCurrentIndex == true else { return }
246
246
247
247
oldCell? .label .textColor = UIColor (white : 1 , alpha : 0.6 )
248
- newCell? .label .textColor = . whiteColor ()
248
+ newCell? .label .textColor = UIColor. white
249
249
250
250
if animated {
251
- UIView.animateWithDuration ( 0.1 , animations : { () -> Void in
252
- newCell? .transform = CGAffineTransformMakeScale ( 1.0 , 1.0 )
253
- oldCell? .transform = CGAffineTransformMakeScale ( 0.8 , 0.8 )
251
+ UIView.animate ( withDuration : 0.1 , animations : { () -> Void in
252
+ newCell? .transform = CGAffineTransform ( scaleX : 1.0 , y : 1.0 )
253
+ oldCell? .transform = CGAffineTransform ( scaleX : 0.8 , y : 0.8 )
254
254
})
255
255
}
256
256
else {
257
- newCell? .transform = CGAffineTransformMakeScale ( 1.0 , 1.0 )
258
- oldCell? .transform = CGAffineTransformMakeScale ( 0.8 , 0.8 )
257
+ newCell? .transform = CGAffineTransform ( scaleX : 1.0 , y : 1.0 )
258
+ oldCell? .transform = CGAffineTransform ( scaleX : 0.8 , y : 0.8 )
259
259
}
260
260
}
261
261
```
@@ -273,10 +273,10 @@ settings.style.barHeight: CGFloat = 5
273
273
274
274
``` swift
275
275
settings.style .dotColor = UIColor (white : 1 , alpha : 0.4 )
276
- settings.style .selectedDotColor = UIColor.whiteColor ()
277
- settings.style .portraitTitleFont = UIFont.systemFontOfSize ( 18 )
278
- settings.style .landscapeTitleFont = UIFont.systemFontOfSize ( 15 )
279
- settings.style .titleColor = UIColor.whiteColor ()
276
+ settings.style .selectedDotColor = UIColor.white
277
+ settings.style .portraitTitleFont = UIFont.systemFont ( ofSize : 18 )
278
+ settings.style .landscapeTitleFont = UIFont.systemFont ( ofSize : 15 )
279
+ settings.style .titleColor = UIColor.white
280
280
```
281
281
282
282
### Segmented Type Customization
0 commit comments