2011-01-20 67 views
0

http://blog.webscale.co.in/?p=244小问题,日历测试应用

从上面我下载日历测试应用程序...

我有日历的tableview ....在同样的观点。

现在我创建了UIViewControllerSubClass的另一个类DetailedViewController。

现在对于选定的行,我需要显示detailedViewController Nib文件。

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; 
{ 
    NSLog(@"Calling"); 
    DetailedViewController *detailedView=[[DetailedViewController alloc] initWithNibName:@"DetailedViewController" bundle:nil]; 
    [self.navigationController pushViewController:detailedView animated:YES]; 
[detailedView release]; 
detailedView=nil; 
} 

哪一个不是导航到我的detailedView

什么导航做。

@All请帮我一把。

回答

1

,所以如果你想在攻一排,然后改变你的代码像

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; 
{ 
    NSLog(@"Calling"); 
    YourAppDelegateClass *obj=(YourAppDelegateClass *)[[UIApplication sharedApplication] delegate]; 
    DetailedViewController *detailedView=[[DetailedViewController alloc] initWithNibName:@"DetailedViewController" bundle:nil]; 
    [obj.window addSubview:detailedView]; 
[detailedView release]; 
detailedView=nil; 
} 
+0

或者您可以制作基于导航的应用程序并使用教程项目的Calender文件夹并根据您的用途使用。 – Ishu 2011-01-20 05:50:15

0

你必须要在AppDelagate方法作为导航控制器显示详细信息视图您下载查看基于应用程序,

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:calender]; 
[window addSubview:navController.view]; 
[window makeKeyAndVisible]; 

,然后做在didSelectrow方法

[self.navigationController pushViewController:detailedView animated:YES]; 

希望这^ h ELPS。