【发布时间】:2018-06-05 21:32:31
【问题描述】:
我有一个 AdIntegrator.mm 文件,其中包含创建表单的函数:
-(void)createAndDisplayForm{
AppDelegate* app = (AppDelegate*)[[UIApplication sharedApplication] delegate]; //add AppDelegate pointer
_vc = app.window.rootViewController;
//create form
//presented using presentFromViewController:_vc
}
我希望能够在需要时从我的AppDelegate.mm 再次使用此表单(如果User 希望再次看到此表单)。
我怎么称呼它?
我在AppDelegate.mm 中尝试了以下操作,但未显示任何视图:
AdIntegrator* opt = [[AdIntegrator alloc] init];
[opt createAndDisplayForm];
谁能告诉我在 AppDelegate 中使用此功能的最佳方式,以及确保可以再次看到 presentFromViewController。谢谢。
【问题讨论】: