One Logo Pool Ball
UIKit · IOS API REFERENCE

UIImage

class · iOS 2.0+ · SDK 27.1

class UIImage

Members (74)

method · iOS 17.0+

heicData

TypeScript
heicData(): (ArrayBuffer) | null
Swift declaration
func heicData() -> Data?
method

jpegData

TypeScript
jpegData(compressionQuality: number): (ArrayBuffer) | null
Swift declaration
func jpegData(compressionQuality: CGFloat) -> Data?
method

pngData

TypeScript
pngData(): (ArrayBuffer) | null
Swift declaration
func pngData() -> Data?
static · iOS 5.0+

animatedImageNamed

TypeScript
static animatedImageNamed(name: string, duration: number): (UIImage) | null
Swift declaration
class func animatedImageNamed(_ name: String, duration: TimeInterval) -> UIImage?
static · iOS 5.0+

animatedImage

TypeScript
static animatedImage(images: Array<UIImage>, duration: number): (UIImage) | null
Swift declaration
class func animatedImage(with images: [UIImage], duration: TimeInterval) -> UIImage?
static · iOS 5.0+

animatedResizableImageNamed

TypeScript
static animatedResizableImageNamedCapInsetsDuration(name: string, capInsets: { top: number; left: number; bottom: number; right: number }, duration: number): (UIImage) | null
Swift declaration
class func animatedResizableImageNamed(_ name: String, capInsets: UIEdgeInsets, duration: TimeInterval) -> UIImage?
static · iOS 6.0+

animatedResizableImageNamed

TypeScript
static animatedResizableImageNamedCapInsetsResizingModeDuration(name: string, capInsets: { top: number; left: number; bottom: number; right: number }, resizingMode: UIImage_ResizingMode, duration: number): (UIImage) | null
Swift declaration
class func animatedResizableImageNamed(_ name: String, capInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode, duration: TimeInterval) -> UIImage?
init · iOS 2.0+

init

TypeScript
static initNamed(name: string): (UIImage) | null
Swift declaration
init?(named name: String)
init · iOS 8.0+

init

TypeScript
static initNamedInCompatibleWith(name: string, bundle?: (_Foundation_Bundle) | null, traitCollection?: (UITraitCollection) | null): (UIImage) | null
Swift declaration
init?(named name: String, in bundle: Bundle?, compatibleWith traitCollection: UITraitCollection?)
init · iOS 13.0+

init

TypeScript
static initNamedInWith(name: string, bundle?: (_Foundation_Bundle) | null, configuration?: (UIImage_Configuration) | null): (UIImage) | null
Swift declaration
init?(named name: String, in bundle: Bundle?, with configuration: UIImage.Configuration?)
init · iOS 13.0+

init

TypeScript
static initSystemName(name: string): (UIImage) | null
Swift declaration
init?(systemName name: String)
init · iOS 13.0+

init

TypeScript
static initSystemNameCompatibleWith(name: string, traitCollection?: (UITraitCollection) | null): (UIImage) | null
Swift declaration
init?(systemName name: String, compatibleWith traitCollection: UITraitCollection?)
init · iOS 13.0+

init

TypeScript
static initSystemNameWithConfiguration(name: string, configuration?: (UIImage_Configuration) | null): (UIImage) | null
Swift declaration
init?(systemName name: String, withConfiguration configuration: UIImage.Configuration?)
get · iOS 13.0+

actions

TypeScript
static get actions(): UIImage
Swift declaration
class var actions: UIImage { get }
get · iOS 13.0+

add

TypeScript
static get add(): UIImage
Swift declaration
class var add: UIImage { get }
get · iOS 13.0+

checkmark

TypeScript
static get checkmark(): UIImage
Swift declaration
class var checkmark: UIImage { get }
get · iOS 13.0+

remove

TypeScript
static get remove(): UIImage
Swift declaration
class var remove: UIImage { get }
get · iOS 13.0+

strokedCheckmark

TypeScript
static get strokedCheckmark(): UIImage
Swift declaration
class var strokedCheckmark: UIImage { get }
method · iOS 2.0+

drawAsPattern

TypeScript
drawAsPattern(rect: { x: number; y: number; width: number; height: number }): void
Swift declaration
func drawAsPattern(in rect: CGRect)
method · iOS 2.0+

draw

TypeScript
drawAt(point: { x: number; y: number }): void
Swift declaration
func draw(at point: CGPoint)
method · iOS 2.0+

draw

TypeScript
drawAtBlendModeAlpha(point: { x: number; y: number }, blendMode: _CoreGraphics_CGBlendMode, alpha: number): void
Swift declaration
func draw(at point: CGPoint, blendMode: CGBlendMode, alpha: CGFloat)
method · iOS 2.0+

draw

TypeScript
drawIn(rect: { x: number; y: number; width: number; height: number }): void
Swift declaration
func draw(in rect: CGRect)
method · iOS 2.0+

draw

TypeScript
drawInBlendModeAlpha(rect: { x: number; y: number; width: number; height: number }, blendMode: _CoreGraphics_CGBlendMode, alpha: number): void
Swift declaration
func draw(in rect: CGRect, blendMode: CGBlendMode, alpha: CGFloat)
method · iOS 13.0+

applyingSymbolConfiguration

TypeScript
applyingSymbolConfiguration(configuration: UIImage_SymbolConfiguration): (UIImage) | null
Swift declaration
func applyingSymbolConfiguration(_ configuration: UIImage.SymbolConfiguration) -> UIImage?
method · iOS 15.0+

preparingForDisplay

TypeScript
preparingForDisplay(): (UIImage) | null
Swift declaration
func preparingForDisplay() -> UIImage?
method · iOS 15.0+

preparingThumbnail

TypeScript
preparingThumbnail(size: { width: number; height: number }): (UIImage) | null
Swift declaration
func preparingThumbnail(of size: CGSize) -> UIImage?
method · iOS 9.0+

imageFlippedForRightToLeftLayoutDirection

TypeScript
imageFlippedForRightToLeftLayoutDirection(): UIImage
Swift declaration
func imageFlippedForRightToLeftLayoutDirection() -> UIImage
method · iOS 17.0+

imageRestrictedToStandardDynamicRange

TypeScript
imageRestrictedToStandardDynamicRange(): UIImage
Swift declaration
func imageRestrictedToStandardDynamicRange() -> UIImage
method · iOS 6.0+

withAlignmentRectInsets

TypeScript
withAlignmentRectInsets(alignmentInsets: { top: number; left: number; bottom: number; right: number }): UIImage
Swift declaration
func withAlignmentRectInsets(_ alignmentInsets: UIEdgeInsets) -> UIImage
method · iOS 13.0+

withBaselineOffset

TypeScript
withBaselineOffset(baselineOffset: number): UIImage
Swift declaration
func withBaselineOffset(fromBottom baselineOffset: CGFloat) -> UIImage
method · iOS 13.0+

withConfiguration

TypeScript
withConfiguration(configuration: UIImage_Configuration): UIImage
Swift declaration
func withConfiguration(_ configuration: UIImage.Configuration) -> UIImage
method · iOS 10.0+

withHorizontallyFlippedOrientation

TypeScript
withHorizontallyFlippedOrientation(): UIImage
Swift declaration
func withHorizontallyFlippedOrientation() -> UIImage
method · iOS 7.0+

withRenderingMode

TypeScript
withRenderingMode(renderingMode: UIImage_RenderingMode): UIImage
Swift declaration
func withRenderingMode(_ renderingMode: UIImage.RenderingMode) -> UIImage
method · iOS 13.0+

withTintColor

TypeScript
withTintColor(color: UIColor): UIImage
Swift declaration
func withTintColor(_ color: UIColor) -> UIImage
method · iOS 13.0+

withTintColor

TypeScript
withTintColorRenderingMode(color: UIColor, renderingMode: UIImage_RenderingMode): UIImage
Swift declaration
func withTintColor(_ color: UIColor, renderingMode: UIImage.RenderingMode) -> UIImage
method · iOS 13.0+

imageWithoutBaseline

TypeScript
imageWithoutBaseline(): UIImage
Swift declaration
func imageWithoutBaseline() -> UIImage
init · iOS 2.0+

init

TypeScript
static initCgImage(cgImage: _CoreGraphics_CGImage): UIImage
Swift declaration
init(cgImage: CGImage)
init · iOS 4.0+

init

TypeScript
static initCgImageScaleOrientation(cgImage: _CoreGraphics_CGImage, scale: number, orientation: UIImage_Orientation): UIImage
Swift declaration
init(cgImage: CGImage, scale: CGFloat, orientation: UIImage.Orientation)
init · iOS 5.0+

init

TypeScript
static initCiImage(ciImage: _CoreImage_CIImage): UIImage
Swift declaration
init(ciImage: CIImage)
init · iOS 6.0+

init

TypeScript
static initCiImageScaleOrientation(ciImage: _CoreImage_CIImage, scale: number, orientation: UIImage_Orientation): UIImage
Swift declaration
init(ciImage: CIImage, scale: CGFloat, orientation: UIImage.Orientation)
init · iOS 2.0+

init

TypeScript
static initContentsOfFile(path: string): (UIImage) | null
Swift declaration
init?(contentsOfFile path: String)
init · iOS 2.0+

init

TypeScript
static initData(data: ArrayBuffer): (UIImage) | null
Swift declaration
init?(data: Data)
init · iOS 6.0+

init

TypeScript
static initDataScale(data: ArrayBuffer, scale: number): (UIImage) | null
Swift declaration
init?(data: Data, scale: CGFloat)
method · iOS 15.0+

prepareForDisplay

TypeScript
prepareForDisplay(completionHandler: ((arg0: (UIImage) | null) => void)): void
Swift declaration
func byPreparingForDisplay() async -> UIImage?
method · iOS 15.0+

prepareThumbnail

TypeScript
prepareThumbnail(size: { width: number; height: number }, completionHandler: ((arg0: (UIImage) | null) => void)): void
Swift declaration
func byPreparingThumbnail(ofSize size: CGSize) async -> UIImage?
method · iOS 5.0+

resizableImage

TypeScript
resizableImageWithCapInsets(capInsets: { top: number; left: number; bottom: number; right: number }): UIImage
Swift declaration
func resizableImage(withCapInsets capInsets: UIEdgeInsets) -> UIImage
method · iOS 6.0+

resizableImage

TypeScript
resizableImageWithCapInsetsResizingMode(capInsets: { top: number; left: number; bottom: number; right: number }, resizingMode: UIImage_ResizingMode): UIImage
Swift declaration
func resizableImage(withCapInsets capInsets: UIEdgeInsets, resizingMode: UIImage.ResizingMode) -> UIImage
method

stretchableImage

TypeScript
stretchableImage(leftCapWidth: number, topCapHeight: number): UIImage
Swift declaration
func stretchableImage(withLeftCapWidth leftCapWidth: Int, topCapHeight: Int) -> UIImage
get · iOS 2.0+

cgImage

TypeScript
get cgImage(): (_CoreGraphics_CGImage) | null
Swift declaration
var cgImage: CGImage? { get }
get · iOS 5.0+

ciImage

TypeScript
get ciImage(): (_CoreImage_CIImage) | null
Swift declaration
var ciImage: CIImage? { get }
get · iOS 6.0+

alignmentRectInsets

TypeScript
get alignmentRectInsets(): { top: number; left: number; bottom: number; right: number }
Swift declaration
var alignmentRectInsets: UIEdgeInsets { get }
get · iOS 5.0+

capInsets

TypeScript
get capInsets(): { top: number; left: number; bottom: number; right: number }
Swift declaration
var capInsets: UIEdgeInsets { get }
get · iOS 13.0+

configuration

TypeScript
get configuration(): (UIImage_Configuration) | null
Swift declaration
@NSCopying var configuration: UIImage.Configuration? { get }
get · iOS 5.0+

duration

TypeScript
get duration(): number
Swift declaration
var duration: TimeInterval { get }
get · iOS 9.0+

flipsForRightToLeftLayoutDirection

TypeScript
get flipsForRightToLeftLayoutDirection(): boolean
Swift declaration
var flipsForRightToLeftLayoutDirection: Bool { get }
get · iOS 8.0+

imageAsset

TypeScript
get imageAsset(): (UIImageAsset) | null
Swift declaration
var imageAsset: UIImageAsset? { get }
get · iOS 2.0+

imageOrientation

TypeScript
get imageOrientation(): UIImage_Orientation
Swift declaration
var imageOrientation: UIImage.Orientation { get }
get · iOS 10.0+

imageRendererFormat

TypeScript
get imageRendererFormat(): UIGraphicsImageRendererFormat
Swift declaration
var imageRendererFormat: UIGraphicsImageRendererFormat { get }
get · iOS 5.0+

images

TypeScript
get images(): (Array<UIImage>) | null
Swift declaration
var images: [UIImage]? { get }
get · iOS 17.0+

isHighDynamicRange

TypeScript
get isHighDynamicRange(): boolean
Swift declaration
var isHighDynamicRange: Bool { get }
get

leftCapWidth

TypeScript
get leftCapWidth(): number
Swift declaration
var leftCapWidth: Int { get }
get · iOS 7.0+

renderingMode

TypeScript
get renderingMode(): UIImage_RenderingMode
Swift declaration
var renderingMode: UIImage.RenderingMode { get }
get · iOS 6.0+

resizingMode

TypeScript
get resizingMode(): UIImage_ResizingMode
Swift declaration
var resizingMode: UIImage.ResizingMode { get }
get · iOS 4.0+

scale

TypeScript
get scale(): number
Swift declaration
var scale: CGFloat { get }
get · iOS 2.0+

size

TypeScript
get size(): { width: number; height: number }
Swift declaration
var size: CGSize { get }
get · iOS 13.0+

symbolConfiguration

TypeScript
get symbolConfiguration(): (UIImage_SymbolConfiguration) | null
Swift declaration
@NSCopying var symbolConfiguration: UIImage.SymbolConfiguration? { get }
get · iOS 13.0+

isSymbolImage

TypeScript
get isSymbolImage(): boolean
Swift declaration
var isSymbolImage: Bool { get }
get

topCapHeight

TypeScript
get topCapHeight(): number
Swift declaration
var topCapHeight: Int { get }
get · iOS 8.0+

traitCollection

TypeScript
get traitCollection(): UITraitCollection
Swift declaration
@NSCopying var traitCollection: UITraitCollection { get }
init · iOS 16.0+

init

TypeScript
static initSystemNameVariableValueConfiguration(name: string, variableValue: number, configuration?: (UIImage_Configuration) | null): (UIImage) | null
Swift declaration
convenience init?(systemName name: String, variableValue: Double, configuration: UIImage.Configuration? = nil)
get · iOS 13.0+

baselineOffsetFromBottom

TypeScript
get baselineOffsetFromBottom(): (number) | null
Swift declaration
var baselineOffsetFromBottom: CGFloat? { get }
init · iOS 2.0+

init

TypeScript
static initImageLiteralResourceName(name: string): UIImage
Swift declaration
required convenience init(imageLiteralResourceName name: String)

Creates an instance initialized with the given resource name. Do not call this initializer directly. Instead, initialize a variable or constant using an image literal.

init · iOS 16.0+

init

TypeScript
static initNamedInVariableValueConfiguration(name: string, bundle: (_Foundation_Bundle) | null, variableValue: number, configuration?: (UIImage_Configuration) | null): (UIImage) | null
Swift declaration
convenience init?(named name: String, in bundle: Bundle? = nil, variableValue: Double, configuration: UIImage.Configuration? = nil)
init · iOS 17.0+

init

TypeScript
static initResource(resource: _DeveloperToolsSupport_ImageResource): UIImage
Swift declaration
convenience init(resource: ImageResource)

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIImage.init()

inherited init: cannot prove legal (class declares 27 custom initializers)

All UIKit types →