My view is displaying y=-20 dispite its frame set to y=0. After rotation it snaps back to y=0

Posted by jamone on Stack Overflow See other posts from Stack Overflow or by jamone
Published on 2010-06-13T15:31:03Z Indexed on 2010/06/13 15:32 UTC
Read the original article Hit count: 294

Filed under:
|
|

I started by creating a universal window based app. Starting with the iPhone version I created a UIViewController and associated nib.

My App delegate:

rootViewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
[window makeKeyAndVisible];
[window addSubview:rootViewController.view];
return YES;

My RootViewController:

- (void)viewDidLoad {
[super viewDidLoad];
adBannerView = [[ADBannerView alloc] initWithFrame:CGRectZero];
[self.view addSubview:adBannerView];

}

I've tried instanciating buttons instead of the adBanner and I get the same result.

My RootViewController's nib has not been changed since x-code created it for me. My MainWindow_iPhone.xib also is stock.

What's causing this?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c