romaonthego / RESideMenu

iOS 7/8 style side menu with parallax effect.
MIT License
7.1k stars 1.35k forks source link

Constraints after navigating back to first view controller #226

Open RNUK opened 9 years ago

RNUK commented 9 years ago

I have this setup in my project and all is working really well.

I have also added in a UIPageViewController and I am using CGRectMake to pull it in and resize as I have a header section of static text. This first pass this works well, but when I navigate away using the sidemenu and then navigate back to the first VC it appears as though all the content has shifted up by the hight of the navigation bar i.e as if the navigation bar were not there. How can I get around this?

Before navigating: beforenavigate

After navigating: afternavigate

shawnwall commented 9 years ago

I'm seeing a similar issue during usage.

RNUK commented 9 years ago

Have you had any luck rectifiing?

RNUK commented 9 years ago

@shawnwall - I don't know if it will help you at all, but the following fixed my issue.

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { 
    self.edgesForExtendedLayout = UIRectEdgeNone;
}

in the viewDidLoad of your main UIViewController.