Pav*_*lov 11 uitableview ios11 xcode9
在iOS 11设备上删除UITableViewCell意外的白色背景出于某种原因,但在故事板中所有背景颜色都设置为蓝色(在iOS10上正常工作).
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete)
{
[self.bookmarks removeObjectAtIndex:indexPath.row];
[self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}
Run Code Online (Sandbox Code Playgroud)
尝试了所有类型的UITableViewRowAnimation,并没有解决问题.
Kaw*_*tan 13
试试吧(你可以选择appearanceWhenContainedInInstancesOfClasses).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
[[UITableViewCell appearance] setBackgroundColor:[UIColor clearColor]];
return YES;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1429 次 |
| 最近记录: |