I want to change the size of the UITextField programmatically.
Actually what I want to do exactly is this UIAlertView inside I have a UITextField. I want to increase the size of this UITextField.
Image:
The code I want is something like this.
textField.preferredContentSize = CGSize(width: 250, height: 300)
But it cannot be used this way.

I am sorry, you can't change the UITextField size directly.
If you want to customize the content of the AlertView like UITextField, you should create a custom UIView and present it modally.
It's same to UIAlertView and UIAlertViewController.