首页 > TAG信息列表 > NSIndexpath

iOS表分区头和表视图的编辑模式

原文链接:https://my.oschina.net/zyboy/blog/617427 设置分区头信息 -(NSString )tableView:(UITableView )tableView titleForHeaderInSection:(NSInteger)section 设置分区头视图 -(UIView )tableView:(UITableView )tableView viewForHeaderInSec

iOS表视图下拉刷新与索引

原文链接:https://my.oschina.net/zyboy/blog/617433 下拉刷新 创建UIRefreshControl的实例,将其赋给TableViewController的refreshControl属性,为控件添加valueChanged事件监听,在事件响应中,判断控件的状态,决定做的事情,最后再将控件改成停止刷新状态 1.

IOS 创建NSIndexpath

        有时候需要根据tag来获取cell,需要创建NSIndexpath,我们可能会这么用: NSIndexPath *indexPath = [[NSIndexPath alloc] initWithIndex:tag]; 没有报错,但很遗憾的是通过这样的indexPath,你是怎么都获取不到cell的!正确的创建方法是:NSIndexPath *indexPath = [NSIndexPath in

iOS UITableview 刷新指定的某一个section或cell

//某个section刷新    NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndex:2];   [tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];   //某个cell刷新    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:1 inSe