UIAlertController.addTextField results in broken text field in 27.1

I just downloaded Xcode 27.1 to test out the iPhone Duo simulator, and I notice that UIAlertController.addTextField, which was working fine in 27, is now very broken, resulting in a text field that is squashed vertically and pushed over to the right in the alert sheet.

This is very easy to reproduce - the following code will show the problem if you build in Xcode 27.1 and run on iOS 27.1 or iOS 27.2:

let alert = UIAlertController(title: "Create Something", message: "Enter a title.", preferredStyle: .alert)
alert.addTextField { textField in
    textField.placeholder = "Title"
}
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
present(alert, animated: true)

The bug isn't limited to the Duo, but can also be seen on an iPad (and probably a regular phone). I would post a screenshot, but the last time I tried that, the forum software erroneously banned me for two weeks.

I have reported this as bug #FB24889500, but given that we use alerts with text fields for users adding new items to the outline in our app, something the user does a lot, I'm wondering if there is a workaround, since this is going to make our app look very buggy.

UIAlertController.addTextField results in broken text field in 27.1
 
 
Q