- (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 的大小和位置,但它不起作用。
它可能正在旋转,但不会改变位置和大小。