<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TouchController",
  "identifier" : "/documentation/TouchController/TCControlImage",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Touch Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)TCControlImage"
  },
  "title" : "TCControlImage"
}
-->

# TCControlImage

Represents an image to be rendered using Metal.

```
class TCControlImage
```

## Topics

### Creating a control image

[`convenience init?(cgImage: CGImage, size: CGSize, device: any MTLDevice)`](/documentation/TouchController/TCControlImage/init(cgImage:size:device:)-22z05)

Creates a new image from a CGImage.

[`convenience init(texture: any MTLTexture, size: CGSize)`](/documentation/TouchController/TCControlImage/init(texture:size:))

Creates a new image with the specified texture and size.

[`init(texture: any MTLTexture, size: CGSize, highlight: (any MTLTexture)?, offset: CGPoint, tintColor: CGColor)`](/documentation/TouchController/TCControlImage/init(texture:size:highlight:offset:tintColor:))

Creates a new image with the specified texture, size, highlight texture, offset, and color tint.

[`convenience init?(uiImage: UIImage, size: CGSize, device: any MTLDevice)`](/documentation/TouchController/TCControlImage/init(uiImage:size:device:)-3hqf)

Creates a new image from a UIImage.

### Inspecting the control image

[`var highlightTexture: (any MTLTexture)?`](/documentation/TouchController/TCControlImage/highlightTexture)

The Metal texture to use for the image when highlighted. May be `nil`.

[`var offset: CGPoint`](/documentation/TouchController/TCControlImage/offset)

The offset from the center of the parent control in points.

[`var size: CGSize`](/documentation/TouchController/TCControlImage/size)

The size of the image in points.

[`var texture: any MTLTexture`](/documentation/TouchController/TCControlImage/texture)

The Metal texture to use for the image.

[`var tintColor: CGColor`](/documentation/TouchController/TCControlImage/tintColor)

The color tint to apply to the texture. The color ref is retained.

### Initializers

[`convenience init?(CGImage: CGImage, size: CGSize, device: any MTLDevice)`](/documentation/TouchController/TCControlImage/init(CGImage:size:device:)-6wxv8)

[`convenience init?(UIImage: UIImage, size: CGSize, device: any MTLDevice)`](/documentation/TouchController/TCControlImage/init(UIImage:size:device:)-9csn2)

[`init(texture: any MTLTexture, size: CGSize, highlightTexture: (any MTLTexture)?, offset: CGPoint, tintColor: CGColor)`](/documentation/TouchController/TCControlImage/init(texture:size:highlightTexture:offset:tintColor:))

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)