Esempio n. 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            panvc = new ImagePanViewController (new CMMotionManager ());
            panvc.WillMoveToParentViewController (this);
            AddChildViewController (panvc);
            View.AddSubview (panvc.View);

            panvc.View.Frame = View.Bounds;
            panvc.View.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
            panvc.DidMoveToParentViewController (this);

            var img = UIImage.FromFile ("melbourne.jpg");
            panvc.ConfigureWithImage (img);
        }
Esempio n. 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            panvc = new ImagePanViewController(new CMMotionManager());
            panvc.WillMoveToParentViewController(this);
            AddChildViewController(panvc);
            View.AddSubview(panvc.View);

            panvc.View.Frame            = View.Bounds;
            panvc.View.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;
            panvc.DidMoveToParentViewController(this);

            var img = UIImage.FromFile("melbourne.jpg");

            panvc.ConfigureWithImage(img);
        }