0

我想presentModalViewController打电话UIView

我想创建一个模型类子类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];
4

1 回答 1

0

No, you can't call presentModalViewController on UIView.

You only can 'presentModalViewController' from UIViewController or it's subclass (UINavigationController, UITableViewController, etc).

于 2013-04-10T08:16:04.650 回答