2013-02-20 30 views
0

我想,當鍵盤出現在iPhone上滾動我的文本框了起來,我使用下面的代碼,但我得到的錯誤:屬性「出身」對象類型未找到「的UITextField」

Property 'origin' not found on object type 'UITextField'

studentLoanTextBox.frame = CGRectMake(
    studentLoanTextBox.origin.x, 
    studentLoanTextBox.origin.y - 100.0, 
    studentLoanTextBox.frame.size.width, 
    studentLoanTextBox.frame.size.height 
); 

回答

5

originCGRect的成員,你必須得到一個CGRect從你的角度來看。看看UIViewframe財產。

將所有發生的studentLoanTextBox.origin更改爲studentLoanTextBox.frame.origin

相關問題