uisegmentedcontrol - Change color of outer border for SegmentedControl in Objective-C -


I have a segmented control object, and I want to change the color of the outer border while preserving the line between the two options. I am I currently have the code:

  self.segmentedControl.tintColor = [UIColor whiteColor]; // Set the range and text to white [self.segmentedControl setTitleTextAttributes: @ {NSForegroundColorAttributeName: [UIColor darkGrayColor]} forState: UIControlStateNormal]; // Set the Segment text in dark gray   

However, this code also sets the line between the white option. Is there any way to change the color of the outer border, or should I just put two buttons next to each other?

UISegmentedControl does not have an option to do this as you have said. You need to implement your own custom section controller using UIViews, UIButtons, or UILabels, etc.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -