0

I have many different views in app. While the application state is active I would like to have a generic response to remotenotifications that is not an alertview. One way to do this would be to place the notification observer in uinavigationcontroller rather than in the different view controllers and then place the notification element in navigationcontroller.view. However, thus far nothing appears in navigationcontroller.view when I try to add a label there. Has anyone had success doing this?

scribbler2309
  • 153
  • 1
  • 11

1 Answers1

0

If I understand correctly, it seems like you want to show a view whenever your app receives a remote notification and you want to be able to display the view from anywhere inside the app. If this is correct, the best approach would be to create a new UIWindow object and display that as an overlay on top of your app's main window. This answer describes how to create a UIWindow and display it. Additionally, this library does something similar to what you're trying to accomplish.

Community
  • 1
  • 1
Matt Lathrop
  • 16
  • 1
  • 3