0
我正在創建一個表視圖應用程序。 當表格視圖中的單元格被觸摸時,我必須顯示一個網頁視圖。 但tableView的導航控制器顯示一個零值。 它不會推送到detailsViewController。 任何人都請幫我解決這個問題。UINavigationController不推送視圖控制器
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NewsDetailsViewController *detailsVc=[[NewsDetailsViewController alloc]initWithNibName:@"NewsDetailsViewController" bundle:nil];
NSString *launchURL = [nf.newsStories [indexPath.row] objectForKey:@"link"];
detailsVc.url = launchURL;
NSLog(@"View controllers before pushing : %@",self.navigationController.viewControllers);
[self.navigationController pushViewController:detailsVc animated:YES];
NSLog(@"View controllers after pushing : %@",self.navigationController.viewControllers);
}
NavigationController Value in debugger
NewsViewerController是從someview目前? – Hardik