简单集成分段选择
查看次数:5678
下载次数:1789
上传时间:2016-05-31
大小:70 B
SegmentViewController *vc = [[SegmentViewController alloc]init];
NSArray *titleArray = @[@"推荐", @"订阅", @"健康", @"资讯", @"原创", @"娱乐",@"搞笑",@"军事"];
vc.titleArray = titleArray;
NSMutableArray *controlArray = [[NSMutableArray alloc]init];
for (int i = 0; i < vc.titleArray.count; i ++) {
ExampleViewController *vc = [[ExampleViewController alloc]initWithIndex:i title:titleArray];
[controlArray addObject:vc];
}
vc.titleSelectedColor = [UIColor redColor];
vc.subViewControllers = controlArray;
vc.buttonWidth = 80;
vc.buttonHeight = ButtonHeight;
[vc initSegment];
[vc addParentController:self];
这样就把页面创建好了
收藏