-(void)sectionHeaderView:(QQSectionHeaderView*)sectionHeaderView sectionClosed:(NSInteger)section
{
QQList *persons = [lists
objectAtIndex:section];
persons.opened = !persons.opened;
// 收缩+动画 (如果不需要动画直接reloaddata)
NSInteger countOfRowsToDelete = [self.tableView
numberOfRowsInSection:section];
if (countOfRowsToDelete > 0) {
persons.indexPaths = [[NSMutableArray
alloc] init];
for (NSInteger i = 0; i < countOfRowsToDelete; i++) {
[persons.indexPaths
addObject:[NSIndexPath indexPathForRow:i
inSection:section]];
}
[self.tableView
deleteRowsAtIndexPaths:persons.indexPaths
withRowAnimation:UITableViewRowAnimationTop];
}
}
-(void)sectionHeaderView:(QQSectionHeaderView*)sectionHeaderView sectionOpened:(NSInteger)section
{
QQList *persons = [lists
objectAtIndex:section];
persons.opened = !persons.opened;
// 展开+动画 (如果不需要动画直接reloaddata)
if(persons.indexPaths){
[self.tableView
insertRowsAtIndexPaths:persons.indexPaths
withRowAnimation:UITableViewRowAnimationBottom];
}
persons.indexPaths =
nil;
}
分享到:
相关推荐
iphone QQ列表的收缩展开,带动画效果 iphone QQ列表的收缩展开,带动画效果 iphone QQ列表的收缩展开,带动画效果
CSS3实现Safari指针动画是一款CSS3手风琴菜单,菜单项在展开和收缩的时候菜单项会有弹性动画效果。
使用 jQuery配合CS3动画,实现搜索栏 展开收缩的特效
菜单,jQuery弹性展开收缩菜单插件 jQuery弹性展开收缩菜单插件
主要介绍了iOS开发中TableView类似QQ分组的折叠与展开效果,其实要做这个效果我先想到的是在tableView中再嵌套多个tableView。下面通过本文给大家分享实现思路,需要的朋友可以参考下
分享一款jquery收缩展开的多级导航(附带手风琴效果示例) 35.国外漂亮动感jquery三级导航菜单插件(横向自动展开)下载 36.基于jquery美化表单效果的插件 37.兼容性好的jquery+div漂亮黑色动感下拉菜单 38.简单...
233.如何以扩展收缩效果展开程序窗口 234.如何以异步方式控制显示程序窗口 235.如何设置对话框程序窗口的启动位置 236.如何在上次关闭位置启动程序窗体 237.如何显示和关闭非模式对话框 238.如何在对话框程序中加入...
2) 修改静态编译后“选择列表框”在“单选”属性为真时不显示项目内容的BUG 3) 修改核心库中“播放音乐”命令在没有声卡或声卡被禁用时未正确释放资源的BUG 4) 修改静态编译后“读配置项”命令在第三个参数“配置...