2
我的應用得到了崩潰,使輸出如下:爲什麼我的代碼崩潰了一些UIWebView異常?
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...
1 WebThreadLock
2 -[UIWebDocumentView(UIWebDocumentViewTextSelecting) selectionBaseWritingDirection]
3 -[UITextField _resignFirstResponder]
4 -[UIResponder _finishResignFirstResponder]
5 -[UIResponder resignFirstResponder]
6 -[UITextField resignFirstResponder]
7 -[UIView(UITextField) endEditing:]
8 -[UIWindowController _prepareKeyboardForTransition:fromView:]
9 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:]
10 -[UIViewController presentViewController:withTransition:completion:]
11 -[UIViewController presentViewController:animated:completion:]
12 -[UIViewController presentModalViewController:animated:]
13 -[studentlogViewController parse]
14 -[NSThread main]
15 __NSThread__main__
16 _pthread_start
17 thread_start
任何人都可以讓我知道,我離開了我的心,我沒有任何線索,這裏發生了什麼
很明顯,您正在使用的WebView在來往打電話給你的方法後臺線程 – 2013-02-11 13:37:19
我沒有在我的課堂上使用webview我解析XML數據並顯示在文本 – 2013-02-11 13:39:31
看看這裏:http://stackoverflow.com/questions/9679754/tried-to-obtain-the-web-鎖定線程以外的其他主線程或網頁以解決類似問題的答案。您可能需要使用GCD或其他形式的回調,以避免從後臺線程調用UIKit方法 – 2013-02-11 13:39:52