Upravit

Sdílet prostřednictvím


NSArray.FromArrayNative<T>(NSArray) Method

Definition

Returns a strongly-typed C# array of the parametrized type from a weakly typed NSArray.

public static T[] FromArrayNative<T> (Foundation.NSArray weakArray) where T : class, ObjCRuntime.INativeObject;
static member FromArrayNative : Foundation.NSArray -> 'T[] (requires 'T : null and 'T :> ObjCRuntime.INativeObject)

Type Parameters

T

Parameter type, determines the kind of array returned, can be either an NSObject, or other CoreGraphics data types.

Parameters

weakArray
NSArray

Handle to an weakly typed NSArray.

Returns

T[]

An C# array with the values.

Remarks

Use this method to get a set of NSObject arrays from an NSArray.

NSArray someArray = ...;

CGImage [] myImages = NSArray.FromArray<CGImage> (someArray);

Applies to