コード例 #1
0
ファイル: TweetCell.cs プロジェクト: JoanMiro/MvxMod
		public static TweetCell LoadFromNib()
		{
			// this bizarre loading sequence is modified from a blog post on AlexYork.net
			// basically we create an empty cell in C#, then pass that through a NIB loading, which then magically
			// gives us a new cell back in MonoTouch again
			
			var cell = new TweetCell("{}");
			var views = NSBundle.MainBundle.LoadNib("TweetCell", cell, null);
			var view0 = Runtime.GetNSObject( views.ValueAt(0) );
			var cell2 = view0 as TweetCell;
			return cell2;
		}
コード例 #2
0
        public static TweetCell LoadFromNib()
        {
            // this bizarre loading sequence is modified from a blog post on AlexYork.net
            // basically we create an empty cell in C#, then pass that through a NIB loading, which then magically
            // gives us a new cell back in MonoTouch again

            var cell  = new TweetCell("{}");
            var views = NSBundle.MainBundle.LoadNib("TweetCell", cell, null);
            var view0 = Runtime.GetNSObject(views.ValueAt(0));
            var cell2 = view0 as TweetCell;

            return(cell2);
        }