Question

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.

Was it helpful?

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

    }

OTHER TIPS

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)];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top