我有包括的项目作为一个表视图(HomeViewController):UITable观点:didSelectRowAtIndexPath方法为多行
位置>
报告>
设置>
我能够做到这与“didselectrowatIndexPath”帮助单行,但当我试图这样做与多行(如果其他构造),没有得到错误,但仍然无法点击任何一个(位置,报告或设置)。我有全部导入.h文件稀土元素above.my代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([[menuList objectAtIndex:indexPath.row] isEqual:@"LOCATIONS"])
{
LocationViewController *locationViewController;
locationViewController = [[LocationViewController alloc] initWithNibName:@"LocationViewController" bundle:nil];
locationViewController.menuList = [menuList objectAtIndex:indexPath.row];
[self.navigationController pushViewController:locationViewController animated:YES];
}
else if([[menuList objectAtIndex:indexPath.row] isEqual:@"REPORTING"])
{
Reporting *reporting;
reporting = [[Reporting alloc] initWithNibName:@"Reporting" bundle:nil];
reporting.menuList = [menuList objectAtIndex:indexPath.row];
[self.navigationController pushViewController:reporting animated:YES];
}
//[locationViewController release];
}
而且要讨论关于发布声明 帮帮我吧! 谢谢
什么是LocationViewController和报告的父类? – malinois 2011-03-28 13:47:19
UITableViewDelegate和UITableViewDataSource – Alok 2011-03-28 13:56:45
真的吗?它不是UINavigationController?我在谈论班级,而不是代表。 – malinois 2011-03-28 13:58:48