views:

22

answers:

1

I want the functionality similar to the last tabs in a tab bar (those that are shown in a table after pressing the "..." )

Each points to another view.

My table

page a>

page b>

page c>

I guess that the code should be in didSelectRowAtIndexPath but

  1. I dont know how to call a nib based on the table
  2. I dont know if after navigating to the next nib ... I'll be able to navigate back

Thanks Asaf

+1  A: 

copy&paste from random project:

-(void)navigateToFAQ
{
    UIViewController *faqBrowser = [[UIViewController alloc] autorelease];
    [faqBrowser initWithNibName:@"faqBrowser" bundle:nil];

    // EDIT: sorry, leave this out this is my own category to UIBarButtonItem!
    //faqBrowser.navigationItem.leftBarButtonItem = [UIBarButtonItem arrowLeftWithText:@"back" target:self action:@selector(dismiss)];

    [self.navigationController pushViewController:faqBrowser animated:YES];
    faqBrowser.title = @"FAQ";
}

-(void)dismiss
{
    [self.navigationController popViewControllerAnimated:YES];
}

call [self navigateToFaq] from your didSelectRowAtIndexPath

and make sure you have a nib file called faqBrowser.xib...

mvds
I'm trying to implement this in a modal view... can this be the reason it doesn't work?(I guess it is I hope it isn't)
Asaf
howcome? this is actually a faq browser from a "..." more menu like you were asking about.
mvds
OK, I don't know what I've done wrong yesterday... but now it works.But I do have an issue:Calling from the table to the nib works...going back from the nib to the table works...calling the nib again ... crashesIt's like I'm trying to build an already existing object(I know that because if I go back to the level before the table, it works)Any ideas?ThanksAsaf
Asaf
the comments section is not the place for new questions, and as allways, elaborate on the crash: what does the console show etc. The going back-forth kind of crash typically indicates bad memory handling; balance your allocs and releases, NSLog you didReceiveMemoryWarnings to see if that correlates to crashes. And if you think the current question is answered, accept the answer.
mvds
Yes I released something that I probably shouldn't. I don't really had time to understand the memory rules - but I will. About the new question - there are forums where they told me not to open new posts... So, sorry. About accepting your answer First - I did. I appreciated your help then and I appreciate it now. I thought that voting is for answers that solves the issues - and at the time it didn't worked for me so well - I also didn't understand what the V stands for... but when I come to think about that I was rude plaese forgive me Thanks again Asaf
Asaf
thanks; I think the proper way to go is to modify your original question to show the progress you made, and show where you are stuck now. As for accepting or not: only accept the answer when it indeed solves the issue at hand! But it sounded like your moved from your first issue to a new one, that's why I asked.
mvds