UISegmentController边框改变’
开发遇到问题需要改变UISegmentController的边框. 琢磨琢磨出了方法,拿出来给大家分享一下
self.mySegmentControl.viewPrintFormatter.view.layer.borderWidth = 1;
self.mySegmentControl.viewPrintFormatter.view.layer.borderColor = [UIColor orangeColor].CGColor;
self.mySegmentControl.viewPrintFormatter.view.layer.masksToBounds = YES;
self.mySegmentControl.viewPrintFormatter.view.layer.cornerRadius = self.mySegmentControl.viewPrintFormatter.view.frame.size.height / 2;
效果如图
本文分享了如何自定义UISegmentController的边框样式,包括设置边框宽度、颜色、圆角等属性。
1563

被折叠的 条评论
为什么被折叠?



