swift - Change Border Width of UISegmentedControl in iOS 8 -


How do I change the boundary width of a UISegmentedControl in iOS 8? Currently, the border width is 2px, and I would like to set it to 1px. CALayer did not work to determine border width. I can not find anything about it

Thanks in advance for any help!

I recommend you to use custom splitter images based on your needs:

  [mySegmentedControl setDividerImage: Image 1 forLeftSegmentState: UIControlStateNormal rightSegmentState: UIControlStateNormal barMetrics: barMetrics]; [MySegmentedControl setDividerImage: Image 2 forLeftSegmentState: UIControlStateSelected rightSegmentState: UIControlStateNormal barMetrics: barMetrics]; [MySegmentedControl setDividerImage: Image 3 forLeftSegmentState: UIControlStateNormal rightSegmentState: UIControlState Selected Barometrics: Barometrics];  

Check the document here


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -