如何以编程方式更改 UISegmentedControl 标题?你能帮帮我吗?
@synthesize filterControl; //UISegmentedControl
- (void)viewDidLoad
{
[super viewDidLoad];
filterControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"ALL",@"PROFIT",@"LOSS", nil]]; //not working
}
最佳答案
就用
-setTitle:(NSString*)title forSegmentAtIndex:(NSUInteger)index;
关于objective-c - 以编程方式更改 UISegmentedControl 标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10515614/