Inheritance: ObjectViewController
Example #1
0
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        window = new UIWindow(UIScreen.MainScreen.Bounds);
        var myViewController = new MyViewController();

        window.RootViewController = new UINavigationController(myViewController);
        window.MakeKeyAndVisible();
        return(true);
    }
Example #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController = new MyViewController();
            window.RootViewController = viewController;

            window.MakeKeyAndVisible();

            return true;
        }
Example #3
0
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        var window = (UIWindow) GetNativeField ("window");

        MyViewController controller = new MyViewController ("HelloWorld", NSBundle.MainBundle, this);
        UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque;
        window.AddSubview (controller.View);
        window.MakeKeyAndVisible ();

        return true;
    }
 public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
 {
     // Override point for customization after application launch.
     // If not required for your application you can safely delete this method
     window = new UIWindow(UIScreen.MainScreen.Bounds);
     initialViewController           = Storyboard.InstantiateInitialViewController() as MyViewController;
     initialViewController.LabelText = "Hello";
     window.RootViewController       = initialViewController;
     window.MakeKeyAndVisible();
     return(true);
 }
Example #5
0
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        var window = (UIWindow)GetNativeField("window");

        MyViewController controller = new MyViewController("HelloWorld", NSBundle.MainBundle, this);

        UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.BlackOpaque;
        window.AddSubview(controller.View);
        window.MakeKeyAndVisible();

        return(true);
    }
Example #6
0
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var vc = new MyViewController(this)
            {
                Autorotate = dvc.Autorotate
            };

            DatePicker              = CreatePicker();
            DatePicker.Frame        = PickerFrameWithSize(DatePicker.SizeThatFits(SizeF.Empty));
            vc.View.BackgroundColor = UIColor.Black;
            vc.View.AddSubview(DatePicker);
            dvc.ActivateController(vc, dvc);
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var ctrl = new MyViewController();

            Window.RootViewController = new UINavigationController(ctrl);
            Window.MakeKeyAndVisible();

            return(true);
        }
 public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
 {
     model = new CounterPickerDataModel(model.Counter);
     var vc = new MyViewController (this) {
         Autorotate = dvc.Autorotate
     };
     counterPicker = CreatePicker ();
     counterPicker.Frame = PickerFrameWithSize (counterPicker.SizeThatFits (SizeF.Empty));
     counterPicker.Model = model;
     for (int d = 0; d < model.Items.Count; d++) {
         counterPicker.Select(model.SelectedIndex[d], d, true);
     }
     vc.View.BackgroundColor = UIColor.Black;
     vc.View.AddSubview (counterPicker);
     dvc.ActivateController (vc);
 }
Example #9
0
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            model = new CounterPickerDataModel(model.Counter);
            var vc = new MyViewController(this)
            {
                Autorotate = dvc.Autorotate
            };

            counterPicker       = CreatePicker();
            counterPicker.Frame = PickerFrameWithSize(counterPicker.SizeThatFits(SizeF.Empty));
            counterPicker.Model = model;
            for (int d = 0; d < model.Items.Count; d++)
            {
                counterPicker.Select(model.SelectedIndex[d], d, true);
            }
            vc.View.BackgroundColor = UIColor.Black;
            vc.View.AddSubview(counterPicker);
            dvc.ActivateController(vc);
        }
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            model = new CounterPickerDataModel (model.Counter);
            var vc = new MyViewController (this) {
                    Autorotate = dvc.Autorotate
                };
            counterPicker = CreatePicker ();
            counterPicker.Frame = PickerFrameWithSize (counterPicker.SizeThatFits (SizeF.Empty));
            counterPicker.Model = model;
            for (int d = 0; d < model.Items.Count; d++) {
                counterPicker.Select (model.SelectedIndex [d], d, true);
            }

            // pass value changed
            model.ValueChanged += delegate {
                if (this.ValueChanged != null) {
                    Value = model.FormatValue ();
                    this.ValueChanged (this, new EventArgs ());
                }
            };

            // Add the background color
            vc.View.BackgroundColor = this.backgroundColor;
            vc.View.AddSubview (counterPicker);

            // back button

            if (customBackButton) {

                backControl.ValueChanged += (object sender, EventArgs e) => {
                    if(vc.NavigationController != null)
                        vc.NavigationController.PopViewControllerAnimated (true);
                };
                vc.NavigationItem.LeftBarButtonItem = backButton;
            }

            dvc.ActivateController (vc);
        }
Example #11
0
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            var vc = new MyViewController (this) {
                Autorotate = dvc.Autorotate
            };
            datePicker = CreatePicker ();
            datePicker.Frame = PickerFrameWithSize (datePicker.SizeThatFits (SizeF.Empty));

            vc.View.BackgroundColor = UIColor.Black;
            vc.View.AddSubview (datePicker);
            dvc.ActivateController (vc);
        }
        public override void Selected(DialogViewController dvc, UITableView tableView, NSIndexPath path)
        {
            model = new TimePickerDataModel(model.Time);
            var vc = new MyViewController (this) {
                Autorotate = dvc.Autorotate
            };
            counterPicker = CreatePicker ();
            counterPicker.Frame = PickerFrameWithSize (counterPicker.SizeThatFits (SizeF.Empty));
            counterPicker.Model = model;
            for (int d = 0; d < model.Times.Count; d++) {
                counterPicker.Select(model.SelectedIndex[d], d, true);
            }

            // pass value changed
            model.ValueChanged += delegate {
                if (this.ValueChanged != null) {
                    Value = model.FormatValue ();

                    this.ValueChanged (this, new EventArgs ());
                }
            };

            vc.View.BackgroundColor = backgroundColor;
            vc.View.AddSubview (counterPicker);
            dvc.ActivateController (vc);
        }
Example #13
0
 public ViewSource(MyViewController parentController)
 {
     _parentController = parentController;
 }