Xcode linking

Discussion in 'iOS Programming' started by Cub, Feb 16, 2011.

  1. Cub, Feb 16, 2011
    Last edited: Feb 16, 2011

    Cub macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #1
    Hi all
    I am a newby to Xcode developer infact I am still in high school, I am making a radio app and I have made the channel list using interface builder (mainwindow.xib in xcode) now I want to be able to click on a link/button in the main window and that take me too a new page in the app where I can have a play button and maybe a symbol etc. I dont want to use tab bard as I will be using the html start stop buttons off websites.I saw on youtube("radio app") someone making w=one and using a blue arrow/dot to link pages I think. I know it is probably a trivial question but I am stumped, how do I go about doing this if someone could place it out in step by step or even a few screenshots it really would be apreciated?
    Many Thanks in advance
    David
     
  2. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
  3. schafer4016, Feb 16, 2011
    Last edited: Feb 16, 2011

    schafer4016 macrumors newbie

    Joined:
    Feb 14, 2011
    Location:
    San Diego, CA
    #3
  4. Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #4
    Thanks everyone for those link it really has helped me understand how it works, I have been using the one from the youtube link http://www.youtube.com/watch?v=LONVEs_LX6A&feature=fvw
    Though when I get up to the part where he uses interface builder and presses control and drags a blue line over to the buttons when I do that all that appers from the list is view, I have copied his code letter for letter and I don't know why this. Any one mind giving me a hand.
    I am making this app for my mother as she would like to listen to the radio on the go. And Later this year in design technology I was thinking of making a app so hope that answers your question. balamw
    Thanks
    David
     
  5. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #5
    Your problem is one of three things.

    1. You started a view based application and you are looking at the interface builder xib file named "mainview.xib". You should be in looking at "yourfilenameViewController.xib".

    2. You didn't save your .h or .m file before opening Interface Builder.

    3. You put the code in the wrong spot.

    my guess is #1

    Nick
     
  6. Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #6
    Hi
    Thanks for that nick, I actually forgot to save it before going into interface builder so thanks for reminding. Ok so I have created the first page with the buttons(am/FM) and it works just like the guy in the vide did except I don't wont those little popup confirmation so I didn't do that. Now how do I create a page that I can add the list of stations to and then after that the play/stop/station info page. And how do I link these buttons with individual pages. I have looked at the apple developer resources page but it doesnt show how to do this.
    Thanks again everyone
    David
    Down under
     
  7. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #7
    The things you are asking how to do are pretty basic once you have a general understanding ios development. I'd suggest watching as many tutorials as possible on youtube to start. Also look at The New Boston iPhone Tuts.

    Nick
     
  8. Cub, Feb 18, 2011
    Last edited: Feb 18, 2011

    Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #8
    Thanks Nick,
    I had a look at that and a few of his others and it explains how multiview works clearly, which helps. The only thing (aren't I a fuss pot) is I dont want to use a navigation bar really I want to have a View controller and multiple windows in it and buttons(customizable) to link one window to another I saw on another forum someone asking this but with no reply, I have watched many youtube tutorials but none like this yet, if this is possible it really would be great.:)
    In a nutshell my format would be AM - List of channels for am- then individual page for selected channel
    FM - List of channels for Fm- then individual page for selected channel
    Ive looked at many tutorials but all of them usually just switch between two views, since there will be about 16 or so channels or 19 pages in total would it be best to do multiple .xib 's or multiple views, I personaly think multiple xib would be the way to go as it would be less messy, but how would I go about doing this if it is even possible?
    Thanks all for any input
    David
     
  9. multinode macrumors regular

    Joined:
    Feb 4, 2011
    #9
    Hi Cub ...

    Take a look at section 5.2 on pages 124, 125 in Advanced IOS4 Programming by Maher Ali. In there he talks about the View hierarchy ... a View stack (of many views). And he discusses how to get from one view to another ... i.e. superviews and subviews. Much of this book is done in code rather than with IB so that the reader can see what's happening. I've read most of the book so if you have any questions, I can probably help you. Give it a look.
     
  10. Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #10
    Hi
    I can't seem to find it anywhere for free google books only carries it up page 67 and oher sites that say they are free really need you to pay, do you know of anywhere I can see it for free and I have already checked locall library registries, I have figured out multiple .xib's would be the way to go and I know how to create the class outlets etc buthow do I link one button to open another .xib or page?
    Thanks again
    David
     
  11. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #11
    It's on Amazon look inside. You can search for the content around that page (check the table of contents) and may be able to see it then.

    Or, sign up for a free trial at Safari Books Online http://safaribooksonline.com. It's there too.

    B
     
  12. Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #12
    I am having a pickle of a time, it recognizes I am not in the states and won't let me register, Is it explaining the layers etc or does it show how to write the code and link the pages, because I understand how it is all layered as I have read that on the Mac developer library? Does anyone know of a tutorial showing multiple pages linked with a button. As I have already created the seperate .xib's I just need to know how are they linked either via code or IBuilder and how it is done?
    Thanks again evryone.
    David
     
  13. Cub thread starter macrumors member

    Joined:
    Feb 16, 2011
    Location:
    Australia
    #14
    Thanks for that,
    I had a look at it and the second page is not done, and does not show how it is done in IBuilder which to me the second page and the linking to the first page is criticle for this application, I will keep on trying but if someone has a tutorial or has had experince with this situation feel free to post.
    Thanks again all for your input
    David
     

Share This Page