Joc*_*hen 7 cocoa-touch objective-c uitableview ios
我有一个UIViewController用UITableView的内部UINavigationController.
当我隐藏导航栏时
[self.navigationController setNavigationBarHidden:YES animated:YES];
Run Code Online (Sandbox Code Playgroud)
调整表视图的大小,并在底部显示一个新单元格.此单元格布置隐藏导航栏的动画内部的子视图.

有没有办法从动画中排除单元格的布局?
您可以通过实现UITableViewDelegate方法来阻止单元格动画tableView:willDisplayCell:forRowAtIndexPath::
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
[UIView performWithoutAnimation:^{
[cell layoutIfNeeded];
}];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
831 次 |
| 最近记录: |