通用应用程序与单独目标的最佳实践是什么?
是否有任何既定的标准来帮助决定构建通用 iphone/ipad 应用程序还是构建共享某些代码的单独目标? 我有一个 iPad 应用程序运行良好,现在需要支持 iPhone。由于 iPad 视图又大又复杂,我需要将几乎每一个视图重新制作成 2 或 3 个较小的 iPhone 视图。因此,在我看来,拥有两个具有所有不同视图和控制器的独立目标会更容易重用模型和通信层,而不是在代码中添加:
if iPad {
// do iPad view and controller
} else {
// do iPhone view and controller
}
TIA,
-Mike
Are there any well established criteria to help decide between building a universal iphone/ipad app versus building separate targets that share some code?
I have an iPad app working fine and now have a requirement to support iPhone. Since the iPad views are large and complex, I'll need to rework almost every one into 2 or 3 smaller iphone views. So it seems to me that it will be easier to have 2 separate targets with all different views and controllers that re-use the model and communication layers, rather than pepper the code with:
if iPad {
// do iPad view and controller
} else {
// do iPhone view and controller
}
TIA,
-Mike
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从用户的角度来看,通用性更好,除非它使下载时间大大延长(艺术品资源)。
From the users point of view universal is nicer, unless it makes the download substantially longer (artwork resources).