Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

pushViewController not working

Hello all,

So I am trying to create a search that populates a table view with the results, and when the user clicks on one of the results it should push the detail page. I have this working on the iPhone but something is breaking on the iPad, not really sure what. I am pretty new to this so bare with me as I get up to speed.

This is what my didSelectRowAtIndexPath: method looks like:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath {

// Navigation logic -- create and push a new view controller

if(pdvController == nil)
pdvController = [[PersonDetailViewController alloc] initWithNibName:@"PersonDetailView" bundle:[NSBundle mainBundle]];

//"people" is an array of type person that holds the return results
Person *aPerson = [appDelegate.people objectAtIndex:indexPath.row];

//add person to be displayed to controller
pdvController.aPerson = aPerson;

[self.navigationController pushViewController:pdvController animated:YES];
}

I have traced through and everything is loading properly, it is just not pushing the new view. Does anyone have any idea why this may not be pushing to the next view? I am pretty sure everything is linked up properly in IB. Thanks ahead of time!

-G

Dell Inspiron, Windows XP, Also Have Mac Mini for iPad Programming

Posted on Aug 2, 2010 7:17 AM

Reply
3 replies

pushViewController not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.