Search code examples
iphoneiosipaduiviewcontroller

How do I layout an app that shifts between different "modes" programmatically?


I'd like to make an app with different views for different "modes" with some shared code (there's some elements I want always the same, and the background will be changing between different views). I'm going to manage the shifts between those views based off of time. What's the best way to layout the views?

I looked at doing a tab view, but it seems a bit unnatural since the tabbar doesn't easily hide. I can also do a custom container (my original thought), but it seems like it would be good to stay within the "standard" iOS views if possible.

Does doing a custom view seem sound / is there a better way that I missed?


Solution

  • You could also consider using UINavigationController if your modes are stack based. The navigation bar can be hidden easily (set hidesNavigationBar to YES). When you push or pop controllers corresponding to modes you might want to set animated to NO, unless the slide in/slide out animation suits you.