
Objective-C的:
NSArray *array = [segmentedControl subvIEws];[[array objectAtIndex:2] setTintcolor:[UIcolor redcolor]];[[array objectAtIndex:1] setTintcolor:[UIcolor greencolor]]; [[array objectAtIndex:0] setTintcolor:[UIcolor bluecolor]];
迅速:
let array = segmentedControl.subvIEwsarray[2].tintcolor = UIcolor.redcolor()array[1].tintcolor = UIcolor.greencolor()array[0].tintcolor = UIcolor.bluecolor()
请注意,子视图与用户界面的顺序相反.
您可以以相同的方式自定义边框:
let array = segmentedControl.subvIEwsarray[0].layer.borderWIDth = 5 // change thickness of borderarray[0].layer.cornerRadius = 4 //change corner radius总结
以上是内存溢出为你收集整理的ios – 如何从UISegmentController中删除边框?全部内容,希望文章能够帮你解决ios – 如何从UISegmentController中删除边框?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)