I am trying to post a notification in a view from my application to another using NSNotificationCenter. Therefore, in my destination class, I create my observer as follows:
NSNotificationCenter.DefaultCenter.AddObserver ("ChangeLeftSide", delegate {ChangeLeftSide(null);});
and I have my method:
public void ChangeLeftSide (UIViewController vc) { Console.WriteLine ("Change left side is being called"); }
Now from another UIViewController I am sending a notification as follows:
NSNotificationCenter.DefaultCenter.PostNotificationName("ChangeLeftSide", this);
How can I access the view controller that is sent in my mail notification in my target class? In iOS, this is very straight forward, but I can not find my way in monotouch (Xamarin) ...
P. Sami
source share