开发者

problem with showing modalviewcontroller in landscape mode in iphone?

my application consist of a landscape view where i want to put a modalview but the problem is with modalview. it doesn't get load on presenting it.. code is:

--------------------code here-------开发者_JAVA技巧---------------

UIViewController *modalViewController = [[UIViewController alloc] init];

modalViewController.view = modelView1; [self presentModalViewController:modalViewController animated:NO];

[self performSelector:@selector(hideSplash) withObject:nil afterDelay:5.0];


plz kindly help me with this....


The problem with ur code is that u are initializing it with alloc-init, without any nib name. Now when call:

[self presentModalViewController:modalViewController animated:NO];

The view will load itself by calling its loadview method, and u have definitely nothing in that. So if u do want to initialize in the same manner, just try to move the line of code:

modalViewController.view = modelView1;

after:

[self presentModalViewController:modalViewController animated:NO];

like:

[self presentModalViewController:modalViewController animated:NO];
modalViewController.view = modelView1;

I think this would work then.

Hope this helps.

thanks,

madhup

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜