Static NSArray of strings - how/where to initialize in a View Controller
In a Master-Detail app I'd like to display a TableView with 5 sections titled: Your Move Their Move Won Games Lost Games Options So I create a blank Master-Detail app in Xcode 5.0.2 and then in its MasterViewController.m (which is a UITableViewController) I'm trying to implement the method: - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { return _titles[section]; } My question is however how to init the NSArray _titles? I'm trying in the MasterViewController.m: #import "MasterViewController.h" #import "DetailViewController.h" static NSArray *_titles