小编Hoa*_*era的帖子

如何在UIAlertController中设置两个UITextField之间的距离?

我用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)

截图

objective-c uialertview ios

2
推荐指数
1
解决办法
377
查看次数

标签 统计

ios ×1

objective-c ×1

uialertview ×1