2009-06-17 3 views
3

uitableview가있는 탐색 모음 아래에 검색 표시 줄을 추가하려고합니다. 그리고 데이터베이스에서 검색하고 싶습니까? 이 작업을 수행하는 방법은 무엇입니까?가 표시됩니까?

답변

8

검색 표를 테이블의 headerView로 추가하십시오.

UISearchBar *temp = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)]; 
temp.barStyle=UIBarStyleBlackTranslucent; 
temp.showsCancelButton=YES; 
temp.autocorrectionType=UITextAutocorrectionTypeNo; 
temp.autocapitalizationType=UITextAutocapitalizationTypeNone; 
temp.delegate=self; 
self.tableView.tableHeaderView=temp; 
[temp release]; 
관련 문제