iOS Swift: UIAlertController ignores maximumContentSizeCategory

113 Views Asked by At

I'm trying to limit the dynamic text sizes of the UIAlertControllers in my app.

I have tried this:

let alertController = UIAlertController(title: "Test", message: nil, preferredStyle: .actionSheet)
alertController.view.maximumContentSizeCategory = UIContentSizeCategory.extraExtraExtraLarge
alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel))
present(alertController, animated: true, completion: nil)

but the maximumContentSizeCategory is ignored. How can I set a maximum dynamic font size for UIAlertController?

0

There are 0 best solutions below