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

Jac*_*ark 0 cocoa-touch objective-c

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

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

studentLoanTextBox.frame = CGRectMake(
    studentLoanTextBox.origin.x, 
    studentLoanTextBox.origin.y - 100.0, 
    studentLoanTextBox.frame.size.width, 
    studentLoanTextBox.frame.size.height
);
Run Code Online (Sandbox Code Playgroud)

Seb*_*ian 5

origin是一个成员CGRect,你必须CGRect从你的角度来看.看看的frame财产UIView.

改变所有出现studentLoanTextBox.originstudentLoanTextBox.frame.origin