Nie można obsługiwać orientacji w iOS 6?
ja używam
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
delegować, aby zmienić ramkę mojego widoku na podstawie typu orientacji
to znaczy.,
if(UIInterfaceOrientationIsLandscape(interfaceOrientation))
{
self.view.frame=CGRectMake(0,0,500,300);
}
else
{
self.view.frame=CGRectMake(0,0,300,400);
}
Jak radzić sobie z tą samą sytuacją w iOS 6 jako
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
został przestarzały w iOS6.
Używam następującego delegata, aby ustawić wszystkie orientacje.
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationAllMask;
}
Ale,
-(BOOL)shouldAutoRotate
{
return YES;
}
nie jest wywoływany. Jak poradzić sobie z tą sytuacją?