I am setting a view as a background for uitableview. View simply has colorWithPatternImage.
It is working correctly in iOS6, But in iOS7, it dont have any effect, TableView background remains just white in iOS7. I am using Three20 library.
My code is
UIImage *imgBackGround = [UIImage imageNamed: @"my_background.png"];
self.tableView.backgroundColor = [UIColor clearColor];
UIView *backView = [[UIView alloc] initWithFrame:self.view.frame];
[backView setBackgroundColor:[UIColor colorWithPatternImage:imgBackGround]];
self.tableView.backgroundView = backView;
[backView release];
self.view.backgroundColor=[UIColor colorWithPatternImage:imgBackGround];
What can be issue in iOS7 ? Help please, Thanks in advance.
In iOS 7, tableview's cell automatically have a white background color. You need to clear the cell's color and background.
cell.backgroundColor = [UIColor clearColor];
cell.backgroundView = [UIView new];
Use in cellForRowAtIndexPath
This will surely solve it.
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