Dynamically loading multi-tab iPhone application? - iphone

Is it possible to create a multi-tab application that has a tab that will load based off a choice made at a menu in the beginning?
For example, if someone picked "tic tac toe" at the beginning menu, a "game" tab would load a tic tac toe screen instead of a chess or checkers screen.
If this is not clear, please comment.

Build the tab bar in code and then you just insert the appropriate game controller depending on what the user selects before you push the tab bar to screen.
Or
Have the users decision persisted and on loading the game tab have it query which game the user selected. `NSUserDefaults would be an easy way to persist which game was chosen.

Related

How to start a new navigation stack?

I am building an IOS App and I have a flow that enables users to build and share a post. First they start on a home screen, where they select the media, then another screen to write the paragraph and another one to edit the media and so on. At the end they share the post and I want them to come back to the root view and start the whole flow all over again but without the ability to navigate back.
How do I achieve that? I could technically hack it by disabling the back button in the root view but that doesn't feel clean.
Ideally, I would need to delete the current navigation stack and start a new one when they navigate back to home. Is there a way to do that?
If not, what is the standard way of doing it?

Make application not take over menu bar but still have dock icon?

I'm making an application that I want to function like a status bar app, where it doesn't control the menu bar (so if it's open over, say, Firefox, the menu is still the one for Firefox), but I also want people to be able to cmd-tab to it for keyboard navigation purposes. I know about Application is Agent, but that only flips both those things at once. Is there some more granular control elsewhere that allows me to change these aspects individually?

Load tableview on first start up only and populate tab bar accordingly

Ok I'm making an iPhone app that (only on the first time the user opens the app) loads a tableview with a list of, for example, sports teams. The user checks the sports teams he wants and taps the done button. Then the tab bar loads with the teams the user selected in the tab bar. Any way how to do this as far as a tutorial/ code? Thanks!
I think this link may help you: How to set iPhone tab bar icon in code?. For more help on how to use TabBarControllers, there are tons of sample code AND sample projects found here: UITabBarController Class Reference. Hope that helps!

Need architecture direction

I'm creating an app and I need some help with design.
Launch Screen - I want to show 6-8 "category" buttons with labels loaded from an array ("normal" buttons from interface builder - not tab bar buttons or menu bar buttons).
Table Screen - When one of the category buttons is pushed on the launch screen, I want to show a table view with all of the items in that category.
Detail Screen - When one of the items on the table screen is selected, go to a new screen with details for the item. There will be an action button on this screen which will remove the item from the list if pressed.
My questions are as follows:
1) I don't want to show navigation buttons on the first screen. Can I still use a Navigation-Based application and hide the navigation controls on the first screen, or would it be better (easier) to create a view-based application and put a navigation controller "inside" one of the views? I'm totally open to any basic design approach suggestions you may have.
2) I've figured out how to create a sqlite3 file, add it to the project, query it, and generate the table view from the results, but I'm not sure about how to store the sqlite file in a way that will persist on the device when the user upgrades the app later. Any pointers on that?
Thanks for any help/links/documentation you can point me to. I've watched a million tutorials but none of the ones I've seen really address basic app design.
Now for Q1, both ways work fine but if you have buttons from the first screen, having a uinavigationcontroller might make it slightly easier if you plan to have back buttons on the screens after the first screen.
For Q2, to make the database persist when the user updates their app at some stage, simply keep the original database and include a new database (with a different name) with additional content, then modify your original database and import any additional content to it.
You can also do variations of that also, ie import content from old database to new database and etc. But the key is to keep the database file names different, ie add database_v1.sqlite, database_v2.sqlite and etc.
BTW don't forget to clean up any databases you won't use in future.

How to add a tabController to another tabController

I have a tabController-based iPhone application. First tab is associated with a table view controller. When I select a table cell I want to show another table controller view, but with different tabs on the bottom. What is the best way to do it? Change dynamically tab entries, or do it through IB? Please advise.
Thanks,
Nava
The Apple Human Interface Guidelines really advise against this.
For example, on iPhone, iPod uses a tab bar to allow users to choose which part of their media collection to focus on, such as Podcasts, artists, videos, or playlists. The Clock application, on the other hand, uses a tab bar to give users access to the four functions of the application, namely, World Clock, Alarm, Stopwatch, and Timer. Figure 6-10 shows how selecting a tab in a tab bar changes the view in Clock. Notice how the tab bar remains visible in the different Clock modes shown in Figure 6-10. This makes it easy for users to see which mode they’re in, and allows them to access all Clock modes regardless of the current mode.
What you're thinking of doing might be possible with toolbars.
BTW, I found the best and the cleanest way to do that thanks to Rufus - iPhone Beta Dev Forum contributor: you can change the views of root tabbarcontroller anytime you want, also you can change tabbaritems title & icons. So actually I don't need 2 tabbarcontrollers, instead i change the existing one, setting its views & tabbaritems of views accordingly.