实际上,当我在第一行广告默认值中变大时,我试图在下一行的文本字段中设置文本。你能帮我么。我的uitextfield是通过IB获得的。我正在尝试写这篇文章并希望发表评论等内容。
[viewFeedback setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"background_Feedback.png"]]];
CGSize size = [txtFeedback.text sizeWithFont:txtFeedback.font];
CGRect f = txtFeedback.frame;
f.size.height = ceil(size.width/f.size.width)*size.height;
txtFeedback.frame = f;
txtFeedback是这里的文本域名..
答案 0 :(得分:0)
这将是动态增加UITextfield
的高度。请按照此处或添加自定义框架
在UITextViewDelegate
的{{1}}实施中,您需要计算特定宽度的文字大小并进行相应调整。
textViewDidChange: