I am using the latest Xcode and I have created a visual based universal app and started focusing on the iPhone And now it is mandatory to put me in the iPad. I did not use the interface builder in the development because there was a possibility of a more dynamic screen change than the beginning. In the code I have inserted all the screens with SegrectMK (0,0,320,480).
Now when I try to run an app in an iPad simulator, the app sticks to the top corners of the simulator as the width is 320 and 480 in height and the rest of the screen screen white instead of a border and a space between 2x options and the middle of the screen.
I named the main nib file base (ipad) on my iPhone XIB name in the property. Plist file is I know that this is a major reason that the app sticks to the top, but how can I make it normal and my app looks right in the iPad?
Please help
If you create your own ideas, Once for iPod / twice, once for the iPod and once everything has to be set for the iPad. You can do something like this:
if ([used ipad]) {rect = CGRectMake (0,0,640,1024); } Else {rect = CGRectMake (0,0,320,480); } [Utils isIPad] Something like this: + (BOOL) is ipad {#ifdef UI_USER_INTERFACE_IDIOM return (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad); # Return not return; #AdIf}
It's easy and fast to do with nibes, though. You must use the right nib in that case:
if ([used ipad]) {login = [[login controller alloc] initWithNibName: @ "Login Controller-iPad" bundle : Zero]; } Else {login = [[Login Controller alloc] initWithNibName: @ "Login Controller" bundle: zero]; }
Comments
Post a Comment