// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); // If you have defined a view, add it here: // window.AddSubview (navigationController.View); var storyMenuItemImage = UIImage.FromFile("Images/bg-menuitem.png"); var storyMenuItemImagePressed = UIImage.FromFile("Images/bg-menuitem-highlighted.png"); var starImage = UIImage.FromFile("Images/icon-star.png"); var starMenuItem1 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); var starMenuItem2 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); var starMenuItem3 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); MonoKit.UI.AwesomeMenu.Menu menu = new MonoKit.UI.AwesomeMenu.Menu(this.window.Bounds, new[] { starMenuItem1, starMenuItem2, starMenuItem3 } ); menu.MenuItemSelected += (sender, e) => Console.WriteLine(e.Selected); menu.BackgroundColor = UIColor.White; this.window.AddSubview(menu); // make the window visible window.MakeKeyAndVisible(); return(true); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); // If you have defined a view, add it here: // window.AddSubview (navigationController.View); var storyMenuItemImage = UIImage.FromFile("Images/bg-menuitem.png"); var storyMenuItemImagePressed = UIImage.FromFile("Images/bg-menuitem-highlighted.png"); var starImage = UIImage.FromFile("Images/icon-star.png"); var starMenuItem1 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); var starMenuItem2 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); var starMenuItem3 = new MonoKit.UI.AwesomeMenu.MenuItem(storyMenuItemImage, storyMenuItemImagePressed, starImage); MonoKit.UI.AwesomeMenu.Menu menu = new MonoKit.UI.AwesomeMenu.Menu(this.window.Bounds, new[] { starMenuItem1, starMenuItem2, starMenuItem3 } ); menu.MenuItemSelected += (sender, e) => Console.WriteLine(e.Selected); menu.BackgroundColor = UIColor.White; this.window.AddSubview(menu); // make the window visible window.MakeKeyAndVisible(); return true; }