In my Apple Watch app, I update the title text via self.setTitle("some title")
. The problem is, that if that code gets triggered on Controller A while Controller B is present, A, the one in the "background", (e.g. in a hierarchical/Master-Detail design) changes the title although B is showing.
What's the best way to get around this? I tried looking for a way to do something like
if (self.navigationController.topViewController == self) {
self.setTitle("Chats (live)")
}
but this isn't available on Watchos.
How else can I achieve this?