我一直在尝试从 tableview 推送 uiwebview 无济于事。这是我现在拥有的代码,每当我单击单元格时,它都会崩溃并向我显示错误。
课程.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if ([[array objectAtIndex:indexPath.row] isEqual:@"GolfClub"])
{
Blue *changi = [[Blue alloc] initWithNibName:@"Golf Club" bundle:nil];
[self.navigationController pushViewController:changi animated:YES];
[changi release];
}
else if ([[array objectAtIndex:indexPath.row] isEqual:@"ExecutiveGolfCourse"])
{
ExecutiveGolfCourse *egc = [[ExecutiveGolfCourse alloc] initWithNibName:@"Executive Golf Course" bundle:nil];
[self.navigationController pushViewController:egc animated:YES];
[egc release];
}
newsClicked.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:newsClicked animated:YES];
}