- I have a
UITable that has a UISearchDisplayController . UITable less than the width of the screen (it is centered across a width of 280 pixels).- When I click on the
search bar , the UISearchDisplayController table is completely to the left of the screen. - Even when changing the frame of the
UISearchDisplayController table, I still get the same positioning.
I set the frame here:
- (void)searchDisplayController:(UISearchDisplayController *)controller didLoadSearchResultsTableView:(UITableView *)tableView { tableView.backgroundColor = [UIColor colorWithRed:29.0/255.0 green:30.0/255.0 blue:32.0/255.0 alpha:1]; tableView.rowHeight = self.myTable.rowHeight; tableView.frame = myTable.frame; NSLog(@"search table origin: %f",tableView.frame.origin.x); }
Even stranger, when I write the position of the lookup table at the end, it shows 16. However, it is at position 0 in the view.
Any help is appreciated.
source share