Я использую
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
делегат изменить кадр моего представления на основе типа ориентации
i.e.,
if(UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
self.view.frame=CGRectMake(0,0,500,300);
}
else
{
self.view.frame=CGRectMake(0,0,300,400);
}
Как обрабатывать ту же ситуацию в iOS 6 как
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
устарел в iOS6.
Я использую следующий делегат для установки всех ориентаций.
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationAllMask;
}
Но,
-(BOOL)shouldAutoRotate
{
return YES;
}
не вызывается. Как справиться с этой ситуацией?