开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜