Frank
Frank

Reputation: 1

Is it possible to switch a view without a button?

I got only so far to be able to switch a view by pressing a button or with a timer. But I don't get it to switch a view by events like didReceiveLocalNotification. Is it impossible to do this?

Upvotes: 0

Views: 194

Answers (2)

user756245
user756245

Reputation:

Yes, all you have to do is doing the switch inside the method didReceiveLocalNotification. You will need to send a message to the view controller you want to perform the switch.

Upvotes: 0

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31722

Yes, that's possible , Because usually we specify the method with notification in which we wish to receive it.

Put the same code from your UIButton action: to notification method.

Upvotes: 1

Related Questions