コード例 #1
0
        public override void ViewWillLayoutSubviews()
        {
            base.ViewWillLayoutSubviews();

            ScalingImageView.Frame = View.Bounds;

            if (LoadingView != null)
            {
                LoadingView.SizeToFit();
                LoadingView.Center = new CGPoint(View.Bounds.GetMidX(), View.Bounds.GetMidY());
            }
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _notificationCenter.AddObserver(this, new Selector("photoImageUpdatedWithNotification:"), new NSString(PhotoViewControllerPhotoImageUpdatedNotification), null);

            ScalingImageView.Frame = View.Bounds;
            View.AddSubview(ScalingImageView);

            if (LoadingView != null)
            {
                View.AddSubview(LoadingView);
                LoadingView.SizeToFit();
            }

            View.AddGestureRecognizer(DoubleTapGestureRecognizer);
            View.AddGestureRecognizer(_longPressGestureRecognizer);
        }