Info Screen code?? Anyone?

Discussion in 'iOS Programming' started by salvadormg, Aug 22, 2009.

  1. salvadormg macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #1
    Hi,

    I'm really new to programming and i have my app like 90% complete even testing it on my iPod, it works great, but i need an info page, and thats a problem because i don't no how to get it back to main screen, i found the code to bring up the info screen when pressing the default info button from interface builder but i have no idea how to get the screen back from the info plane to my app again, does anyone have code to do this? It would really be appreciated, i can't seem to find it anywhere, (i think people just assume if you know how to get the info screen you know how to get back out of it again.... i don't :()

    Thanks guys...

    P.S The code i am using to get the info screen is...

    - (IBAction)infoButtonPressed:(id)sender;
    {
    SecondViewController *second = [[SecondViewController alloc] initWithNibName:nil bundle:nil];

    second.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentModalViewController:second animated:YES];

    [second release];
    }
     
  2. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #2
    Code:
    [self dismissModalViewControllerAnimated:YES];
    
    Apple's supplied documentation should be your best friend while coding. in XCode, if you hold the Option key while clicking on a method name (like presentModelViewController), if the method exists, or isn't written incorrectly, you'll be taken directly to documentation about that method. try it. you'll be directed to UIViewController Class Reference, scroll thru the tasks and you'll see that finding dismissModelViewControllerAnimated is very simple. the documentation certainly can seem a bit confusing at first, but once you get use to it you'll wonder how you ever managed without it.
     
  3. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #3

    Sounds interesting, i didn't no that!! I'll have a look and see can i find it now...
     
  4. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
  5. salvadormg thread starter macrumors member

    salvadormg

    Joined:
    Aug 19, 2009
    #5
    I have made my app in the main window.Xib and it works and all... Should i have made it in the view controller??? because i can not get the info button to work now, i think it is looking for the button in view controller not main window...?
     

Share This Page