---
title: "fontPickerViewControllerDidCancel(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uifontpickerviewcontrollerdelegate/fontpickerviewcontrollerdidcancel(_:)"
---

# fontPickerViewControllerDidCancel(_:)

Tells the delegate that the user dismissed the font picker without selecting a font.

## Declaration

```swift
optional func fontPickerViewControllerDidCancel(_ viewController: UIFontPickerViewController)
```

## Parameters

- `viewController`: The controller for the font picker that was canceled.

## Discussion

Discussion Implement this optional method if your app needs to add custom logic when the user cancels the font picker instead of picking a font.

## See Also

### Receiving font picker interactions

- [fontPickerViewControllerDidPickFont(_:)](uikit/uifontpickerviewcontrollerdelegate/fontpickerviewcontrollerdidpickfont(_:).md)
