Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3949

How to access the currently active iOS screen?

$
0
0

Hello,

With NotificationCenter added to my iOS device I can request a token for remote notifications.The event RemoteRegistrationSucceeded() get called with a token.

The problem that I am facing right now is that I added a switch to my settings screen that needs to be set to true after the token is received. But from within the NotificationCenter class I cannot access ScreenSettings.switchNotificationsEnabled control directly.

So I was trying to find a way to detect which screen is currently active but it turns out that app.CurrentLayout.Content is the main screen while the settings screen is loaded wit the Show() function and now on top of the screen stack.

I am unable to find a way to get a reference to the currently opened screen in the screen stack?

So I’m stuck. How can I set my switch to true after receiving the token in the NotificationCenter class?

5 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3949

Trending Articles