---
title: "commitComposition(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Instance Method
path: "objectivec/nsobject-swift.class/commitcomposition(_:)"
---

# commitComposition(_:)

Informs the controller that the composition should be committed.

## Declaration

```swift
func commitComposition(_ sender: Any!)
```

## Parameters

- `sender`: The client object requesting the input method to commit the composition.

## Discussion

Discussion If an input method implements this method, it is called when the client wants to end the composition session immediately. A typical response would be to call the insertText method of the client and then clean up any per-session buffers and variables. After receiving this message an input method should consider the given composition session finished.
