Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sumitkum

macrumors newbie
Original poster
Apr 29, 2009
1
0
Hi All,

I want to open the modalViewcontroller from a UIView class.
We can open the same from UIviewController with this command.:

[viewController presentModalViewController:modal1 animated:YES];

But, how we can open it from a UIview.
[view presentModalViewController: modal1 animated:YES], doesn't work
 
You can't, it needs to be a view controller to present it as a model view. Its easy to make a UIView to a UIViewController.. Just create a UIViewController, and place a UIView inside it then call to the UIViewController...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.