Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

MessagingCenter Unsubscribe Ondisappearing

$
0
0

I have a MainPage that I am listening messages. Subscribing messages on MainPage's Onappearing() method and unsubsribing from messages OnDisappearing() method.

I also have a ModalPage which a call from MainPage. That ModalPage is sending messages.

On Android: when I navigate to modalpage, ondisappearing() method is NOT firing. Which is good (or at least what I expected) so I can listen my messages.

On iOS: when I navigate to modalpage, it FIRES ondisappearing() method. It unsubscribes messages and as a result I am not able to listen my messages coming from my modalpage.

Is this a bug since event firing is not consistent between platforms. Any workaround to my problem is highly appreciated. Thank you.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>