setSearchDisplayController considered private-API?
- by Adun
Hi,
I recently submitted an app for app review but I got rejected because of the use of a private API. I'm still a bit new to iPhone developing so I was wondering if someone could help me understand how this part was rejected:
UISearchBar *searchBar = [[[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0)] autorelease];
searchBar.showsCancelButton = NO;
searchBar.placeholder = @"Search Exhibitors";
[searchBar sizeToFit];
[self.tableView setTableHeaderView:searchBar];
UISearchDisplayController *searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
[self performSelector:@selector(setSearchDisplayController:) withObject:searchDisplayController];
[searchDisplayController setDelegate:self];
[searchDisplayController setSearchResultsDataSource:self];
[searchDisplayController setSearchResultsDelegate:self];
[searchDisplayController release];
The part that they mentioned was the "setSearchDisplayController". I based the searching of a UITableView on the example given here. So can anyone explain why this is considered a private API?