0
我有一个自定义的tableview单元格,其中包含一些对象UIImageView,UILabel和UITextView。所有对象,除了UITextView的工作正常,但是当我试图改变TextView的文本:将UITextView添加到自定义tableViewCell =崩溃
myTextView.text = @"Some string";
应用程序崩溃与此错误:
Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...
任何建议非常赞赏。 谢谢
它似乎是你试图从辅助线程更新文本,是这种情况?你能添加更多的代码吗? – rishi 2012-04-25 05:55:19
使用performSelectorOnMainThread(NSObject方法)来更新您的UITextView – Niko 2012-04-25 06:00:44