<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFontPickerViewControllerDelegate/fontPickerViewControllerDidCancel(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIFontPickerViewControllerDelegate(im)fontPickerViewControllerDidCancel:"
  },
  "title" : "fontPickerViewControllerDidCancel(_:)"
}
-->

# fontPickerViewControllerDidCancel(_:)

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

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

## Parameters

`viewController`

The controller for the font picker that was canceled.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)