I think if you want to do like:
1/ Search: a big view (may be not need to be a table view) having a text "No Results". You can remove and add tableView at runtime. For example, you can have a view A contains a label "No Results" and a tableView to contain results. Then, when user search and no results, you add the view A. If there is a result, you remove view A and add tableView
2/ Like Contacts: it seems to be easier. You can override the method:
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 0;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
return a cell contaning a text "No Contacts"
}