Szerkesztés

Megosztás a következőn keresztül:


UIScrollViewGetZoomView Delegate

Definition

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

public delegate UIKit.UIView UIScrollViewGetZoomView(UIScrollView scrollView);
type UIScrollViewGetZoomView = delegate of UIScrollView -> UIView

Parameters

scrollView
UIScrollView

The UIScrollView on whose behalf this method is being called.

Return Value

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

Remarks

The 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 ViewForZoomingInScrollView delegate:

// 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; 
};          

Applies to

See also