Storyboards and SVN conflicts

前端 未结 4 729
-上瘾入骨i
-上瘾入骨i 2020-12-04 16:37

This is a problem we never had to deal with until storyboards were introduced - Whenever there was a chance of conflict in UI, we just made sure that no 2 developers ever wo

4条回答
  •  -上瘾入骨i
    2020-12-04 17:17

    Break up your storyboard into multiple storyboards.

    There is no reason for your app to contain only one storyboard. Break your storyboard up into module storyboards. You can use +storyboardWithName:bundle: to load storyboard modules.

    See: UIStoryboard Best Practices for other good storyboard ideas.


    Update

    It's important to note this is not a complete solution to the problem. In the same way you cannot completely avoid the possibility of merge conflicts in source code decomposing a giant class into smaller modules, you can't avoid the possibility storyboard merge conflicts either. The idea is to reduce the likelihood until it becomes a manageable problem.

    There will alway be tricky merge situations in a large codebase. A properly decomposed solution will reduce the number of conflicts and minimize the number of lock out needed.

提交回复
热议问题