示例#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);
        }
示例#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);
        }