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;
效果如图