I'm currently doing the following:
BlogViewController *viewController = [[BlogViewController alloc] initWithBlogPosts];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
[self presentModalViewController:navController animated:YES];
[viewController release];
[navController release];
However, I need a way to use a custom UINavigationBar. I've tried using a category like this:
@implementation UINavigationBar (Image)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"toolbar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
But it doesn't seem to pick that up. Any suggestions? BlogViewController is a subclass of UIViewController.