Piyush Verma
Piyush Verma

Reputation: 200

Alert message not rotating in IOS8

I am building an iPhone app which shows an alert message when a particular button is tapped. Auto-rotaion is in ON state. When i rotate my phone the whole app view as well as the alert message rotates in iOS7 But, in iOS8 views are rotated except alert message`

Upvotes: 4

Views: 156

Answers (2)

Piyush Verma
Piyush Verma

Reputation: 200

UIAlertView does not work properly in iOS8 The, iOS8 uses a new UIAlertController The given linked worked for my case.

Reference Link

Upvotes: 2

dheeru
dheeru

Reputation: 395

This is happening because the iOS not able to understand the multiple operation at a time .You can call the UIalertview with delay like .I have same issue with iOS8 this code is working fine for me.

[self performSelector:@selector(showAlert) withObject:nil afterDelay:0.5];

-(void)showAlert
{
    UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Your alert Title." message:@"Your alert Message." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
    [alert show];
}

Upvotes: 0

Related Questions