2011-01-20 31 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。