当前位置: 首页 > 科技观察

iOS源码下载:Cell

时间:2023-03-15 22:45:00 科技观察

成组堆叠支持平台:iOS运行环境:iOS开发语言:Object-c开发工具:Xcode源码大小:60.27KB源码下载地址:http://down.51cto.com/data/1975620源码介绍第三方库TFStackingSectionsTableView可以将cell分组堆叠。组标题显示在表格中,单击组标题可展开相应的单元格。源码运行截图效果图源码片段-(void)viewDidLoad{[superviewDidLoad];self.groups=@[@"GroupA",@"GroupB",@"GroupC",@"GroupD",@"GroupE",@"GroupF",@"GroupG",@"GroupH"];self.members=@[@[@"巴西",@"墨西哥",@"克罗地亚",@"喀麦隆"],@[@"荷兰",@"智利",@"西班牙",@"澳大利亚"],@[@"哥伦比亚",@"希腊",@"科特迪瓦",@"日本"],@[@"哥斯达黎加",@"乌拉圭",@"意大利",@"英格兰"],@[@"法国",@"瑞士",@"厄瓜多尔",@"洪都拉斯"],@[@"阿根廷",@"尼日利亚",@"波斯尼亚和黑塞哥维那",@"伊朗"],@[@"德国",@"美国",@"葡萄牙",@"加纳"],@[@"比利时",@"阿尔及利亚",@"俄罗斯",@"KoreaRepublic"]];}-(UIView*)tableView:(UITableView*)tableViewtitleForHeaderInSection:(NSInteger)section{returnself.groups[section];}-(UIView*)tableView:(UITableView*)tableViewForHeaderInSection:(NSInteger)section{returnil;UILabel*label=[UILabelnew];label.text=[@""stringByAppendingString:self.groups[section]];label.backgroundColor=[UIColorcolorWithWhite:0.97falpha:1.0];label.textColor=[UIColorcolorWithWhite:0.13falpha:1.0];label.font=[UIFontboldSystemFontOfSize:14.0f];returnlabel;}源码下载地址:http://down.51cto.com/data/1975620