PDA

View Full Version : Change main view in Navigation-Based Application




lng
Jul 19, 2010, 08:13 AM
Hi,

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?

Thanks..



dejo
Jul 19, 2010, 09:33 AM
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.

lng
Jul 19, 2010, 09:54 AM
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.

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

http://img839.imageshack.us/img839/7228/app.jpg (http://img839.imageshack.us/i/app.jpg/)

dejo
Jul 19, 2010, 09:56 AM
Seems to me a modal view will do the trick then.

lng
Jul 21, 2010, 03:00 AM
Thanks dejo. It solved my problem.

PhoneyDeveloper
Jul 21, 2010, 02:03 PM
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.

lng
Jul 22, 2010, 01:08 AM
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.

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?

PhoneyDeveloper
Jul 22, 2010, 07:42 AM
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.

dejo
Jul 22, 2010, 11:24 AM
...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 that case, scrap the modal view at start (use the Default.png for your welcome screen) and go straight to the main view.

mmzplanet
Mar 25, 2011, 09:28 AM
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).

EDIT:

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.