
UITableView が編集モードのときに表示されるこの白い線を取り除くことは可能ですか?
私は最終的に解決策を見つけました:
表示されているセルのサブビューを反復して削除します。
-(void)editTableView {
[self setEditing:YES animated: YES];
for (UITableViewCell *cell in [self.tableView visibleCells]) {
for (UIView *control in cell.subviews) {
if (control.frame.size.width == 1.0f) {
control.backgroundColor = [UIColor clearColor];
}
}
}
}
表示されているすべてのセルを削除します。
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.editing) {
for (UIView *control in cell.subviews) {
if (control.frame.size.width == 1.0f) {
control.backgroundColor = [UIColor clearColor];
}
}
}
}