I am required to create two UISearchBars in my tableView. I want both of them of equal width on top of the table (side-by-side).
I have created two outlets of UISearchBar, and property and de alloc for them. I am finding it hard to place (I mean fit) both of them in the view. I get only one search bar expanding to the FULL width of the screen. How do I fit two ?
searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 4, 45)];
zipSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(4, 0, 4, 45)];
searchBar.placeholder = @"School Name";
zipSearchBar.placeholder=@"Zip";
searchBar.delegate = self;
zipSearchBar.delegate = self;
self.tableView.tableHeaderView= zipSearchBar;
self.tableView.tableHeaderView= searchBar;
searchBar.autocorrectionType = UITextAutocorrectionTypeNo;