Amazon.com Widgets How to view a video in Landscape
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2013, 04:14:03 AM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  iOS Programming
| |-+  General Questions
| | |-+  How to view a video in Landscape
Pages: [1]   Go Down
Print
Author Topic: How to view a video in Landscape  (Read 634 times)
B-ram
Newbie
*
Posts: 2


Email




« on: November 04, 2010, 02:12:14 AM »

Hi guys,

I have a video in my application but its portrait.

I want it Landscape but i really don't have any idea how to do that.

i used this code to make my video:

Code: (Objective-C)
- (IBAction)playMovie:(id)sender
{
 NSString *filepath = [[NSBundle mainBundle] pathForResource:@"BAZO" ofType:@"m4v"];
 NSURL *fileURL = [NSURL fileURLWithPath:filepath];
 MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];

 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlaybackComplete:)name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayerController];

 [self.view addSubview:moviePlayerController.view];
 moviePlayerController.fullscreen = YES;
 //Uncomment om beeld formaat aan te passen
 //moviePlayerController.scalingMode = MPMovieScalingModeAspectFill;
 [moviePlayerController play];
}

I used this code to view it in landscape:

Code: (Objective-C)
[MPMoviePlayerController setOrientation:UIDeviceOrientationLandscapeLeft animated:NO];

but it gives me the warning : 'MPMoviePlayerController' may not respond to '-setOrientation:animated:'

Whats happening?

Maybe somebody can give me a hint or an other method so i can put this to landscape?

If so, i will be really happy Cheesy

Thanks!

Bram
Logged
Pages: [1]   Go Up
Print
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.