Last active
August 29, 2015 14:05
-
-
Save taktamur/b054e8844b2d30f15c24 to your computer and use it in GitHub Desktop.
Xamarinで遊ぶ(3) objcの「デリゲート」とC#の「イベント」が干渉する ref: http://qiita.com/paming/items/682430866791dfba86e2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A1 delegate == nil? YES | |
| B1 weakDelegate=MyTasky.NumberTableViewControllerController | |
| A2 delegate == nil? YES | |
| B2 weakDelegate=MonoTouch.UIKit.UIScrollView+_UIScrollViewDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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