【发布时间】:2015-11-15 08:14:47
【问题描述】:
我无法在 xCode 6 中静态更改 UITextField 的高度。如果我在新项目中尝试它,我也会遇到同样的问题。似乎对所有人都是固定的。
提前致谢
【问题讨论】:
-
你有没有勾选自动布局?
-
贴一些你试过的代码!
-
@Bhupesh 不知道 xcode 的新手
-
@SaurabhPrajapati 我没有写任何代码!在 xcode 6 上工作!直接拖动文本字段
-
或者你可以先将你的borderstyle设置为none。然后增加高度,从图层 _yourTextField.layer.masksToBounds = NO; 为您的 textFiled 提供边框_yourTextField.layer.borderColor = [UIColor colorWithRed:231.0/255.0 green:231.0/255.0 blue:231.0/255.0 alpha:1].CGColor; _yourTextField.layer.shadowOffset = CGSizeMake (0.0f, 10.0f); _yourTextField.layer.shadowRadius = 0.0f; _yourTextField.layer.borderWidth = 0.5f;