How to populate UITableView from the bottom upwards?

To populate UITableView from the bottom: – (void)updateTableContentInset { NSInteger numRows = [self.tableView numberOfRowsInSection:0]; CGFloat contentInsetTop = self.tableView.bounds.size.height; for (NSInteger i = 0; i < numRows; i++) { contentInsetTop -= [self tableView:self.tableView heightForRowAtIndexPath:[NSIndexPath indexPathForItem:i inSection:0]]; if (contentInsetTop <= 0) { contentInsetTop = 0; break; } } self.tableView.contentInset = UIEdgeInsetsMake(contentInsetTop, 0, 0, 0); } To reverse … Read more

UISearchController: show results even when search bar is empty

You can simply implement the UISearchResultsUpdating protocol and set the results controller view to always show in updateSearchResultsForSearchController: func updateSearchResultsForSearchController(searchController: UISearchController) { // Always show the search result controller searchController.searchResultsController?.view.hidden = false // Update your search results data and reload data .. } This works because the method is called even when the search bar … Read more

nil object in iOS8 delegate methods – custom keyboards

Good question. But it seems that UITextInputDelegate is not a protocol that you implement. From Apple Docs titled Lower Level Text-Handling Technologies: When changes occur in the text view due to external reasons—that is, they aren’t caused by calls from the text input system—the UITextInput object should send textWillChange:, textDidChange:, selectionWillChange:, and selectionDidChange: messages to … Read more