self.clearsSelectionOnViewWillAppear will not compile
This bit of code comes with new classes that are subclasses of UITableViewController...
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to preserve selection between presentations.
self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
But leaving the clearsSelectionOnViewWillAppear uncommented throws a 开发者_如何学Pythoncompile error. The error is "request for member 'clearsSelectionOnViewWillAppear' in something not a structure or union". Any ideas as to why or do you have a workaround?
The reason I even care is because without this bit, my app is leaving the selection indicator (blue background) on my table cells.
Are you compiling for 3.1.3 (or earlier) or 3.2? clearsSelectionOnViewWillAppear
is a property available in the 3.2 and newer SDK.
精彩评论