【问题标题】:Call presentModalView controller in UIView在 UIView 中调用 presentModalView 控制器
【发布时间】:2013-04-10 07:22:05
【问题描述】:

我想在UIView 上拨打presentModalViewController

我想创建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];

【问题讨论】:

    标签: ios uiview uiviewcontroller uinavigationcontroller


    【解决方案1】:

    不,您不能在UIView 上致电presentModalViewController

    您只能从 UIViewController 或其子类(UINavigationControllerUITableViewController 等)“presentModalViewController”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-24
      • 2012-09-10
      相关资源
      最近更新 更多