Теперь просто добавьте в свои рамки новое местоположение, например:
-(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;
}