I could add a textfield in UIAlertController using
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Title" message:@"message" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
}];
Is there any possibility to add a custom textfield inside an alert controller?
I do not think that it's possible to use a UITextField
subclass in an UIAlertController
. You can only edit the textfield's properties in the configuration handler.