I just want to set up a navigationController with a view that’s on the same xib file.
xib structure
File's OwnernavigationController->Navigation ControllerFirst ResponderNavigation ControllernavigationController->File's Ownerview->Scroll ViewScroll Viewview->Navigation Controller
.h
@interface WannaBeNavController : UINavigationController <UINavigationControllerDelegate> {
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@end
.m
#import "WannaBeNavController.h"
@implementation WannaBeNavController
@synthesize navigationController;
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationController = navigationController;
//[self setNavigationController:navigationController];
//[navigationController setView:self.view];
@end
I’ve tried a number of things with no success. All I see is a blank navigationController.
I know that this is possible with multiple files OR on a
controllerxibwith awindow, but it doesn’t seem as though it is with just three files (h, m, and xib).So here’s what I did instead:
UIViewControllerinstead of aUINavigationControllerUINavigationBarfor the bar at the top.UIScrollViewbelow theUINavigationBarUIScrollViewattributes inspector.UIScrollViewappear to be underneath theUINavigationBarfor when a user scrolls. I’m not sure how to accomplish this step, but I’ll post back instructions when I figure it out.