Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone UI Design for Navigation Controller - buttons moving down
    primarykey
    data
    text
    <p>I created a navigation controller based app. The view that opens up below the nvigation bar has a UIImageView and a bunch of 'detail disclosure' buttons on top of te uiimage for navigation purposes as well.</p> <p>What I am noticing is that these buttons s have deviated down from their designer (interface builder) position when they come up in the simulator.</p> <p>I suspect the navigation bar has something to do with it, but they don't move down proportional to the height of the navigation bar.</p> <p>I am not sure how to tell them to hold on to their position.</p> <p>The UIImage does not overflow the height of the screen even with the navigaion bar at the top.</p> <p>Are their any guidelines/gotchas one needs to know about when using navigation bar at the top?</p> <p>I am using xcode 4</p> <p>Thanks</p> <p><strong>Edit:</strong></p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { StartScreenViewController *controller = [[StartScreenViewController alloc] initWithNibName:@"StartScreenViewController" bundle:nil]; _navigationController = [[UINavigationController alloc] initWithRootViewController:controller]; _navigationController.view.frame = CGRectMake(0,0, 320, 460); _navigationController.title = @"Test"; //[self.window addSubview:_navigationController.view]; self.window.rootViewController = self.navigationController; [self.window makeKeyAndVisible]; return YES; } </code></pre> <p>Another thing is that if I use the 'addsubview' method then the nav bar is truncated while if I assign the nav controller to window.rootviewcontroller then I see the whole nav bar.</p> <p><strong>Edit 2</strong></p> <p>Here how my AppDelegate.h looks</p> <pre><code>@interface TestAppDelegate : NSObject &lt;UIApplicationDelegate&gt; { IBOutlet UIView *mainView; } @property (nonatomic, retain) IBOutlet UIView *mainView; @property (nonatomic, retain) IBOutlet UIWindow *window; //@property (nonatomic, retain) IBOutlet UIViewController *viewController; @end </code></pre> <p>Here is the AppDelegate.m's didFinishLaunchingWithOptions method</p> <pre><code>StartScreenViewController *controller = [[StartScreenViewController alloc] initWithNibName:@"StartScreenViewController" bundle:nil]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller]; navController.title = @"Test"; navController.view.frame = CGRectMake(0, 0, 320, 460); [self.mainView addSubview:navController.view]; [self.window makeKeyAndVisible]; </code></pre> <p>The MainWindow.xib contains App delegate and the window as the objects. the Window has a UIView underneath it. </p> <p>StartScreenViewcontroller's xib file has the UIImageview and the buttons.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload