Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save taktamur/b054e8844b2d30f15c24 to your computer and use it in GitHub Desktop.
Save taktamur/b054e8844b2d30f15c24 to your computer and use it in GitHub Desktop.
Xamarinで遊ぶ(3) objcの「デリゲート」とC#の「イベント」が干渉する ref: http://qiita.com/paming/items/682430866791dfba86e2
A1 delegate == nil? YES
B1 weakDelegate=MyTasky.NumberTableViewControllerController
A2 delegate == nil? YES
B2 weakDelegate=MonoTouch.UIKit.UIScrollView+_UIScrollViewDelegate
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
Console.WriteLine ("A1 delegate == nil? {0}", (this.TableView.Delegate == null) ? "YES" : "NO");
Console.WriteLine ("B1 weakDelegate={0}", this.TableView.WeakDelegate.GetType ());
this.TableView.DecelerationStarted += (sender, e) => {
Console.WriteLine ("scrolled.");
};
Console.WriteLine ("A2 delegate == nil? {0}", (this.TableView.Delegate == null) ? "YES" : "NO");
Console.WriteLine ("B2 weakDelegate={0}", this.TableView.WeakDelegate.GetType ());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment