-1
我期待创建一个类似于appstore应用程序中使用的uitableview(转到苹果设备上的应用程序商店,并选择探索选项卡,在这里你会发现类别表)的tableview。任何人都可以告诉我如何做到这一点。 SampleUITableView设计在苹果应用程序商店
我期待创建一个类似于appstore应用程序中使用的uitableview(转到苹果设备上的应用程序商店,并选择探索选项卡,在这里你会发现类别表)的tableview。任何人都可以告诉我如何做到这一点。 SampleUITableView设计在苹果应用程序商店
您可以用不同的方式实现这一简单的方法
先保存所选单元格指数
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
self.selectedRowIndex = [indexPath];
[tableView reload];
}
那么当增加这样
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
//check if the index actually exists
if(selectedRowIndex && indexPath.row == selectedRowIndex.row) {
return 100;
}
return 44;
}
针对所选行的高度参考Accordion table cell - How to dynamically expand/contract uitableviewcell?
你可以使用库也看看
http://code4app.net/category/tableview
感谢您的评论,我会做.. – AnshaD