Search code examples
iosobjective-cuitableviewecslidingviewcontroller

TableView overlaps the status bar in sliding view controller


I'm creating a slidingView controller using ECSlidingViewController like the one the previous version of Facebook had. Everything works fine but the menuViewController (tableViewController) is being overlapped by the status bar when I add an image to cell like shown below. enter image description here Does anyone know how to fix it.


Solution

  • it's works 100%

     - (void)viewDidLoad
        {
    
            if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {
                [self.tableView setContentInset:UIEdgeInsetsMake(20, self.tableView.contentInset.left, self.tableView.contentInset.bottom, self.tableView.contentInset.right)];
            }
            [super viewDidLoad];
            // Initialize table data
    
        }