简体   繁体   English

UITextView 的电话号码检测导致 UITableView 崩溃

[英]UITextView's Phone Number Detection causes UITableView to crash

I have a straightforward UITableView whose cells each contain a UITextView to display a phone number.我有一个简单的 UITableView,其每个单元格都包含一个 UITextView 来显示电话号码。 If I scroll the table slowly, everything works as expected and the phone numbers turn into links.如果我慢慢滚动表格,一切都会按预期进行,电话号码会变成链接。 If I scroll the table quickly, it crashes.如果我快速滚动表格,它会崩溃。 Similarly, if I turn off Phone Number Detection for the text view, it works normally.同样,如果我为文本视图关闭电话号码检测,它会正常工作。 Does anyone know what I can do to make Phone Number Detection work properly in a table view?有谁知道我可以做些什么来使电话号码检测在表格视图中正常工作?

You might need to look down into your code on how did you put the UITextView on the UITableViewCell.您可能需要查看您的代码,了解如何将 UITextView 放在 UITableViewCell 上。

And also, you might need to reuse your cells.而且,您可能需要重复使用您的单元格。

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

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