I found a weird white space on UITableView
for iPhone 6 Simulator (iOS 8) on Xcode 6 GM. I have tried to set the SeparatorInset
from both storyboard and also the code, but the white space is till there.
The following code works on iOS 7 but not on iOS 8 (iPhone 6 simulator).
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
}
I attached screenshot below:
I am using AutoLayout by the way. I hope someone can show me a way to remove the weird white space on the TableView
.
In iOS8 you have to set the Inset both on Row and on Table level.
Row level in the cellForRowAtIndexPath:
Table level in the viewDidLoad:
After that it is a good idea to CLEAN your project. On some occasions I noted that these changes were not directly introduced in the executable App in the simulator.
In my case in Xcode 6.2, in addition to Will Q's answer, I have to go to Main.storyboard > select the UITableViewCell > Attributes Inspector. Change Separator dropdown list from Default Insets to Custom Insets. Change the left inset from 15 to 0.
Add startup images for iPhone 6 and Plus. Before the images are added the phone is running in scaling mode, i.e. older Apps get scaled to fit the new screen sizes. This may be causing the lines. The new images are Retina HD 5.5 (iPhone6Plus) 1242x2208 and Retina HD 4.7 (iPhone6) 750x1334.