she*_*ebi 2 xcode objective-c uisegmentedcontrol
如何以编程方式更改UISegmentedControl标题?请你帮助我好吗?
@synthesize filterControl; //UISegmentedControl
- (void)viewDidLoad
{
[super viewDidLoad];
filterControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"ALL",@"PROFIT",@"LOSS", nil]]; //not working
}
Run Code Online (Sandbox Code Playgroud)
只是用
-setTitle:(NSString*)title forSegmentAtIndex:(NSUInteger)index;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3914 次 |
| 最近记录: |