Для того, чтобы сделать то, что вы хотите, вы должны вручную повернуть (и изменить размер) вашего вида. Нет свойства, которое вы можете изменить, чтобы сделать то, что вы хотите. код для регистрации вращения устройства событий.
- (void)viewDidLoad {
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification object:nil];
//Whenever the device orientation changes, orientationChanged will be called
}
- (void)orientationChanged:(NSNotification *)notification
{
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
//Based upon which orientation the device is in, update your View rotations.
//A simple view.transform = CGAffineTransformMakeRotation(whatever); will work well.
}
Я считаю, вы должны удалить shouldAutoRotateToInterfaceO rientation: функция вообще. Вы также должны позвонить [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
, когда ваш вид выгружается.