1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Change main view in Navigation-Based Application

Discussion in 'iPhone/iPad Programming' started by lng, Jul 19, 2010.

  1. lng
    macrumors newbie


    I figured out my SQLite problems and got it worked with navigational based application. Now it opens with the RootViewController and displays data.

    I would like to change the main view to another one and add a button to call current RootViewController. Basically I would like to add a view and change application's main view.

    It's now associated with the RootViewController. How can I change it?

  2. Moderator


    Staff Member

    What is the purpose of this new view?

    Anyways, I'm gonna suggest presenting the new view modally and then dismissing it in the button's action.
  3. lng
    macrumors newbie

    Thanks for the reply dejo. I tried to put what I want in a horrible diagram. :)

  4. Moderator


    Staff Member

    Seems to me a modal view will do the trick then.
  5. lng
    macrumors newbie

    Thanks dejo. It solved my problem.
  6. macrumors 68030


    Just a note, IMO having your app open to a modal view every time is a terrible UI.

    If I understand your UI I would suggest something like this: open the app to the list, as you had before, add a button to the toolbar that does the search.
  7. lng
    macrumors newbie

    Thanks PhoneyDeveloper. I agree with you about opening a modal view every time, but I changed my mind about putting a search option on it. Now it has only a button to dismiss modal view, so it became a welcome message only.

    In the future I would like to add a search bar and index column to the right directly onto list. I am still trying to understand how sections work. Any suggestion?
  8. macrumors 68030


    The usual suggestions: Read the docs and look at the sample code. Read the table view programming guide. If you understand the basics of how a table works then doing the index and sections isn't hard.
  9. Moderator


    Staff Member

    In that case, scrap the modal view at start (use the Default.png for your welcome screen) and go straight to the main view.
  10. mmzplanet, Mar 25, 2011
    Last edited by a moderator: Mar 25, 2011

    macrumors regular


    I am going to bump this backup instead of a new thread. I need to accomplish the same task but am really confused at how to pull it off.

    My root view was going to launch with a table. This was fine when the app was young and features were minimal. Now it has grown for good reason and I need to create a standard view with several icons to direct the user to other table views and/or other views.

    How do I bypass using the table in my rootviewcontroller? I would think it would be better to outright replace it. Not sure how to accomplish that though. Currently, I just have the header set to the size of the screen and scrolling is disabled.

    I have been learning a lot as this is my first app, but have neglected learning how to manipulate the root of the application (if I am making any sense).


    I think I got it.

    Sometimes its time to make a backup and just make a mess out of it...lol

    I need to stop being so worried about breaking anything.

Share This Page