【发布时间】:2011-07-05 10:36:10
【问题描述】:
我想在本地加载一部电影,代码如下:
movie = [[QTMovie alloc]initWithFile:[[NSBundle mainBundle]pathForResource:@"movie" ofType:@"m4v"] error:nil];
movieView = [[QTMovieView alloc]initWithFrame:NSMakeRect(0, 0, 861, 646)];
[movieView setDelegate:self];
[movieView setMovie:movie];
[movie play];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlaybackDidFinished:)
name:QTMovieDidEndNotification
object:movie];
[movieView setControllerVisible:NO];
[movieView setAutoresizesSubviews:YES];
[movieView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable];
[self.window setContentView:movieView];
movie.m4v 的宽度:1024 和高度:768,我想保持窗口大小(1024、768)。我想调整movieView 861x646 的大小。但是在窗口上显示时,它仍然是 1024x768 大小。
如何将影片大小调整为 861x646 尺寸?
【问题讨论】: