具有多个 NIB 的 iPhone 应用程序的最佳实践建议
我正在开发一个具有七个 NIB 的应用程序。 TabController 将一堆这些内容放入...更多选项卡中,这会破坏用户体验。有人对更好的方法有建议吗?
我想知道是否应该检测滑动并依次切换每个 NIB(着眼于创建循环体验,即 NIb 1 -> Nib 2... Nib 7 -> Nib1 等。
如果失败,我可以使用导航控制器和带有“前进”和“后退”按钮的 NIB 切换
我尝试了第一个想法,我可以在检测到滑动后切换 NIB,但之前的 NIB 不会释放。出于某种原因(可以在新的 NIB 下方看到),第二个想法占用了导航栏的屏幕空间,我宁愿将其用于 NIB 中的表格等,
值得赞赏。
I am developing an application with seven NIBs. The TabController is throwing a bunch of these into the ..More tab, which spoils the user experience. Does anyone have advice on a better approach?
I am wondering if I should detect swipes and switch out each NIB in turn (with an eye to creating a circular experience i.e NIb 1 -> Nib 2... Nib 7 -> Nib1 etc.
Failing this, I could use a Navigation controller and switch NIBs with "Forward" & "Back" buttons.
I have tried the first idea. I can switch NIBs after detecting a swipe, but the previous NIB won't release for some reason (and can be seen underneath the new NIB). The second idea takes up screen space with the nav bar, and I would rather use this for the tables etc in the NIB.
Sample code and thoughts are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的建议是构建您自己的自定义“tabBar”作为启用分页的滚动视图。并尝试对 NIB 使用延迟加载。
无论如何,你必须找到一种方法来回收你的资源(类似于 tableViews 重用单元格的方式)
My sugestion would be to build your own custom "tabBar" as a scroll view with paging enabled. And try to use lazy loading for the NIBs.
Anyway you must find a way to recycle your resources (in a similar way that tableViews reuses the cells)