在对象类型'UITextField'上找不到属性'origin'

时间:2013-02-20 21:52:22

标签: objective-c cocoa-touch

我正试图在键盘出现在iPhone上时向上滚动文本框,我使用以下代码但是我收到错误:

  

在对象类型'UITextField'

上找不到属性'origin'
studentLoanTextBox.frame = CGRectMake(
    studentLoanTextBox.origin.x, 
    studentLoanTextBox.origin.y - 100.0, 
    studentLoanTextBox.frame.size.width, 
    studentLoanTextBox.frame.size.height
);

1 个答案:

答案 0 :(得分:5)

originCGRect的成员,您必须从中查看CGRect。请查看frame的{​​{1}}属性。

UIView的所有出现更改为studentLoanTextBox.origin

相关问题