Adding a footer to a table in another view?
- by cannyboy
The app I'm making has a settings view which I want to show on the first run of the app.
Normally (after the first run) this view will be pushed onto the screen and there will be a "Back" button in the nav bar.
However, on first launch I don't want there to be a back button. Instead, I want to add a 'Done' button at the footer of the table... and then the view can be popped.
Here's my code (in my initial view's viewDidLoad). I have removed the back button, but don't know how to add the footer and button.
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if ([prefs stringForKey:@"firstRun"] == nil)
{
SettingsViewController *settingsView = [[SettingsViewController alloc] initWithNibName:@"SettingsView" bundle:nil];
settingsView.hidesBottomBarWhenPushed = YES;
settingsView.navigationItem.hidesBackButton = TRUE;
// add footer button here?
[[self navigationController] pushViewController:settingsView animated:YES];
[settingsView release];
[prefs setObject:@"OK" forKey:@"firstRun"];
} else {
//something
}