-
The name of a JPG or PNG image.
Declaration
Swift
public let name: String? -
The size of the image.
Declaration
Swift
public let size: CGSize -
The type of asset (
.image).Declaration
Swift
public let type: AssetType -
Creates a new ImageAsset using an image found in a Bundle by its name.
Declaration
Swift
public init(name: String?, bundle: Bundle = Bundle.main, size: CGSize? = nil)Parameters
nameThe name of the image
bundleThe bundle the image is found in
sizeThe size of the image. If none is specified, the loaded image size will be used.
-
Creates a new ImageAsset using a specified image.
Declaration
Swift
public init(image: UIImage?, size: CGSize? = nil)Parameters
imageThe image to use.
sizeThe size of the image. If none is specified, the loaded image size will be used.
View on GitHub
ImageAsset Structure Reference