現在只要把你的幀新的位置,即:
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
if(self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
self.interfaceOrientation == UIInterfaceOrientationLandscapeRight){
video1.frame = CGRectMake(50, 650, 150, 30);
video2.frame = CGRectMake(350, 650, 150, 30);
} else {
video1.frame = CGRectMake(10, 10, 150, 30);
video2.frame = CGRectMake(610, 10, 150, 30);
}
}
,離開這個就像是怎麼回事
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
可以打電話給你希望它改變的方法取向。所以它知道..
例如:
-(void)videoDisplayMothod {
//video code
toInterfaceOrientation = UIInterfaceOrientationLandscapeLeft;
}