My app uses a UITableViewController, which is a child of UINavigationController, which is the content view controller of a UIPopoverController. I am customizing the appearance of the UITableView of the UITableViewController. It works perfectly for iOS 5 and 6, but it has an issue in iOS7. The separators of the cells are set to be white in color, and the table view initially appears with the correct separator color. However, once I scroll the table view and the cells are reloaded (meaning cellForRowAtIndexPath and willDisplayCell functions are called), the separators of the newly reloaded cells are all black.
I am customizing the separator color by calling this function in the UITableViewController's viewDidLoad function:
self.tableView.separatorColor = [UIColor whiteColor];
If I use the exact same table view elsewhere in the app (not in a UIPopoverController), then I do not have this problem.
As far as I can tell, there is nothing in the documentation to indicate that this should work differently for iOS 7 than for 5 or 6. Maybe it's an iOS bug? Any help would be much appreciated.
set this in viewwillAppear
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.tableView.separatorColor = [UIColor whiteColor];
}
hope this helps
The issue was an iOS bug - the issue no longer occurs for me for iOS7.0.4. I do not know exactly which version it was fixed in. So there's no need to reloadData or set separatorColor in viewWillAppear. It's sufficient to do this in viewDidLoad.
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