I am using background view for UITableviewCell which is an imageview, I am using the image view to achieve two side corners for first and last cell. It is working fine But the problem is when I use this background view, the default cell delete button which comes when we press the tableviewcell default edit button is being covered by the background view.If I give clear color for the background view it is working fine but I want background view to be set.
Is there any idea why the delete button is being covered or hidden by cell background view? It happens in iOS 7 Please help! thanks in advance.
how about instead of using the background view. just use your image as the background patternn color try using this
cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:YOUR_IMAGE]];
Had the exact same issue. Solved it by sending the backgroundView to back when transition starts & also again on the next runloop cycle (using dispatch_async).
Here's the code you should add to your cell class .m file (i.e. MyCustomTableCellView.m)
// Fix for iOS7, when backgroundView comes above "delete" button
- (void)willTransitionToState:(UITableViewCellStateMask)state {
[super willTransitionToState:state];
[self sendSubviewToBack:self.backgroundView];
dispatch_async(dispatch_get_main_queue(), ^{
[self sendSubviewToBack:self.backgroundView];
});
}
- (void)didTransitionToState:(UITableViewCellStateMask)state {
[super didTransitionToState:state];
[self sendSubviewToBack:self.backgroundView];
}
I spoke with an Apple UIKit engineer today at the iOS 7 Tech Talks event in SF, and confirmed that this is an open bug that will be fixed "soon" by Apple.
UPDATE 10/22/13: iOS 7.0.3 fixes this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With