I knew this question is old, so many answers was already posted here.
The problem is, the solutions are working fine with iPhone's. But when trying it with iPad, I still faces some issue.
Refer the below images(First one is portrait mode and the second one is in landscape mode).
I used the below code in my view controller where I wrote table view's delegate methods.
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
[tableView setLayoutMargins:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
Question:
Is there is any way to remove these left empty space of table view's separator in iPad? Should I include any extra check's beyond the iPhone's working code?
Confused!!