Reputation: 4994
I am using Kal calendar from http://github.com/klazuka/Kal. I want to use this calendar on my app, so I added the "Kal" folder to my project, and added the following code:
KalViewController *calendar = [[[KalViewController alloc] init] autorelease];
[self.navigationController pushViewController:calendar animated:YES];
This is my code:
#import "kalViewController.h"
- (void)viewDidLoad {
KalViewController *calendar = [[[KalViewController alloc] init] autorelease];
[self.navigationController pushViewController:calendar animated:YES];
}
Nothing happens. What did I do wrong?
Upvotes: 1
Views: 1556
Reputation: 527
Make sure navigationController is not nil and it is being initialized as the root view controller of your UINavigationController? If not, you can't use pushViewController until you do that!
Try
[self presentModalViewController:calendar animated:YES];
Upvotes: 0
Reputation: 15927
If self.navigationController
is nil, nothing will happen. (Method calls to nil are noops.) Ensure that you actually have a navigationController.
Upvotes: 2