iPhone SDK: PushViewController not working
Posted
by iPhone Developer
on Stack Overflow
See other posts from Stack Overflow
or by iPhone Developer
Published on 2010-06-06T20:44:09Z
Indexed on
2010/06/06
20:52 UTC
Read the original article
Hit count: 500
iphone-sdk
I am trying to create a basic navigation application with a header and detail screen. My problem is the detail screen is not working. The code below is for the opening the detail view and placing it on the nav stack. My problem is the detail screen is not being pushed and I'm not sure why? I have verified the method below is firing.
Any ptr or links to examples appreciated.
//this opens up a detail view
-(void) tableView:(UITableView *)tb didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"DETAIL VIEW.....");
NSInteger index = [indexPath indexAtPosition:1];
Retailer *retailer = [self retailerAtIndex:index];
if(retailer)
{
NSLog(@"DETAIL VIEW helelelelekjekljklerj.....");
Membership * newMem = [[Membership alloc] init];
[newMem setIssuerId:[retailer retailerId]];
MembershipViewController * mvc = [[MembershipViewController alloc] initWithNibName:nil bundle:nil];
[mvc setSubject:newMem];
RootAppDelegate *appDelegate = (RootAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.landingRetailersNavController pushViewController:mvc animated:YES];
[mvc release];
[newMem release];
}
© Stack Overflow or respective owner