-2

I was wondering how do you do make a underline in ios segmented controls text.

Thanks

1 Answers1

0

This SO post may help you How to create Segmented control with underline in iOS. You may be able to do it by using attributes. Something like this:

NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"yourtext"
                                                                      attributes:@{NSUnderlineStyleAttributeName: @(NSUnderlineStyleNone)}]];
[_segmentedControl setTitleTextAttributes:attributedString  forState:UIControlStateNormal];
Community
  • 1
  • 1
Alex
  • 995
  • 12
  • 25