2

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.

bachman
  • 690
  • 7
  • 22

2 Answers2

2

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

    }
codercat
  • 22,873
  • 9
  • 61
  • 85
0

Use this to set tableview frame

[self.tableView setFrame:CGRectMake(self.tableView.frame.origin.x, 20, self.tableView.frame.size.width,self.tableView.frame.size.width)];
henry4343
  • 3,871
  • 5
  • 22
  • 30