我正在使用UIAlertController
来展示包含两个UITextField
的对话框。如何在UIAlertController
中设置TextFields的距离?
[alertController addTextFieldWithConfigurationHandler:
^(UITextField *textField) {
textField.placeholder = @"Nick Email";
textField.textColor = [UIColor blueColor];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.text=username;
textField.userInteractionEnabled = NO;}];
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"Full Name";
[textField setKeyboardType : UIKeyboardTypeEmailAddress];
textField.textColor = [UIColor blueColor];
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
textField.text=email;
textField.userInteractionEnabled = NO;
}];
答案 0 :(得分:5)
UIAlertController 视图很简单,无法自定义。如果你需要,那么添加自定义UIView或现有的模态控制器,或者然后去任何第三方