0

i have this code when i popup a modal in my MainViewController

ModalViewController controller = Storyboard.InstantiateViewController ("ModalViewController") as ModalViewController;
this.PresentViewController(controller,true,null);

and at the other end in my ModalViewController I have here an event where this will be dismiss. and I use this code. DismissViewController(true,null); is it possible that my MainViewController can catch the event when my modal is dismiss?

Francis
  • 93
  • 3
  • 10

2 Answers2

0

Yes, you need to use delegate pattern to handle it. if you are new to delegate then look here for delegation in Swift

Community
  • 1
  • 1
Retro
  • 3,985
  • 2
  • 17
  • 41
0

You could also just use the Xamarin pub/sub MessagingCenter: http://developer.xamarin.com/guides/cross-platform/xamarin-forms/messaging-center/

NovaJoe
  • 4,595
  • 6
  • 29
  • 43