init(uiImage:size:device:)
Creates a new image from a UIImage.
Declaration
convenience init?(uiImage: UIImage, size: CGSize, device: any MTLDevice)Parameters
- uiImage:
The UIKit image to create the texture from.
- size:
The size of the image in points.
- device:
The Metal device used to create the texture.
Return Value
A new TCControlImage instance, or nil if the UIImage has no backing CGImage or if texture creation fails.