开发者

What is the correct way to add a subview to a new window, making it aware of its available window size?

开发者 https://www.devze.com 2022-12-31 01:01 出处:网络
This is some kind of a basic question: I am adding a new Subview to a window using: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

This is some kind of a basic question:

I am adding a new Subview to a window using:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    viewController = [[myViewController alloc] initWithNibName:@"myNib" bundle:nil];
    [window addSubview:viewController.view];

This displays the v开发者_如何学编程iew at 100% on the window, having the Clock overlaying some pixels of that view on top.

Rotating makes the view aware of the clock and resizes it to begin correctly below the clock without any overlay.

What is the correct way to add a subview to a new window, making it aware of its available window size?

0

精彩评论

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