Я хочу, чтобы мгновенное вращение экрана было ориентировано на него. В моем ViewController есть один UIImage и один UILabel. Я делаю так:iPhone: экран вращается, а затем сбой приложения
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
[self willRotateToInterfaceOrientation:[self interfaceOrientation] duration:0];
}
Без приложения линии не откажет:
[self willRotateToInterfaceOrientation:[self interfaceOrientation] duration:0];
С линией кода пытается установить продолжительность до нуля приложение аварий сразу после отделки вращения.
Любая идея, что я делаю неправильно?
спасибо.
Это действительно работает. Благодаря! – TxabiGG