作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 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;
}];
最佳答案
UIAlertController View 很简单并且不可自定义。如果您需要,则添加自定义 UIView 或呈现模态 Controller ,或者然后选择任何第三方
关于ios - 如何在 UIAlertController 中设置两个 UITextField 之间的距离?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39035276/
我是一名优秀的程序员,十分优秀!