// // 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); InvokeOnMainThread(delegate { TwitterAccount.getAccount(); }); flyoutController = new FlyOutNavigationController(); tl = new Timeline(flyoutController); flyoutController.NavigationRoot = new RootElement("") { new Section("Navigation") { new StringElement("Timeline") } }; flyoutController.ViewControllers = new UIViewController[] { new UINavigationController(tl) }; window.AddSubview(flyoutController.View); // 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) { window = new UIWindow (UIScreen.MainScreen.Bounds); UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackTranslucent; viewController = new FlyOutNavigationController (); viewController.NavigationRoot = new RootElement ("") { new Section ("Section 1"){ new StringElement ("View 1"), new ImageStringElement("View 2",UIImage.FromFile("jhill.jpeg")), new StringElement ("View 3"), }, new Section ("Section 2"){ new StringElement ("View 1"), new StringElement ("View 2"), } }; viewController.ViewControllers = new UIViewController[]{ new UINavigationController (new BaseDialogViewController (viewController, new RootElement ("Section 1"){new Section (){new StringElement ("View 1")}})) ,new UINavigationController (new BaseDialogViewController (viewController, new RootElement ("Section 1"){new Section (){new StringElement ("View 2")}})) ,new UINavigationController (new BaseDialogViewController (viewController, new RootElement ("Section 1"){new Section (){new StringElement ("View 3")}})) ,new UINavigationController (new BaseDialogViewController (viewController, new RootElement ("Section 2"){new Section (){new StringElement ("View 1")}})) ,new UINavigationController (new BaseDialogViewController (viewController, new RootElement ("Section 2"){new Section (){new StringElement ("View 2")}})) }; window.RootViewController = viewController; window.MakeKeyAndVisible (); return true; }
public TweetView(Tweet tweet, FlyOutNavigationController navigation) : base(null) { this.tweet = tweet; this.navigation = navigation; Initialize(); }
public TaskPageController(FlyOutNavigationController navigation, string title) : base(null) { Root = new RootElement (title) { new Section { new CheckboxElement (title) } }; NavigationItem.LeftBarButtonItem = new UIBarButtonItem (UIBarButtonSystemItem.Action, delegate { navigation.ToggleMenu (); }); }
public OpenMenuGestureRecognizer(NSObject target, Selector action, FlyOutNavigationController parent) : base(target, action) { Parent = parent; this.Direction = UISwipeGestureRecognizerDirection.Right; this.ShouldReceiveTouch += (sender, touch) => { if (touch.View is UISlider || touch.View is MPVolumeView) { return(false); } return(Parent.shouldReceiveTouch(sender, touch)); }; }
public override void ViewDidLoad() { base.ViewDidLoad (); // Create the flyout view controller, make it large, // and add it as a subview: navigation = new FlyOutNavigationController (); navigation.View.Frame = UIScreen.MainScreen.Bounds; View.AddSubview (navigation.View); // Create the menu: navigation.NavigationRoot = new RootElement ("Task List") { new Section ("Task List") { from page in Tasks select new StringElement (page) as Element } }; // Create an array of UINavigationControllers that correspond to your // menu items: navigation.ViewControllers = Array.ConvertAll (Tasks, title => new UINavigationController (new TaskPageController (navigation, title)) ); }
public BaseDialogViewController(FlyOutNavigationController navigation, RootElement root) : base(root) { this.navigation = navigation; }
public Timeline(FlyOutNavigationController nav) : base(null) { navigation = nav; Initialize(); }