DTCoreText收到警告" UI API在后台线程上调用"

时间:2017-12-01 07:11:35

标签: ios dtcoretext

似乎Github中DTCoreText的最新代码仍然没有解决这个问题。如何很好地解决这个警告? enter image description here

并且stacktrace就是这个

PID: 80642, TID: 3065451, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21
Backtrace:
4   iKM                                 0x00000001031a2232 -[DTAttributedTextContentView drawLayer:inContext:] + 210
5   QuartzCore                          0x000000010766502c -[CALayer drawInContext:] + 267
6   QuartzCore                          0x00000001075b1042 _ZL18tiled_layer_renderP16_CAImageProviderjjjjPv + 1817
7   QuartzCore                          0x000000010763b4ce _ZL21CAImageProviderThreadPjb + 789
8   libdispatch.dylib                   0x000000010cc8443c _dispatch_client_callout + 8
9   libdispatch.dylib                   0x000000010cc89352 _dispatch_queue_override_invoke + 1458
10  libdispatch.dylib                   0x000000010cc901f9 _dispatch_root_queue_drain + 772
11  libdispatch.dylib                   0x000000010cc8fe97 _dispatch_worker_thread3 + 132
12  libsystem_pthread.dylib             0x000000010d14c1ca _pthread_wqthread + 1387
13  libsystem_pthread.dylib             0x000000010d14bc4d start_wqthread + 13

1 个答案:

答案 0 :(得分:0)

新版dtcoretext通过仅在图层中添加主线程图来解决此问题