---
title: updateComposition()
framework: InputMethodKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: inputmethodkit/imkinputcontroller/updatecomposition()
---

# updateComposition()

Informs the input controller that the composition has changed.

## Declaration

```swift
func updateComposition()
```

## Discussion

Discussion This method calls the protocol method composedString: to obtain the current composition. The current composition is sent to the client by a call to the method setMarkedText(_:selectionRange:replacementRange:).

## See Also

### Managing Composition

- [cancelComposition()](inputmethodkit/imkinputcontroller/cancelcomposition().md)
