人気ブログランキング | 話題のタグを見る

あれを縦に表示しちゃう-MPMoviePlayerControllerをいじる

@interface MPMoviePlayerController (extended)
- (id)videoViewController;
- (void)setOrientation:(int)orientation animated:(BOOL)yorn;
@end

...とかやっといて

NSString *path = [[NSBundle mainBundle] pathForResource:@"hoge" ofType:@"mp3"];
MPMoviePlayerController* myMPC=[[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]] retain];
[myMPC setOrientation:UIDeviceOrientationPortrait animated:NO];
[myMPC play];

...ってやっちゃうと
ちゃんと縦に表示される(謎
by taff2005 | 2009-07-16 06:41 | 小ネタ
<< 天気予報の嘘つきぃ~ 帰宅 >>