2013-04-10 46 views
0

我想致電presentModalViewControllerUIView在UIView中調用presentModalView控制器

我想創建一個UIView的模型類子類,並創建3個帶有動作的按鈕,然後將其添加到UIView。我寫了一個關於發送消息的小代碼。在那我打電話presentModalViewController,我把這個觀點加到firstViewController

可能嗎?

我寫的代碼在AppDelegate->application:didReceiveLocalNotification 接收通知這一觀點將被添加後MainViewController

NotifViewModel *remainderAlert = [[NotifViewModel alloc]initWithFrame:CGRectMake(40, 60, 250, 300)]; 



[remainderAlert showRemainderAlert1]; 

[self.viewController.view addSubview:remainderAlert]; 

回答

0

不,你不能UIView打電話presentModalViewController

您只能從UIViewController或其子類(UINavigationController,UITableViewController等)'presentModalViewController'。