我正在使用此功能,但它不起作用。我正在使用 StoryBoard 和 xcode 4.3。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Navigation logic may go here. Create and push another view controller.
[tableView deselectRowAtIndexPath:indexPath animated:YES];
pushnavViewController *detailViewController = [[pushnavViewController alloc] initWithNibName:@"pushnavViewController" bundle:nil];
detailViewController.pushh.text = [listt objectAtIndex:indexPath.row];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
}