I am changing @Anand Natan code: In the storyboard, set the first label to "1111111111111" to change its default width. Because changing the label does not change the size of the segmentation.
for(uint i=0;i<[_menuBarTop subviews].count;i++){
for(uint j=0;j<[[[[_menuBarTop subviews] objectAtIndex:i] subviews]count];j++){
UIView* view = [[[_menuBarTop subviews] objectAtIndex:i] subviews][j];
if([view isKindOfClass:[UILabel class]]){
UILabel* label = (UILabel*)view;
if([label.text isEqualToString:@"1111111111111"]){
label.text = LANGLOC(@"videolist_category_choosen");
}else if([label.text isEqualToString:@"2"]){
label.text = LANGLOC(@"videolist_category_followed");
}
break;
}
}
}
zszen source
share