ios - Determine which View is currently open and get variable from this view -


i writing program using xcode 8.3.3 swift 3.1 ios 10. program messenger, can send , receive messages other users. application has several screens (contacts, stats, chats, etc.) , 1 background thread receives incoming messages. need determine should show user new incoming message or not. mean if single chat screen open not need show user message, on other screen need show pop view. need determine, view open , receive variable view (in case var chat: chat!, contains chat id) determine chat received message. every messenger has similar functionality: whatsapp, viber. knows how this? thankful or advice.

i not understand: why question going down? whats wrong it?

i think case each of views must have own chatid , when receiving message have compare chatid of message , view


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -