use*_*951 5 iphone objective-c uitableview ios
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section
{
[view vChangeBackgroundToCyan];
}
Run Code Online (Sandbox Code Playgroud)
后
[self.delegateForTableController.tvDelegated insertSections:[NSIndexSet indexSetWithIndex:ip.section] withRowAnimation:UITableViewRowAnimationRight];
Run Code Online (Sandbox Code Playgroud)
怎么叫他们?
tableView:viewForHeaderInSection返回的类:需要是tableView:willDisplayHeaderView:forSection:被调用方法的UITableViewHeaderFooterView的子类.
如果返回的视图属于其他类型,则不会调用tableView:willDisplayHeaderView:forSection:方法.
小智 1
据我所知,- tableView:willDisplayHeaderView:forSection:只有当您在 中提供自己的观点时才会被调用\xe2\x80\x93 tableView:viewForHeaderInSection:。
我也希望您的代表参考不是nil。
| 归档时间: |
|
| 查看次数: |
1912 次 |
| 最近记录: |