0

I'm developing an app/game that contains few UIViews:

  • An user/pass form
  • A title menu
  • A configuration menu
  • 1 MapView that will be the main view
  • 4 UIViews that i will show dinamically and with animation using the "animateWithDuration" function
  • 2 alert UIViews

I've never worked with Storyboards so I would like to know what is the best solution:

  • Use Storyboards to keep control of the navigation flow (it's posible to use animateWithDuration in this case?)
  • Show/hide the UIViews programatically as I was doing until now
  • To use a combination of both (if it's possible)
  • Other
jjordan
  • 183
  • 2
  • 6

2 Answers2

1

Storyboards provide a convenient way to organize and present the navigational structure between your UIViews. The Segue mechanism for passing state between UIView transitions also encourages better organized and more maintainable code. IMO, there is little reason not to use Storyboards in modern (e.g. targeting iOS 5 or later) iOS apps.

All of the scenarios you have described are straightforward to implement while using Storyboards. You are in no way "locked in" to using segues between all of your views. You can mix and match as makes sense for your application.

Kaelin Colclasure
  • 3,925
  • 1
  • 26
  • 36
  • 1
    I would also add that you can even create freeform `UIViews` on the storyboard and instantiate them in code without ever building a segue to them. Like if I have a complicated subview I will usually create a freeform UIView, create a custom controller, build it all on the storyboard, then instantiate and add it to my main view through code. – Justin Paulson Jul 25 '12 at 20:03
1

for iOS 5, i agree with Kaelin's answer: better organization all in one place, and i have projects in which there are items that don't fit within the storyboards that can still be added programmatically by loading .xib files later.

however, for any iOS 4.x or earlier support that you are required to do, storyboard won't help you. it is not supported in iOS 4.x or earlier.

john.k.doe
  • 7,533
  • 2
  • 37
  • 64