I have a UITableView that I want to set its background color to transparent. Background color for the table view and all subviews at interface builder is set to transparent. It works fine for iOS 8 & 7. but, not iOS 9. any idea?
cellForRowAtIndexPath method:
[cell setSelectedBackgroundView:[[UIView alloc] init]];
[cell.selectedBackgroundView setBackgroundColor:[UIColor clearColor]];
[cell setBackgroundColor:[UIColor clearColor]];
[cell.contentView setBackgroundColor:[UIColor clearColor]];
[cell setBackgroundView:[[UIView alloc] init]];
[cell.backgroundView setBackgroundColor:[UIColor clearColor]];
Objective-c:
[self.yourTableView setBackgroundColor:[UIColor clearColor]];
Swift:
self.yourTableView.backgroundColor = .clear
XCode 7.0 bug. Not picking up from Storyboard
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