Hi everyone,
I'm trying to add UIBarButtonItems to a Navigation Controller that is displayed as a popup. I can't seem to add the buttons, and I'm wondering if someone can help me out.
Here is the code I have so far:
UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:aStudentsViewController];
[navigationController setToolbarHidden:NO];
[navigationController setNavigationBarHidden:NO];
UIBarButtonItem *myButton = [[UIBarButtonItem alloc] initWithTitle:@"All Present"
style:UIBarButtonItemStylePlain
target:self
action:@selector(makeAllPresent:)];
[navigationController.navigationItem setRightBarButtonItem:myButton];
attendancePopoverController = [[UIPopoverController alloc] initWithContentViewController:navigationController];
[attendancePopoverController setDelegate:self];
//activeBarButtonItem = sender;
[attendancePopoverController presentPopoverFromBarButtonItem:attendanceButton
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];