- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (interfaceOrientation == (UIInterfaceOrientationPortrait))
[self embedYouTube:yout frame:CGRectMake(30, 155, 260, 200)];
if (interfaceOrientation == (UIInterfaceOrientationLandscapeRight))
[self embedYouTube:yout frame:CGRectMake(30, 155, 400, 200)];
if (interfaceOrientation == (UIInterfaceOrientationLandscapeLeft))
[self embedYouTube:yout frame:CGRectMake(30, 155, 400, 200)];
if (interfaceOrientation == (UIInterfaceOrientationPortraitUpsideDown))
[self embedYouTube:yout frame:CGRectMake(30, 155, 260, 200)];
return YES;
}
我想改變我的embedYouTube旋轉時的大小和位置,但它不工作。shouldAutorotateToInterfaceOrientation不改變對象位置
它可能正在旋轉,但不會改變位置和大小。
我試過,但沒有也 – 2012-07-17 13:11:20
工作。如果它不是willAnimateRotationToInterfaceOrientation方法中工作,也許這是你的embedYouTube:框架:方法的錯 – iSofTom 2012-07-17 13:14:13
embedYouTube:框架是工作,但是當它旋轉時不改變大小爲適合風景 – 2012-07-17 13:16:18