Reputation: 33
I'm dealing with an issue that's driving me crazy. I'm quite new in programming for IPaD (as much as i'm new to Objective C actually).
So my question may seem stupid but whatever.
I have a view containing a UITextField. When this field is selected, a popover containing a ListView is displayed in order to help the user by giving him a few suggestions for his search. My issue is that when the textfield.text is modified, i'd like the listView to filter its content to keep only the fields that begins like the textField.text.
When i try to call the method reloadData, it seems that it doesn't reach the method body and it does nothing. Here's how i attempted to do it
UITableViewController *controller = (UITableViewController *)
[self.resultsPopoverController contentViewController];
[controller.tableView reloadData];
What's wrong with this way of doing it?
Upvotes: 1
Views: 1073
Reputation: 4746
inside your controller's viewWillAppear method, reload the the tableview's data and it should be fine.
Upvotes: 1