iOS Guides | Samples

MonoTouch.UIKit.UIScrollViewGetZoomView Delegate

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

Syntax

public delegate UIView UIScrollViewGetZoomView (UIScrollView scrollView)

See Also

Parameters

scrollView
The UIScrollView on whose behalf this method is being called.

Returns

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

Remarks

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

Requirements

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

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

See Also: Delegate