Below is the initialization code of my UISegmentedControl .
- (void)initializeToolButtons { NSArray *buttonTitles = [NSArray arrayWithObjects:@"ANNEXET", @"HOVET", @"GLOBEN", "ALL", nil]; toolbuttons = [[UISegmentedControl alloc] initWithItems:buttonTitles]; toolbuttons.segmentedControlStyle = UISegmentedControlStyleBar; toolbuttons.tintColor = [UIColor darkGrayColor]; toolbuttons.backgroundColor = [UIColor blackColor]; toolbuttons.frame = CGRectMake(0, 0, 320, 30); [toolbuttons addTarget:self action:@selector(toolButtonsAction) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:toolbuttons]; }
How to reduce the font size for each element in a UISegmentedControl ?
Note. toolButtons already globally declared.
vinay source share