自定义 UItabBar 项目顺序
我想更改 UITabBar 项目的顺序。
然后当我再次登录时,顺序应该保持不变。
如何做到这一点?有人可以帮助我吗?我浪费了一整天的时间来实现这个。
I want to change the order of UITabBar items.
Then when I log in again, the order should be maintained.
How this can be done? Can anybody help me? I've wasted a whole day to implement this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您愿意以编程方式执行此操作,那么它应该相当简单:
保留每个视图的索引,然后以相同的顺序将每个视图添加到数组中进行加载:
使用数组构建标签栏
if you are willing to do it programmatically it should be fairly simple:
Persist the index of each view and then add each view to an array in the same order doing load:
construct your tabbar using your array