Balaji G
Balaji G

Reputation: 673

Dismiss UIAlertview programmatically in didReceiveLocalNotification

I am developing a application in iOS 7.1, that contains UILocalNotification. When my notification raise up, it goes to AppDelegate didReceiveLocalNotification delegate method. At the time my all screen closed and come to Notification screen [Which i designed for notification view] except UIAlertView.

If i use UIAlertView with delegate self, it will crash while press alertView button in Notification screen.

So how could i dismiss UIAlertView programmatically when i receive Notification.

Kindly help me to archive this.

Upvotes: 0

Views: 1437

Answers (1)

E-Riddie
E-Riddie

Reputation: 14780

To dismiss it programmatically use this:

[alert dismissWithClickedButtonIndex:0 animated:YES];

Upvotes: 1

Related Questions