Is it possible to switch a view without a button?
I got only so far to be able to switch a vi开发者_如何学Pythonew 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?
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.
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.
精彩评论