IPhone NavigationController - same view pressed, different layouts received

I have a tabbed application with each tab having a navigation controller. I use helper code to direct the view / controller pair to the navigation stack when I call the same code from two different places that get (super-tasks) different results. In one case, the view becomes lower than in the other case, apparently lower at the height of the navigation bar.

Inserted from one tab (in good position):

00000006.png

Discarded from another tab (too low):

00000005.png

XIB:

00000007.png

Here is the push code:

+ (void)navigateToLocation:(Location*)location controller:(UIViewController*)vc withDelegate:(NSObject <LocationEditDelegate> *)delegate { LocationDetailsViewController *detailsController = [[LocationDetailsViewController alloc] initWithNibName:@"LocationDetailsViewController" bundle:nil]; detailsController.title = [location display]; detailsController.location = location; detailsController.delegate = delegate; // Push the detail view controller [[vc navigationController] pushViewController:detailsController animated:YES]; [detailsController release]; } 

Can someone help me understand what can happen and how do I get into this?

I have 2.2.1, install and build / deploy using 2.2.

Since comments are not displayed, I am annotated below. Change this if I do wrong:

  • I added simulated indicators with no change in behavior.
+4
source share
4 answers

Having tried the sentences, I noticed a subtle difference in one tab, verses of the rest. It has been shown that this view is located above the tab bar and below the navigation bar. Others did not do this, their “internal appearance” seemed to elude navigation (as well as the arising subtasks with problems).

I don’t remember how these tabs were created, but I recreated them again (by setting the simulated metrics in MainView.xib, if that matters, I doubt since one tab was already “correct”.) Anyway, now everything works...

Problem Tab:

alt text

Work tab:

alt text

... see "the dotted line around the inner view" and where the upper part of the dotted line ends.

+2
source

I had this problem a while ago. If I remember correctly, from head to head, there was a field called “Auto-resize view to fill the screen”, which was checked in IB. I think it was somewhere in the tab. By deselecting, he solved my problem.

+2
source

This is almost certainly due to not using simulated metrics in XIB. Try adding a simulated navigation bar to your XIB and see if it changes anything.

0
source

Will one of the tabs start from the navigation bar?

Also, it looks like the green bar at the bottom is in the same XIB as the rest of the review, but it has not been pressed. It is right?

If so, another solution would be to go to the ruler tab for all the top elements and make sure they are locked at the top edge of the view so that they cannot be moved down ...

0
source

All Articles