AVFullscreenVideoController is the view controller when playing youtube fullscreen in ios8. And I can allow it to rotate by manipulating app delegate method
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
/*
if view controller is AVFullscreenVideoController or MPInlineVideoFullscreenViewController or MPMoviePlayerViewController"
return UIInterfaceOrientationMaskAllButUpsideDown;
*/
}
My objective is to keep the current UIInterfaceOrientationMask of my view controllers and allow rotation to the fullscreen video when playing.
How can I do the same effect without adding code in the appdelegate.m? Thanks!