我真的不知道我的应用程序发生了什么,但是因为我已经添加了touchid功能,app比之前更慢,并且会出现奇怪的文字。
我在主控制器之前添加了一个UiViewController
,所以我可以在没有向用户显示任何数据的情况下检查那里,直到他用touchid记录成功。
好吧,在我的iphone 6s上也是如此,但它现在非常慢,并且在touchid功能成功之后它出现在我的控制台上:
success!!!!
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView bounds]
PID: 8460, TID: 1642991, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4 LAMer 0x000000010c035d96 _T0So16UIViewControllerC5LAMerE14displaySpinnerSo0A0CAF6onView_tFZ + 54
5 LAMer 0x000000010c060a85 _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_ + 245
6 LAMer 0x000000010c060e4e _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_TA + 62
7 LAMer 0x000000010c0374d0 _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_ + 336
8 LAMer 0x000000010c037c2c _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_TA + 108
9 LAMer 0x000000010c037cb3 _T0Sbs5Error_pSgIxyx_SbSo7NSErrorCSgIyByy_TR + 115
10 LocalAuthentication 0x000000010f42edf6 __50-[LAContext evaluatePolicy:localizedReason:reply:]_block_invoke_2 + 72
11 LocalAuthentication 0x000000010f42e2a9 __42-[LAContext evaluatePolicy:options:reply:]_block_invoke_2 + 615
12 LocalAuthentication 0x000000010f4293df __52-[LAClient evaluatePolicy:options:uiDelegate:reply:]_block_invoke + 224
13 libdispatch.dylib 0x00000001124dc2f7 _dispatch_call_block_and_release + 12
14 libdispatch.dylib 0x00000001124dd33d _dispatch_client_callout + 8
15 libdispatch.dylib 0x00000001124e2251 _dispatch_queue_override_invoke + 1458
16 libdispatch.dylib 0x00000001124e9102 _dispatch_root_queue_drain + 772
17 libdispatch.dylib 0x00000001124e8da0 _dispatch_worker_thread3 + 132
18 libsystem_pthread.dylib 0x00000001129a81ca _pthread_wqthread + 1387
19 libsystem_pthread.dylib 0x00000001129a7c4d start_wqthread + 13
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:]
PID: 8460, TID: 1642991, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4 LAMer 0x000000010c03802d _T0So6UIViewCABSC6CGRectV5frame_tcfcTO + 77
5 LAMer 0x000000010c036064 _T0So6UIViewCABSC6CGRectV5frame_tcfC + 100
6 LAMer 0x000000010c035db3 _T0So16UIViewControllerC5LAMerE14displaySpinnerSo0A0CAF6onView_tFZ + 83
7 LAMer 0x000000010c060a85 _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_ + 245
8 LAMer 0x000000010c060e4e _T05LAMer18AuthViewControllerC13viewDidAppearySbFySbcfU_TA + 62
9 LAMer 0x000000010c0374d0 _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_ + 336
10 LAMer 0x000000010c037c2c _T0So16UIViewControllerC5LAMerE25authenticationWithTouchIDyySbc10completion_tFySb_s5Error_pSgtcfU_TA + 108
11 LAMer 0x000000010c037cb3 _T0Sbs5Error_pSgIxyx_SbSo7NSErrorCSgIyByy_TR + 115
12 LocalAuthentication 0x000000010f42edf6 __50-[LAContext evaluatePolicy:localizedReason:reply:]_block_invoke_2 + 72
13 LocalAuthentication 0x000000010f42e2a9 __42-[LAContext evaluatePolicy:options:reply:]_block_invoke_2 + 615
14 LocalAuthentication 0x000000010f4293df __52-[LAClient evaluatePolicy:options:uiDelegate:reply:]_block_invoke + 224
15 libdispatch.dylib 0x00000001124dc2f7 _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00000001124dd33d _dispatch_client_callout + 8
17 libdispatch.dylib 0x00000001124e2251 _dispatch_queue_override_invoke + 1458
18 libdispatch.dylib 0x00000001124e9102 _dispatch_root_queue_drain + 772
19 libdispatch.dylib 0x00000001124e8da0 _dispatch_worker_thread3 + 132
20 libsystem_pthread.dylib 0x00000001129a81ca _pthread_wqthread + 1387
21 libsystem_pthread.dylib 0x00000001129a7c4d start_wqthread + 13
此后,出现主控制器,该控制器的数据正确登录到控制台。 我可以问你上面的代码是什么,在我的控制台中出现,如果你已经知道touchid让app做这个东西..
谢谢你的建议
答案 0 :(得分:0)
这根本不像TouchID问题。您正在后台线程上执行UI操作。您必须在主线程上调用所有UI。
查看您的代码的最新更改,并查看您已更改的内容。
缓慢和/或无响应是后台线程问题上的经典 UI。