Пример #1
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);

			PinchLayout pinchLayout = new PinchLayout ();
			pinchLayout.ItemSize = new SizeF (100.0f, 100.0f);

			window.RootViewController = (new ViewController (pinchLayout));
			window.MakeKeyAndVisible ();
			
			return true;
		}
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            PinchLayout pinchLayout = new PinchLayout();

            pinchLayout.ItemSize = new SizeF(100.0f, 100.0f);

            window.RootViewController = (new ViewController(pinchLayout));
            window.MakeKeyAndVisible();

            return(true);
        }
Пример #3
0
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) {
				app.SetStatusBarStyle (UIStatusBarStyle.LightContent, false);
				var frame = window.Frame;
				frame.Y = 20;
				window.Frame = frame;
			}

			PinchLayout pinchLayout = new PinchLayout ();
			pinchLayout.ItemSize = new CGSize (100.0f, 100.0f);

			window.RootViewController = (new ViewController (pinchLayout));
			window.MakeKeyAndVisible ();

			return true;
		}
Пример #4
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0))
            {
                app.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
                var frame = window.Frame;
                frame.Y      = 20;
                window.Frame = frame;
            }

            PinchLayout pinchLayout = new PinchLayout();

            pinchLayout.ItemSize = new SizeF(100.0f, 100.0f);

            window.RootViewController = (new ViewController(pinchLayout));
            window.MakeKeyAndVisible();

            return(true);
        }
Пример #5
0
        public void handlePinchGesture(UIPinchGestureRecognizer sender)
        {
            PinchLayout pinchLayout = (PinchLayout)CollectionView.CollectionViewLayout;

            switch (sender.State)
            {
            case UIGestureRecognizerState.Began:
                PointF initialPinchPoint = sender.LocationInView(CollectionView);
                pinchLayout.pinchedCellPath = CollectionView.IndexPathForItemAtPoint(initialPinchPoint);
                break;

            case UIGestureRecognizerState.Changed:
                pinchLayout.setPinchedCellScale(sender.Scale);
                pinchLayout.setPinchedCellCenter(sender.LocationInView(CollectionView));
                break;

            default:
                CollectionView.PerformBatchUpdates(delegate {
                    pinchLayout.pinchedCellPath = null;
                    pinchLayout.setPinchedCellScale(1.0f);
                }, null);
                break;
            }
        }