示例#1
0
 public static SeparatorCell 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 SeparatorCell("{}");
     var views = NSBundle.MainBundle.LoadNib("SeparatorCell", cell, null);
     var cell2 = Runtime.GetNSObject( views.ValueAt(0) ) as SeparatorCell;
     cell2.Initialise();
     return cell2;
 }
示例#2
0
        public static SeparatorCell 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 SeparatorCell("{}");
            var views = NSBundle.MainBundle.LoadNib("SeparatorCell", cell, null);
            var cell2 = Runtime.GetNSObject(views.ValueAt(0)) as SeparatorCell;

            cell2.Initialise();
            return(cell2);
        }