gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:23:06 25 4
gpt4 key购买 nike

我正在使用 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;

}];

screenshot

最佳答案

UIAlertController View 很简单并且不可自定义。如果您需要,则添加自定义 UIView 或呈现模态 Controller ,或者然后选择任何第三方

关于ios - 如何在 UIAlertController 中设置两个 UITextField 之间的距离?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39035276/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com