iOS Guides | Samples

UIKit.UIImage.StretchableImage Method

Creates a stretchable image with the specified parameters. Deprecated in iOS 5, but still useful since the replacement is known to have bugs.

Syntax

[Foundation.Export("stretchableImageWithLeftCapWidth:topCapHeight:")]
[ObjCRuntime.ThreadSafe]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual UIImage StretchableImage (nint leftCapWidth, nint topCapHeight)

Parameters

leftCapWidth
Width of the left cap to be left unscaled.
topCapHeight
Height tof the top cap to be left unscaled.

Returns

A stretchable image.

Remarks

The more versatile replacement method that was introduced in iOS 5 crashes under some conditions, for more information, see: http://openradar.appspot.com/11411000.

This can be used from a background thread.

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0