---
title: UILexicon
framework: uikit
role: symbol
role_heading: Class
path: uikit/uilexicon
---

# UILexicon

A read-only array of term pairs, each in a lexicon entry object, for a custom keyboard.

## Declaration

```swift
@MainActor class UILexicon
```

## Mentioned in

Configuring a custom keyboard interface

## Overview

Overview To obtain the lexicon, call the requestSupplementaryLexicon(completion:) method of the UIInputViewController class. This method can be called only from a custom keyboard app extension. A lexicon contains words from various sources, including: Unpaired first names and last names from the user’s Address Book database Text shortcuts defined in the Settings > General > Keyboard > Shortcuts list A common words dictionary Apple intends for you to consider the words in a lexicon object as supplementary to an autocorrection/suggestion lexicon of your own design. For information on custom keyboards, see Custom Keyboard in App Extension Programming Guide.

## Topics

### Accessing the lexicon

- [entries](uikit/uilexicon/entries.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Custom keyboard

- [UITextDocumentProxy](uikit/uitextdocumentproxy.md)
- [UIInputViewAudioFeedback](uikit/uiinputviewaudiofeedback.md)
- [UIInputViewController](uikit/uiinputviewcontroller.md)
- [UILexiconEntry](uikit/uilexiconentry.md)
