IOS7中使用UIAlertViews的字符串长度限制? [英] String Length Limitation with UIAlertViews in IOS7?
问题描述
我正在使用新的iOS应用程序,我注意到在iOS7环境中安装应用程序存在以下问题。
I'm working in a new iOS app and I noticed the following issue installing the app in iOS7 environment.
第一次打开应用程序后,我们的应用程序显示需要接受AGB的弹出窗口才能开始使用它。
我们使用了 UIAlertView
,直到我们用iOS7测试它才能正常工作。实际上警报弹出并且似乎有内容,因为我可以看到一个巨大的滚动条!但奇怪的是文本根本没有显示....在播放了一些文字之后我注意到iOS7的新 UIAlertView
有某种字符串长度限制...
After opening the app by first time, our app displays a popup with the AGB's that needs to be accepted in order to start using it.
We used a UIAlertView
and it worked fine until we tested with iOS7. Actually the alert pops up and seems to have content since I can see a huge scrollbar! But the strange thing is that the text is not shown at all.... After playing a bit with the text I noticed that the new UIAlertView
of iOS7 has some kind of string length limit...
还有其他人注意到了吗?这是正常的,还是iOS 7的错误?
Has anybody else noticed that? Is this normal, or an iOS 7 bug?
我发现自定义 UIAlertView
有效,但如果可能,我宁愿使用原生API。
I found that custom UIAlertView
works, but I would rather use a native API if possible.
推荐答案
我遇到了同样的UIAlertView问题,在模拟器中,scrollview足够大,可以容纳长文本但文本不存在。在iphone alertview上尝试显示相同的长度消息后,确实显示了该消息。
I encountered with the same UIAlertView problem, where in the simulator the scrollview was big enough to hold the long text but text was not there. After I tried the show same lenght message on iphone alertview did show the message.
因此,我认为这是一个模拟器问题,而不是真正的限制,这就是没有记录的原因。
Therefore, I think this is a simulator issue, not really a limitation, and that is why it is not documented.
这篇关于IOS7中使用UIAlertViews的字符串长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!