iOS 10 UITabBar设置标题后可以看到更多项目 [英] iOS 10 UITabBar more items visible after setting title

查看:107
本文介绍了iOS 10 UITabBar设置标题后可以看到更多项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用中有一个标签栏,标签栏项是UITabBarItem的子类。从服务器获取更新后,这些标签栏项目使用以下行从代码设置其标题:

  [self setTitle:@ SomeText 则会]; 

此行运行后,之前隐藏的标签栏项目(在更多标签后面)变为可见在主选项卡区域中,并堆叠在其他选项卡的顶部。请参见下面的屏幕截图这只发生在iOS 10(测试版)中。这是我的代码中的错误还是iOS 10中的问题?



我创建了一个最小的XCode项目并发布到Github以证明问题:

解决方案

只要您在iOS 10中以编程方式设置标签的标题,就会发生这种情况。我已经确认这是iOS 10测试版中的一个错误。我已经打开了一个错误报告和雷达:openradar.appspot.com/27749026



我还发布了一个Github回购,证明了这个问题: https://github.com/RippleAdder/TabStacks


I have a tab bar in my app, and the tab bar items are subclasses of UITabBarItem. After fetching an update from the server, these tab bar items set their title from code using this line:

[self setTitle:@"SomeText"];

Once this line runs, the tab bar items that were previously hidden (behind the more tab) become visible in the main tabs area, and stack on top of the other tabs. See the screenshot below. This only happens in iOS 10 (beta). Is this a bug in my code or an issue in iOS 10?

I have created a minimal XCode project and posted to Github to demonstrate the issue: https://github.com/RippleAdder/TabStacks

解决方案

This happens anytime you programmatically set a tab's Title in iOS 10. I have confirmed that this is a bug in iOS 10 beta. I have opened a bug report and radar: openradar.appspot.com/27749026

I have also posted a Github repo that demonstrates the issue: https://github.com/RippleAdder/TabStacks

这篇关于iOS 10 UITabBar设置标题后可以看到更多项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆