iOS源码下载:按组堆叠的单元格

移动开发
第三方库TFStackingSectionsTableView可以把单元格按组堆叠。组头显示在表格上,点击组头可以展开对应的单元格。

支持平台:iOS

运行环境:iOS

开发语言:Object-c

开发工具:Xcode

源码大小:60.27KB

源码下载地址:http://down.51cto.com/data/1975620

源码简介

第三方库TFStackingSectionsTableView可以把单元格按组堆叠。组头显示在表格上,点击组头可以展开对应的单元格。

源码运行截图

效果图

源码片段

  1. - (void)viewDidLoad 
  2.     [super viewDidLoad]; 
  3.       
  4.     self.groups = @[@"Group A", @"Group B", @"Group C", @"Group D", @"Group E", @"Group F", @"Group G", @"Group H"]; 
  5.     self.members = @[ 
  6.         @[@"Brazil", @"Mexico", @"Croatia", @"Cameroon"], 
  7.         @[@"Netherlands", @"Chile", @"Spain", @"Australia"], 
  8.         @[@"Columbia", @"Greece", @"Côte D'Ivoire", @"Japan"], 
  9.         @[@"Costa Rica", @"Uraguay", @"Italy", @"England"], 
  10.         @[@"France", @"Switzerland", @"Ecuador", @"Honduras"], 
  11.         @[@"Argentina", @"Nigeria", @"Bosnia and Herzegovina", @"Iran"], 
  12.         @[@"Germany", @"USA", @"Portugal", @"Ghana"], 
  13.         @[@"Belgium", @"Algeria", @"Russia", @"Korea Republic"
  14.     ]; 
  15. - (UIView *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 
  16.     return self.groups[section]; 
  17.   
  18. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
  19.     return nil; 
  20.     UILabel *label = [UILabel new]; 
  21.     label.text = [@"  " stringByAppendingString:self.groups[section]]; 
  22.     label.backgroundColor = [UIColor colorWithWhite:0.97f alpha:1.0]; 
  23.     label.textColor = [UIColor colorWithWhite:0.13f alpha:1.0]; 
  24.     label.font = [UIFont boldSystemFontOfSize:14.0f]; 
  25.     return label; 

源码下载地址:http://down.51cto.com/data/1975620

责任编辑:闫佳明 来源: 网络整理
相关推荐

2013-06-20 11:10:24

iOS开发UItableView单元格背景渐变

2009-08-07 17:54:41

C#单元格数据

2021-08-13 11:10:32

OpenPyXLExcelPython

2009-07-28 03:44:00

GridViewRow

2010-04-27 11:11:06

Oracle修改JTa

2010-08-11 16:41:30

Flex DataGr

2009-07-27 16:46:07

DetailsView

2021-09-09 08:58:32

Excel数据处理函数

2015-01-20 17:15:55

iOS源码滚动视图

2015-01-19 12:19:04

iOS源码ActionSheet仿QQ音乐

2020-02-19 14:55:20

开发技能代码

2020-11-20 10:52:54

Antd表格日程

2010-08-26 10:42:18

CSStr td

2015-01-15 16:45:05

iOS源码自定义画图

2012-05-21 09:41:54

XcodeiOS单元测试

2011-06-15 10:49:26

Qt QTableItem

2020-05-07 17:30:49

开发iOS技术

2022-08-01 08:02:25

单元格可视化语法

2011-06-15 12:58:05

Qt QTableWidg

2015-01-14 14:11:19

iOS源码输入文字
点赞
收藏

51CTO技术栈公众号