use*_*037 6 cocoa-touch uitableview ios
概述(已编辑)
我有UITableView,当我滑动时,会出现删除按钮,当我触摸其他位置时,删除按钮就会消失而没有任何动画.
随附配件
没有附件
题
在 iOS 6 上这个“bug”仍然存在。有 2 种方法可以解决此问题:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//[...]
cell.accessoryView = [UIView new];
//[...]
}
Run Code Online (Sandbox Code Playgroud)
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.accessoryView = [UIView new];
}
Run Code Online (Sandbox Code Playgroud)
这样,当取消“删除行”时,按钮会随着动画消失。
| 归档时间: |
|
| 查看次数: |
1517 次 |
| 最近记录: |