try using the accessoryView
and editingAccessoryView
properties of your UITableViewCell
, instead of adding the view yourself.
If you want the same indicator displayed in both editing and none-editing mode, try setting both view properties to point at the same view in your uiTableViewCell
like:
self.accessoryView = self.imgPushEnabled;
self.editingAccessoryView = self.imgPushEnabled;
There seems to be a glitch in the table editing animation in IOS7, giving an overlap of the delete button and the accessoryView
when switching back to non-editing state. This seems to happen when the accesoryView
is specified and the editingAccessoryView
is nil
.
A workaround for this glitch, seems to be specifying an invisible editingAccessoryView like:
self.editingAccessoryView =[[UIView alloc] init];
self.editingAccessoryView.backgroundColor = [UIColor clearColor];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…