如何设置UITextField高度? [英] How to set UITextField height?

查看:166
本文介绍了如何设置UITextField高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 UITextField 。我想增加它的高度,但我没有找到任何属性来做到这一点。我怎样才能实现这个目标?

I am using a UITextField. I want to increase its height but I have not found any property to do this. How can I achieve this?

推荐答案

CGRect frameRect = textField.frame;
frameRect.size.height = 100; // <-- Specify the height you want here.
textField.frame = frameRect;

这篇关于如何设置UITextField高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆