Flipkart Search

Search This Blog

Thursday, August 6, 2009

Add SearchBar As UITableView's Header

Write This Code In Your viewDidLoad Method To Add a Search Bar As Your TableView's Header

UISearchBar *temp = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
temp.barStyle=UIBarStyleBlackTranslucent;
temp.showsCancelButton=NO;
temp.autocorrectionType=UITextAutocorrectionTypeNo;
temp.autocapitalizationType=UITextAutocapitalizationTypeNone;
temp.delegate=self;
YourTable.tableHeaderView=temp;
[temp release];

4 comments:

Anonymous said...

that works good, thanks a lot

Anonymous said...

simple and do the task! thanks!

Anonymous said...

what us yourtable

Oppa said...

@ Anonymous "YourTable" is an UITableView