prepareForSegue不要求使用容器视图

时间:2019-04-23 12:30:05

标签: ios objective-c segue uicontainerview

View控制器最初是从appdelegate加载的。后来,通过隐藏和取消隐藏动画来管理它。在该视图控制器中,prepareForSegue并不要求嵌入容器视图。

AppDelegate

+ (AppDelegate *) appDelegate {
    return [[UIApplication sharedApplication] delegate];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        // Override point for customization after application launch.

        self.videoViewController = [[PlayerViewController alloc] init];

        return YES;
    }

要显示视图控制器,请执行以下操作:

[UIApplication sharedApplication];
AppDelegate *appDelegate=(AppDelegate *)[[UIApplication sharedApplication] delegate];
[[appDelegate videoViewController]show];

显示后,我试图从Viewcontroller触发embed segue,但它甚至没有触发prepareforsegue。

0 个答案:

没有答案