UISegmentControl
-
初始化:
UISegmentedControl *seg =[[UISegmentedControl alloc] initWithFrame:CGRectMake(30, 100, 200, 40)];//创建时初始化大小,但是不设置每段的参数
UISegmentedControl *seg1 = [[UISegmentedControl alloc] initWithItems:@[@"1",@"2",@"3"]];//初始化时直接给出初始的段数及title