iPhone 如何设置新设计、多个 XIB?
我正在将 Android Java 应用程序转换(同时尝试并学习)到 iPhone。我已经为大多数部分制作了测试场景,以确保我知道如何继续,并且我已经接近实际开始。
该应用程序从主菜单启动,然后进入多个子菜单(大约 8 个)。大多数子菜单都会转到执行操作(例如数据显示或编辑)的单个屏幕。
我已经开始使用导航控制器和一个 XIB 上的所有视图来构建原型。现在的问题是我是否为每个子菜单创建另一个 XIB,并且每个子菜单都有视图,或者什么?我还没有找到一篇文章来解释内存管理以及推荐的方法是什么。
感谢您的任何想法和想法!
I am converting (trying to and learning at the same time) a Android Java app to iPhone. I have made test scenarios for most of the sections to make sure I have an idea how to proceed and I am getting close to actually starting.
The app starts on a main menu and from there goes to multiple sub menus (about 8 of them). Most of the sub menus goes to a single screen that performs an action, like data display or editing.
I have started the prototype with a Nav Controller and all the views on one XIB. Now the question is do I create another XIB for each of the sub menus and each of those would have views, or what? I have yet to find one article that explains the memory management and what the recommended way to do this is.
Thanks for any ideas and thoughts!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将不同部分分成多个 XIB 文件的原因有两个:
基本上,对于大多数应用程序来说,选择哪个方向并不重要。做任何对你有用的事情。通常建议将视图控制器使用的视图拆分到不同的文件中(Xcode 很多时候会自动执行此操作)。视图控制器会为您延迟加载额外的 XIB 文件(您只需设置视图控制器的
NIB Name
),因此根本不需要太多努力。The reason you separate different sections into multiple XIB files is twofold:
Basically, it doesn't matter too much for most applications which direction you go. Do whatever works for you. It is generally recommended to split the views used by view controllers out into different files (Xcode does this automatically a lot of the time). The view controllers do the lazy-loading of the additional XIB files for you (you just have to set the
NIB Name
of the view controller), so it doesn't take much effort at all.