Why Does the iPad Main View Refuse to go FullScreen?

Posted by dugla on Stack Overflow See other posts from Stack Overflow or by dugla
Published on 2010-04-18T15:50:58Z Indexed on 2010/04/18 15:53 UTC
Read the original article Hit count: 468

Filed under:
|
|

I am doing an imaging app for iPad and it requires use of the entire screen. The approach I have used on iPhone does not appear to work on iPad. In Interface Builder I have set the UIToolbar to translucent.This code echos the dimensions of the main view before and after requesting fullscreen.

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {

    [self.window addSubview:self.viewController.view];

    NSLog(@"Hello Popover AD - application did Finish Launching With Options - viewSize: %f %f BEFORE", self.viewController.view.bounds.size.width, self.viewController.view.bounds.size.height);

    [self.viewController setWantsFullScreenLayout:YES]; [self.viewController.view layoutIfNeeded];

    NSLog(@"Hello Popover AD - application did Finish Launching With Options - viewSize: %f %f AFTER", self.viewController.view.bounds.size.width, self.viewController.view.bounds.size.height);

    [self.window makeKeyAndVisible];

    return YES;

}

This is what NSlog has to say:

Hello Popover AD - application did Finish Launching With Options - viewSize: 768 1004 BEFORE

Hello Popover AD - application did Finish Launching With Options - viewSize: 768 1004 AFTER

Can someone please tell me what I am doing incorrectly here? Note, on iPhone I set fullscreen within the init method of the relevant ViewController. Can view resizing only be done in a ViewController?

My ultimate goal is a fullscreen view nicely tucked underneath a translucent status bar and tool bar. I will retract the status/tool bars when user interaction begins in the main view.

Thanks,
Doug

© Stack Overflow or respective owner

Related posts about ipad

Related posts about uiviewcontroller