开发者

iphone - Problem adding subview to app window [duplicate]

This question already has answers here: My view is displaying y=-20 dispite its frame set to y=0. After rotation it snaps back to y=0 (3 answers) Closed 2 years ago.

So I have done several apps where I have done something like this in the appDidFinishLaunching: method

[self.window addSubview:someView.view];
[self.window makeKeyAndVisible];

This has worked in the past, but for some reason in my most recent endeavor, when I add the subview, there is a space at the bottom, until I rotate the device. The space looks like it is the size of the info bar at the top. My guess is the frame is not updating based开发者_如何学Python on the device orientation and location of the info bar. I am not manipulating the view in any other way other then adding it as a subview. Anyone have any idea what might be going on?? Thanks..!

Check out this screenshot of it in action...


I Understand that someView is a controller? check if you return anything in the controller for function

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜