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

查看:32
本文介绍了故事板和 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 最佳实践,了解其他好的故事板创意.

See: UIStoryboard Best Practices for other good storyboard ideas.

更新

重要的是要注意这不是问题的完整解决方案.同样,在将大类分解为较小模块的源代码中,您无法完全避免合并冲突的可能性,您也无法避免故事板合并冲突的可能性.这个想法是减少可能性,直到它成为一个可管理的问题.

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天全站免登陆