0
votes

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----------------------

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....

1

1 Answers

1
votes

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