-
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
name
The name of the image
bundle
The bundle the image is found in
size
The 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
image
The image to use.
size
The size of the image. If none is specified, the loaded image size will be used.