Closed chodges closed 8 years ago
Sorry figured out what it was. I had forgotten to use these:
self.tableView.estimatedRowHeight = 50
self.tableView.rowHeight = UITableViewAutomaticDimension
Sorry didn't get to the this sooner but glad you figured it out.
Thanks for that. But I am still having a problem. How do I force a reload of the data. Tried using self.tableView.reloadData() but its not working as expected. Let me explain:
1) I'm loading a form view for data entry. Actually I'm presenting modally the form view to add another Contact. 2) When the form dismisses itself and control is handed back to the calling controller (in this case the RealmSearchViewController) the controller isn't automatically re-reading the records and showing the new row in the table
Again the only way for me to see the new record in this case is yup you guessed it: Selecting the search bar so it has the focus and then pressing cancel.
Wondering if there's a func that I'm missing that forces a re-read of the data.
Thanks.
@chodges this needs to be added, I will do so now. Thanks for the feedback!
Awesome. Thanks so much for adding this!
I have an interesting problem. Just implemented code using the RealmSearchViewController (swift). And what I'm finding is that the view controller only shows the first object in the data model. But when I select the search control and then press cancel all of the records will appear. So I don't have to actually search for anything --- just selecting it so it has the focus and then pressing cancel will do this.
Any idea why this might be happening? Here is the model that I'm using for the search:
And In the storyboard I've entered "Contact" for the Entity Name, "lastname" as the Search Property, Sort Ascending is ON. Nothing out of the ordinary there.