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