iOS Guides | Samples

MonoTouch.UIKit.UIScrollViewGetZoomView Delegate

A delegate signature used by UIScrollView's UIScrollView.ViewForZoomingInScrollView that specifies which view to render during zoom.


public delegate UIView UIScrollViewGetZoomView (UIScrollView scrollView)

See Also


The UIScrollView on whose behalf this method is being called.


The UIView that should be zoomed when the scrollView is zooming.


The UIScrollView.ViewForZoomingInScrollView in UIScrollView needs to be assigned for zooming to work. For instance, in this code taken from the "Scroll View" section of the "iOS Standard Controls" example, a UIImageView is created and added as a subview of the UIScrollView and then used as the return value from the UIScrollView.ViewForZoomingInScrollView delegate:

C# Example

// create our image view
imageView = new UIImageView (UIImage.FromFile ("Images/Icons/512_icon.png"));
scrollView.ContentSize = imageView.Image.Size;
scrollView.MaximumZoomScale = 3f;
scrollView.MinimumZoomScale = .1f;
scrollView.AddSubview (imageView);
scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => {
	return imageView; 

Related content


Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions:

The members of MonoTouch.UIKit.UIScrollViewGetZoomView are listed below.

See Also: Delegate