开发者

I cannot use Kal Calendar in my iPhone application

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开发者_C百科, 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?


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜