Nevin Jethmalani Nevin Jethmalani - 1 year ago 46
Swift Question

Speed Up Storyboard Opening

When I open the storyboard file, it takes between 1-2 minutes to open because of the number of VCs I have in it. What is the best practice to speed it up? Should we move some VCs into different storyboard files? Should we use more xib files to reduce the number of elements in VCs? Any suggestions would be great on what poor practices we might have implemented to make the storyboard loading time so slow.

Answer Source

Good practice:

  1. Keep your ViewControllers in different storyboard which are not logically related to each other. It will
    considerably reduce story board rendering/opening time. It will also very helpful to avoid conflicts in storyboard when working with
    teams.
  2. Try to UI elements to xib file, like tableViewCell, collectionViewCell, buttons, etc
  3. Try to customise UI objects using code rather than IBInspectable/IBDesignable.

Bad practice:

  1. Keeping all viewControllers in single storyboard file. Because it will take much time to render all UI objects in storyboard file, and its position in storyboard.

Thanks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download