سؤال

As a beginning developer I'm wondering what the pros and cons are of using Storyboard vs. .nib files to build app interfaces.

I'm aware that:

  • Storyboards supposedly streamline the process of creating interfaces
  • Apps created with storyboards are not compatible with devices running pre-iOS 5

However, I'd like to ask people with experience what the unforeseen drawbacks or advantages may be to using one method over the other, and what experienced developers recommend starting out on. (I'll be developing both for personal and commercial use.)

Thank you very much!

هل كانت مفيدة؟

المحلول

Just starting out, I would stick with Storyboards till you are comfortable with iOS's style of Model-View-Controller.

Once you are more experienced, be sure to play around with individual nibs because you still might need to use them in conjunction with a Storyboard for things like PopOvers on an iPad.

The only drawback I've found with Storyboards are when you use them in a team setting. Only one person can ever be working on it at a time, because no version control software I've found merges conflicted Storyboard (I've tried SVN & Git) well and you usually end up with a broken Storyboard.

نصائح أخرى

Personally, I find storyboards much easier to use than nibs. Especially because segues take out a lot of silly repetitive code to change view. Then there's the whole pointing out the obvious that it makes it a lot easier to get an overview of what your app looks like view-by-view all in one screen.

In all my developing so far, other than incompatibly with pre-iOS 5, I've found no drawbacks with storyboarding.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top