简体   繁体   English

UITextView 文本支持另一种语言 - iOS7 应用程序崩溃

[英]UITextView text support for another language -iOS7 app crash

My app is getting crash on iOS7我的应用在iOS7崩溃了

In my app, I have language option.在我的应用程序中,我有语言选项。 One is English and other is Kannada .一种是英语,另一种是卡纳达语

When user selects Kannada, all text turns into Kannada.当用户选择卡纳达语时,所有文本都变成卡纳达语。 I have one textview in which I have added static text in Kannada.我有一个文本textview ,其中我在卡纳达语中添加了静态文本。 When user navigates to that view, the app crashes on iOS7 , while on iOS8 it's working fine.当用户导航到该视图时,应用程序在iOS7上崩溃,而在iOS8上运行正常。

I am not getting any log for crash.我没有收到任何崩溃日志。 I can only see EXC_BAD_ACCESS (code = 1, ...) .我只能看到EXC_BAD_ACCESS (code = 1, ...) I have tried it by keeping "Enable Zombies" option, still not getting any log in console.我已经通过保留“启用僵尸”选项进行了尝试,但仍然没有在控制台中获得任何登录信息。

PS - I have static text in textview . PS - 我在textview有静态文本。 I am not adding text dynamically.我没有动态添加文本。 I am just hiding/un-hiding textviews .我只是隐藏/取消隐藏textviews I can see and read the text in Kannada in my textview in storyboard.我可以在故事板的文本textview中查看和阅读卡纳达语文本。

It may be a strange behavior in iOS 7, and it seems to be a bug in the way NSLayoutManager layouts the text for Kannada language.这在 iOS 7 中可能是一个奇怪的行为,它似乎是NSLayoutManager为卡纳达语布局文本的方式中的一个错误。 As other answers pointed out, UITextView is build around TextKit since iOS7 , and thus uses NSLayoutManager internally to layout text.正如其他答案所指出的, UITextViewiOS7以来围绕TextKit iOS7 ,因此NSLayoutManager内部使用NSLayoutManager来布局文本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM