Exemplo n.º 1
0
        //
        // 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;
        }
Exemplo n.º 2
0
        //
        // 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;
        }
Exemplo n.º 3
0
        public TweetView(Tweet tweet, FlyOutNavigationController navigation)
            : base(null)
        {
            this.tweet = tweet;
            this.navigation = navigation;

            Initialize();
        }
Exemplo n.º 4
0
 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 ();
     });
 }
Exemplo n.º 5
0
 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));
     };
 }
Exemplo n.º 6
0
        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))
            );
        }
Exemplo n.º 7
0
 public BaseDialogViewController(FlyOutNavigationController navigation, RootElement root)
     : base(root)
 {
     this.navigation = navigation;
 }
Exemplo n.º 8
0
 public Timeline(FlyOutNavigationController nav)
     : base(null)
 {
     navigation = nav;
     Initialize();
 }