故事板和SVN冲突 [英] Storyboards and SVN conflicts

查看:92
本文介绍了故事板和SVN冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我们在故事板介绍之前从未处理过的问题 - 只要UI中存在冲突的可能性,我们就确保没有2个开发人员同时处理同一个XIB文件。我们避免解决XIB冲突的原因是可能存在有问题的副作用(XIB以XML格式表示,因此没有合并2个版本的好方法)。

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 worked on the same XIB file simultaneously. The reason we refrained from resolving XIB conflicts is that there may be problematic side-effects (XIB is represented in XML format so there isn't a "good" way to merge 2 versions).

现在我们面临这个问题,因为我们所有的UI元素都在同一个.storyboard文件中 - 防止同时处理项目中的任何2个UI元素使得并行工作非常困难。

Now we are facing this issue because all of our UI elements are within the same .storyboard file - prevention of simultaneous work on any 2 UI elements in the project makes working in parallel very difficult.

有关如何解决此问题的任何建议吗?在此先感谢您的努力。

Any suggestions as to how to tackle this issue? Thanks in advance for your efforts.

推荐答案

将您的故事板分解为多个故事板。

Break up your storyboard into multiple storyboards.

您的应用没有理由只包含一个故事板。将故事板分解为模块故事板。您可以使用 + storyboardWithName:bundle:来加载故事板模块。

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.

请参阅:UIStoryboard Best Practices

更新

重要的是要注意这不是问题的完整解决方案。以同样的方式你不能完全避免源代码中的合并冲突将一个巨大的类分解成更小的模块的可能性,你也无法避免故事板合并冲突的可能性。我们的想法是降低可能性,直到它成为一个可管理的问题。

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.

这篇关于故事板和SVN冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆