iOS Guides | Samples

MonoTouch.UIKit.UIImage.CreateResizableImage Method

Creates a new image, based on the current, with the specified capInsets and resizingMode.

Syntax

[MonoTouch.Foundation.Export("resizableImageWithCapInsets:resizingMode:")]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 6, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.ThreadSafe]
public virtual UIImage CreateResizableImage (UIEdgeInsets capInsets, UIImageResizingMode resizingMode)

Parameters

capInsets
This argument lets you specify the top, left, bottom and right inset (the sizes of your images).
resizingMode
Controls whether the areas are stretched or tiled.

Returns

Remarks

Consider the following image, the capInsets specify these borders:

The resizing mode controls whether the image is stretched or tiled

This can be used from a background thread.

Requirements

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