---
title: NSImageCell
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsimagecell
---

# NSImageCell

An NSImageCell object displays a single image (encapsulated in an NSImage object) in a frame. This class provides methods for choosing the frame and for aligning and scaling the image to fit the frame.

## Declaration

```swift
class NSImageCell
```

## Overview

Overview The object value of an NSImageCell object must be an NSImage object, so if you use the objectValue method of NSCell, be sure to supply an NSImage object as an argument. Because an NSImage object does not need to be converted for display, do not use the NSCell methods relating to formatters. An NSImageCell object is usually associated with some kind of control object. For example, an NSMatrix or an NSTableView. Designated Initializers When subclassing NSImageCell you must implement all of the designated initializers. Those methods are: init, init(coder:), init(textCell:), and init(imageCell:).

## Topics

### Aligning and Scaling the Image

- [imageAlignment](appkit/nsimagecell/imagealignment.md)
- [imageScaling](appkit/nsimagecell/imagescaling.md)

### Choosing the Frame

- [imageFrameStyle](appkit/nsimagecell/imageframestyle.md)

### Constants

- [NSImageAlignment](appkit/nsimagealignment.md)
- [NSImageView.FrameStyle](appkit/nsimageview/framestyle.md)

## Relationships

### Inherits From

- [NSCell](appkit/nscell.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
