// - Configure scrollView to display new image (tiled or not)
        public void DisplayTiledImageNamed(string imageName, CGSize image_Size)
        {
            //clear views for the previous image
            if (zoomView != null)
            {
                zoomView.RemoveFromSuperview();
                zoomView   = null;
                tilingView = null;
            }
            ZoomScale = 1.0f;

            //make views to display the new image
            zoomView = new UIImageView(new CGRect(CGPoint.Empty, image_Size))
            {
                Image = PlaceholderImageNamed(imageName)
            };

            AddSubview(zoomView);
            tilingView = new TilingView(imageName, image_Size)
            {
                Frame = zoomView.Bounds
            };

            zoomView.AddSubview(tilingView);
            ConfigureForImageSize(image_Size);
        }
示例#2
0
        // - Configure scrollView to display new image (tiled or not)
 #if TILE_IMAGES
        public void DisplayTiledImageNamed(string imageName, SizeF image_Size)
        {
            //clear views for the previous image
            if (zoomView != null)
            {
                zoomView.RemoveFromSuperview();
                zoomView   = null;
                tilingView = null;
            }
            this.ZoomScale = 1.0f;

            //make views to display the new image
            zoomView = new UIImageView(new RectangleF(PointF.Empty, image_Size))
            {
                Image = PlaceholderImageNamed(imageName)
            };

            this.AddSubview(zoomView);
            tilingView = new TilingView(imageName, image_Size)
            {
                Frame = zoomView.Bounds
            };

            zoomView.AddSubview(tilingView);
            ConfigureForImageSize(image_Size);

            // Return the view to use when zooming
            ViewForZoomingInScrollView = (sv) => zoomView;
        }
		// - Configure scrollView to display new image (tiled or not)
 #if TILE_IMAGES
		public void DisplayTiledImageNamed (string imageName, SizeF image_Size)
		{
			//clear views for the previous image
			if (zoomView != null) {
				zoomView.RemoveFromSuperview ();
				zoomView = null;
				tilingView = null;
			}
			this.ZoomScale = 1.0f;
		
	    	//make views to display the new image
			zoomView = new UIImageView (new RectangleF (PointF.Empty, image_Size)) {
				Image = PlaceholderImageNamed (imageName)
			};

			this.AddSubview(zoomView);
			tilingView = new TilingView (imageName, image_Size) {
				Frame = zoomView.Bounds
			};

			zoomView.AddSubview (tilingView);
			ConfigureForImageSize (image_Size);

			// Return the view to use when zooming
			ViewForZoomingInScrollView = (sv) => zoomView;
		}
		// - Configure scrollView to display new image (tiled or not)
		public void DisplayTiledImageNamed (string imageName, CGSize image_Size)
		{
			//clear views for the previous image
			if (zoomView != null) {
				zoomView.RemoveFromSuperview ();
				zoomView = null;
				tilingView = null;
			}
			ZoomScale = 1.0f;

			//make views to display the new image
			zoomView = new UIImageView (new CGRect (CGPoint.Empty, image_Size)) {
				Image = PlaceholderImageNamed (imageName)
			};

			AddSubview (zoomView);
			tilingView = new TilingView (imageName, image_Size) {
				Frame = zoomView.Bounds
			};

			zoomView.AddSubview (tilingView);
			ConfigureForImageSize (image_Size);
		}