I’ve been trying to access some instance methods of UITableView inside my UITableView class to use a NSFetchedResultsController following this tutorial http://www.raywenderlich.com/999/core-data-tutorial-how-to-use-nsfetchedresultscontroller
In the tutorial there is a section of code where you’re accessing self.tableView, which makes sense because you’re using a UITableViewController. However, I am trying to use a UITableView and I can’t find any examples that use that.
Looking at the documentation, I should have an instance method “beginUpdates” among other things (reloadUpdates, insertRowsAtIndexPaths:withRowAnimation:)
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html
However, when I try to access the instance method with [self beginUpdates] I can’t get the instance method (Method not found). It’s like that for a bunch of the instance methods, but not all of them. For example, I can access
[self setEditing:(BOOL) animated:(BOOL)]
I’m rather new to Objective-C so I believe I’m accessing my UITableView instance in the wrong fashion, but the only thing I can think of with that class is “self”
How do I go about accessing those methods in UITableView rather than UITableViewController?
+1 @Hollance’s comment. You may find that you want to customize your view controller logic more than subclassing
UITableViewControllerallows, but this would be better served by a subclass ofUIViewControllerthat is composed with aUITableView(i.e., thetableViewoutlet/property).