排序
易于添加到您的项目中。
您可以轻松将此功能添加到自己的项目中,'SortProperty' 使用方便。
SortProperty 需要 Xcode 5,目标 iOS 5.0 和更高版本,启用 ARC。
CocosPods 是推荐安装路径覆盖的方法,只需将以下行添加到 '配置文件'
pod ' SortProperty'
zooimg effect property to user, but if you user zooimg effect, will be dissmiss parallax effect.
#import "SortPropertyHeade.h"
在自己的项目:
@interface xx ()
1.在xx.h把tableViewData_h() 写在.h,或者.m(声明数组)
tableViewData_h()
2.在xx.m把tableViewData_m() 写在.m()(懒加载数组)
3.在xx.m把tableViewDataSource_m() 写在.m()(为tableView的delegate)
3.在xx.m把tableViewSectionIndexTitle_m()写在.m()(像通讯录的字母)。
@end
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *cellID = @"cellID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellID];
}
//模型
id model=self.totalData[indexPath.section][indexPath.row];
return cell;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
self.pinYinData[section]返回字符串。
通过section判断,设置自己需要。
SortProperty
在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。