2012-04-28 18 views

回答

6

1)您應該設置文本字段的代表屬性(UITextFieldUISearchBar)。

2)你應該實現在委託下面的方法:

- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField 

- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar 

每當用戶想要輸入的文字將被調用。

+0

感謝您的提示,它的工作原理! ;-) – nemesis 2012-04-28 14:33:40

相關問題