9

Our company is developing a quite large app for the iPad. Eventually we want to be able to customize the UI per customer (tenant) and maybe even per user (of that customer). We started off in HTML5 but are moving to native.

I've done some reading on downloading XML from the server (or even generated XIB/NIB files) and dynamically adding those to your app.

Now with iOS 5 (and even further in 6) storyboarding is playing a big role.

My questions:
- Would it be better to use (multiple?) storyboards or XIBs?
- What are my options for both if I want to deliver a dynamic user interface?

I'm not looking for a magic pill, nor a discussion on HTML5 vs native, just some information on how I could deliver a dynamic interface and what techniques could help in doing so.

2

3 Answers 3

8
+100

my response to your two questions is:

  1. storyboard is great for scene management; it creates a visual connection between your various scenes/views. i prefer to use storyboard for as much of my UI as possible. however, there are elements that i have in some apps that pick up existing or reusable or otherwise dynamic XIBs. i simply tie these together with my storyboards by loading the XIBs in code at the location at which i want them. so, my ultimate answer for your first question is "both", where storyboards are used where possible, and XIBs used for dynamic scenes/views.

  2. your options for dynamic user interface include at least the following two options (of which, as stated above, i prefer the second):

    1. create all code using XIB files, and perform all UI transitions without storyboards in code
    2. create as much UI as you know will remain relatively static in terms of relationships between viewControllers with storyboard, and then load the dynamic parts of the UI using initWithNibName:bundle:

finally, you can use multiple storyboards if the situation warrants, and this could even apply to dynamic UI, whether it comes from re-usable components created elsewhere in storyboard and maintained separately, or storyboard XML (if you look at storyboard source, it is just XML under the hood) whether acquired from something that generated or wherever. you can even decide to manage your UI with multiple storyboards at the design phase if your app will have several complicated interconnected view-controller scenes (e.g. each tab in a UITabBarController may have its own storyboard, where each storyboard's scene rootController is connected/loaded when a tab is chosen).

1

StoryBoard all the way! I use to absolutely dislike storyboards, but then i got use to them and now i love them. Storyboards are the way to go.

0

Layout seems a really powerful framework for developing dynamic GUIs on iOS.

DISCLAIMER: I'm not the author of that framework; the author is Nick Lockwood, who seems to have an account here on SO. I found both this question and Nick Lockwood's Layout framework by googling "ios dynamic gui".

I haven't tried it yet, but it looks really promising.

The project is even hosted at GitHub here, and it has a MIT license.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.