, UIApplication.SharedApplication.StatusBarFrame.Height
, UIScreen.MainScreen.ApplicationFrame.Width
, UIScreen.MainScreen.ApplicationFrame.Height);
window.AddSubview (iPhoneHome.View);
return true;
}
}
}
using System;
using System.Drawing;
using System.Collections.Generic;
using MonoTouch.UIKit;
namespace BasicTable
{
public class HomeScreen : UIViewController
{
public HomeScreen ()
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
UITableView table = new UITableView (View.Bounds); //defaults to Plain style
table.AutoresizingMask = UIViewAutoresizing.All;
string[] tableItems = new string[] { "Vegetables", "Fruits", "Flower Buds", "Legumes", "Bulbs", "Tubers" };
table.Source = new TableSource (tableItems);
this.View.Add (table);
}
}
}
) {
cell.ImageView.Image = UIImage.FromFile ("Images/Icons/50_icon.png");
}
cell.TextLabel.Text = tableItems [indexPath.Row];
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
cell.DetailTextLabel.Text = "kkkk";
return cell;
}
//...
}
}
效果图如下: