0

我希望能够在视图之间切换。我一直在写一些代码,但它不起作用?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
{
    AlleRumViewController *allerum = [[AlleRumViewController alloc] initWithNibName:nil bundle:nil];

    if ([[tableData objectAtIndex:indexPath.row] isEqual:@"Alle rum"]) {    
        [self presentModalViewController:allerum animated:YES];
    }
}

你们有谁知道我可以如何切换?

4

1 回答 1

0
- (IBAction)goButtonPressed:(UIButton*) source {
YourNewViewController* someNameController = [[YourNewViewController alloc] init];
[self.navigationController pushViewController:someNameController animated:YES];
[someNameController release];
}
于 2012-05-19T21:39:13.160 回答