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
Post a Comment