gpt4 book ai didi

text - UITextField - 多行

转载 作者:行者123 更新时间:2023-12-04 22:58:35 25 4
gpt4 key购买 nike

我正在尝试向我的 UITextField 添加行(我的代码如下),但是,当打字机到达文本字段的末尾时,它不会转到下一行,而是永远在同一行上!我如何让它转到下一行?谢谢。

fldNotes = [[UITextField alloc] initWithFrame:CGRectMake(labelLeft,controlTop+5,320 - (2 * labelLeft),200)];
fldNotes.text = te.notes;
fldNotes.placeholder = [theApp.adb GetHC:@"NotesName"];
fldNotes.clearButtonMode = UITextFieldViewModeWhileEditing;
fldNotes.tag = 100;
fldNotes.borderStyle = UITextBorderStyleRoundedRect;
[fldNotes setReturnKeyType:UIReturnKeyDone];
[fldNotes setEnablesReturnKeyAutomatically:YES];
fldNotes.delegate = self;

[contentView addSubview:fldNotes];

最佳答案

使用 UITextView反而。这允许多行文本。

关于text - UITextField - 多行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6601781/

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