presentModalViewController on a Window
I have used the following code to add GCC Calendar.
GCCalendarPortraitView *calendar = [[[GCCalendarPortraitView alloc] init]
autorelease];
calendar.dataSource = self;
calendar.delegate = self;
//calendar.hasAddButton = YES;
// create navigation view
UINavigationController *nav = [[[UINavigationController alloc]
initWithRootViewController:calendar] autorelease];
// create tab controller
tabController = [[UITabBarController alloc] init];
tabController.viewControllers = [NSArray arrayWithObject:nav];
// setup window
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[window addSubview:tabController.view];
//[self.view addSubview:tabController.view];
[self.view addSubview:window];
[window makeKeyAndVisible];
Onclick of an event in this calendar i want to show another view
controller. But if i do presentModalViewController to show another
controller, it dosent show up. What am i doing wrong?
Thank You.
No comments:
Post a Comment