tags:

views:

368

answers:

2

Hi . iam using Kal calendar from http://github.com/klazuka/Kal i want use this calendar on my app : so i add Kal Folder to project , the developer said if you want create basic calendar just add these code to your project :

KalViewController *calendar = [[[KalViewController alloc] init] autorelease];
[self.navigationController pushViewController:calendar animated:YES];

here is my code :

#import "kalViewController.h"

- (void)viewDidLoad {
    KalViewController *calendar = [[[KalViewController alloc] init] autorelease];
   [self.navigationController pushViewController:calendar animated:YES];    
}

but doesn't happen anything !

A: 

If self.navigationController is nil, nothing will happen. (Method calls to nil are noops.) Ensure that you actually have a navigationController.

Johan Kool
i have a navigationbar and controller ,still doesn't any happen
Momeks
A: 

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];
msk