I recently started using interface builder, the problem i’m facing right now is when i use the back button of navigation controller, my UI elements’ y axis go up by roughly 20-30 px, is there some setting i’ve to use to avoid this problem ? And they go up only when i use pushViewController, when i use popViewController it loads the way i need.
Code i’m using for pushing:
examVC=[[ExampleClass alloc] initWithNibName:@"ExampleClass" bundle:nil];
[[self navigationController] pushViewController:examVC animated:YES];
I’m attaching the images with the question. Please note how label has gone down about 20-30 px.
Why does this happen? What am i doing wrong ?
Thanks for all the help.
Edit : changed the screens for better clarity
I’m using pushing code on the round rect button.
Screen 1:UI elements set in my IB

Screen 2: How it looks when pushed from previous view

Screen 3: How it looks when popped from the “Next View”

My home view controller had the navigation bar hidden, the screen i posted was the second view which comes after the home view. I wanted to hide navigation bar in the first view only, so i had used :
It caused the problem because i was showing the navigation bar again in
viewDidDisappear, so the view would load first then the navigation bar would be shown causing it to overlap.So i put the same code in
viewWillDisappear, which removed the issue. As navigation bar did load before loading of the next view. Now the view loads just like i designed it in interface builder.