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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -