public NewsDialogViewController() : base(UITableViewStyle.Plain, null) { View.BackgroundColor = UIColor.White; TableView.BackgroundColor = UIColor.White; var section = new Section(); // creates the rows using MT.Dialog foreach (var item in newsItems) { var published = item.Item1; var image = CustomBadgeElement.MakeCalendarBadge( published.ToString("MMM").ToUpper() , published.ToString("dd")); var badgeRow = new BadgeElement(image, item.Item2); badgeRow.Tapped += () => { var dv = new DrawingViewController(); NavigationController.PushViewController(dv, true); }; section.Add(badgeRow); } Root = new RootElement("PaintCode examples") { section }; }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); navCtrlr = new UINavigationController(); navCtrlr.NavigationBar.Translucent = false; blue = new BlueButtonViewController(); glossy = new GlossyButtonViewController(); lineart = new DrawingViewController(); news = new NewsDialogViewController(); // news.View.Frame = new System.Drawing.RectangleF (0 // , UIApplication.SharedApplication.StatusBarFrame.Height // , UIScreen.MainScreen.ApplicationFrame.Width // , UIScreen.MainScreen.ApplicationFrame.Height); navCtrlr.PushViewController(news, false); navCtrlr.TabBarItem = new UITabBarItem("Calendar", UIImage.FromBundle("Images/about.png"), 0); blue.TabBarItem = new UITabBarItem("Blue Button", UIImage.FromBundle("Images/about.png"), 0); glossy.TabBarItem = new UITabBarItem("Glossy Button", UIImage.FromBundle("Images/about.png"), 0); lineart.TabBarItem = new UITabBarItem("Line Art", UIImage.FromBundle("Images/about.png"), 0); tabBarController = new UITabBarController(); tabBarController.ViewControllers = new UIViewController [] { navCtrlr, blue, glossy, lineart }; window.RootViewController = tabBarController; // make the window visible window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching (UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow (UIScreen.MainScreen.Bounds); navCtrlr = new UINavigationController (); navCtrlr.NavigationBar.Translucent = false; blue = new BlueButtonViewController (); glossy = new GlossyButtonViewController (); lineart = new DrawingViewController (); news = new NewsDialogViewController (); // news.View.Frame = new System.Drawing.RectangleF (0 // , UIApplication.SharedApplication.StatusBarFrame.Height // , UIScreen.MainScreen.ApplicationFrame.Width // , UIScreen.MainScreen.ApplicationFrame.Height); navCtrlr.PushViewController (news, false); navCtrlr.TabBarItem = new UITabBarItem ("Calendar", UIImage.FromBundle ("Images/about.png"), 0); blue.TabBarItem = new UITabBarItem ("Blue Button", UIImage.FromBundle ("Images/about.png"), 0); glossy.TabBarItem = new UITabBarItem ("Glossy Button", UIImage.FromBundle ("Images/about.png"), 0); lineart.TabBarItem = new UITabBarItem ("Line Art", UIImage.FromBundle ("Images/about.png"), 0); tabBarController = new UITabBarController (); tabBarController.ViewControllers = new UIViewController [] { navCtrlr, blue, glossy, lineart }; window.AddSubview (tabBarController.View); // make the window visible window.MakeKeyAndVisible (); return true; }
public NewsDialogViewController () : base (UITableViewStyle.Plain, null) { View.BackgroundColor = UIColor.White; TableView.BackgroundColor = UIColor.White; var section = new Section (); // creates the rows using MT.Dialog foreach (var item in newsItems) { var published = item.Item1; var image = CustomBadgeElement.MakeCalendarBadge ( published.ToString ("MMM").ToUpper () , published.ToString ("dd")); var badgeRow = new BadgeElement (image, item.Item2); badgeRow.Tapped += () => { var dv = new DrawingViewController (); NavigationController.PushViewController (dv, true); }; section.Add (badgeRow); } Root = new RootElement ("PaintCode examples") { section }; }