0

I have an iPad app which downloads and displays documents from a web server (ASP.Net / C#). The documents are split into categories, each of which is represented by a tab on a tab bar controller.

When the user taps a tab, a view controller displaying a grid-view of documents for that category is displayed.

I put this together via interface builder and each category is hard-coded.

However, I'd like to be able to create a new category on the web service and then have the the app programmatically create a new tab (with the appropriate label and icon) and associated views for that category, from parameters passed in from the web service.

Does anyone know if this is possible or does it have to be done from interface builder?

1 Answer 1

2

The basic steps would be something like this:

-in the app delegate or somewhere before initializing and setting the tab bar, make a call to download the image and info

-set the tab bar programatically ala Programmatically Setting UITabBar Titles, based on the data you downloaded

-you could reuse the same view controller for each tab if the layout is the same, and simply have a property for each instance of the view controller saying where to get data from.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.