iOS Guides | Samples

UIKit.UIImageAsset Class

Holds a mapping of UITraitCollection keys to UIImage values.

See Also: UIImageAsset

Syntax

[Foundation.Register("UIImageAsset", true)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.None, null)]
public class UIImageAsset : NSObject, INSSecureCoding, IDisposable

Remarks

This is primarily used to hold images of varying resolutions appropriate to particular UITraitCollection displays.

Related content

Requirements

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

The members of UIKit.UIImageAsset are listed below.

See Also: NSObject

Public Constructors

Default constructor, initializes a new instance of this class.
A constructor that initializes the object from the data stored in the unarchiver object.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.

Public Methods

EncodeTo(NSCoder)
Encodes the state of the object on the provided encoder
FromTraitCollection(UITraitCollection) : UIImage
Returns the image from the asset that best matches traitCollection.
RegisterImage(UIImage, UITraitCollection)
Registers image with the asset and associates it with traitCollection.
UnregisterImageWithTraitCollection(UITraitCollection)
Finds the image that is associated with an exact match of traitCollection and unregisters from the image asset.