Akhil Bhadauria
Akhil Bhadauria

Reputation: 110

UIAlertView issue in iOS 9

After upgrading to iOS9 my UIAlertview or UIAlertcontroller doesn't show the alert, only the transparent black background that comes with it!

Can anyone suggest what am I doing wrong!. Below iOS 9 versions everything is working fine.

enter image description here

Upvotes: 1

Views: 311

Answers (2)

Ankur Batham- AB
Ankur Batham- AB

Reputation: 1

May be some thing is already working on main thread so that alert view is not visible.Please try this

 [[NSOperationQueue mainQueue] addOperationWithBlock:^{ 

alert = [[UIAlertView alloc]initWithTitle:@"" message:[NSString stringWithFormat:@"Reload data ?"] delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"Cancel", nil]; 


 [alert show];

 }];

Upvotes: 0

Abhinandan Pratap
Abhinandan Pratap

Reputation: 2148

I am using this piece of code for showing UIAlertView and it's working fine for me,

    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"" 
    message:@"" 
    delegate:self 
    cancelButtonTitle:@"" 
    otherButtonTitles:@"", ..., nil];

    [alert show];

Upvotes: 1

Related Questions