Search This Blog

Showing posts with label iphone embeded video landscape. Show all posts
Showing posts with label iphone embeded video landscape. Show all posts

Thursday, 24 July 2014

Youtube Embeded not playing in landscape mode in iOS6 and above

Just Copy and paste below code in your AppDelegate

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    
    id presentedViewController = [window.rootViewController presentedViewController];
    NSString *className = presentedViewController ? NSStringFromClass([presentedViewController class]) : nil;
    
    if (window && [className isEqualToString:@"MPInlineVideoFullscreenViewController"]) {
        return UIInterfaceOrientationMaskAll;
    } else {
        return UIInterfaceOrientationMaskPortrait;
    }
    

}