我用a UIAlertController来呈现一个带有两个UITextFields 的对话框.如何设置TextFields的距离UIAlertController?
[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;
}];
Run Code Online (Sandbox Code Playgroud)