UICellAccessory
An accessory in a collection view list cell.
Declaration
struct UICellAccessoryOverview
A cell accessory is a visual element that you can add to a list cell (UICollectionViewListCell). You use a cell accessory as a visual indicator or to let a user perform a cell-specific action like selecting, reordering, or deleting the cell. A cell accessory appears either on the leading or the trailing edge of a cell, outside of the cell’s content view.
UIKit defines a set of standard system cell accessories. System accessories have default system-defined appearances, but you can make some customizations to them, like setting a custom tint color. You can’t customize the placement of system accessories. If you want additional customization, you can create a custom accessory with customView(configuration:).
You add accessories to a list cell by setting its accessories array.
cell.accessories = [
.checkmark(),
.disclosureIndicator(options: .init(tintColor: .systemGray)),
.delete(),
.reorder()
]Topics
Creating a disclosure indicator
Creating an outline disclosure
Creating a popup menu accessory
popUpMenu(_:displayed:options:selectedElementDidChangeHandler:)UICellAccessory.MenuSelectedElementDidChangeHandlerUICellAccessory.PopUpMenuOptions