Проблема может быть воспроизведена только в iOS 7.
В функции делегата:- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
, если создается UIAlertView, представление предупреждений не может автоматически вращаться. Вот пример кода:
- (IBAction)buttonTapped:(id)sender
{
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@"action sheet"
delegate:self
cancelButtonTitle:@"cancel"
destructiveButtonTitle:@"ok"
otherButtonTitles:nil];
[actionSheet showInView:self.view];
}
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"alert"
message:nil
delegate:self
cancelButtonTitle:@"ok"
otherButtonTitles:nil];
[alert show];
}
Это баг iOS 7? Если да, есть ли способ сделать так, чтобы вид оповещения автоматически поворачивался вместе с другим видом на экране?