故事板iOS中的Chromecast miniview
要在应用程序中显示带有ChromeCast视频控件的迷你视图,需要按进度更改根视图。下面的代码需要添加到情节提要中故事板iOS中的Chromecast miniview,ios,objective-c,chromecast,Ios,Objective C,Chromecast,要在应用程序中显示带有ChromeCast视频控件的迷你视图,需要按进度更改根视图。下面的代码需要添加到情节提要中 // Wrap main view in the GCKUICastContainerViewController and display the mini controller. UIStoryboard *appStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UINavigatio
// Wrap main view in the GCKUICastContainerViewController and display the mini controller.
UIStoryboard *appStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *navigationController =
[appStoryboard instantiateViewControllerWithIdentifier:@"MainNavigation"];
GCKUICastContainerViewController *castContainerVC =
[[GCKCastContext sharedInstance] createCastContainerControllerForViewController:navigationController];
castContainerVC.miniMediaControlsItemEnabled = YES;
self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
self.window.rootViewController = castContainerVC;
但我制作了tabbar控制器应用程序,rootview是从故事板开始的。有人能帮我更改或修改rootview以在tabbar应用程序中获取miniView(容器视图)吗?在使用tab view时更改根视图对我来说并不是强制性的事情,只要尝试在选项卡上添加完整的navigationController对象本身即可。 通过这种方式,在任何一个选项卡上,都会有带有控件的迷你视图