草庐IT

addCachedImage

全部标签

ios - 是 [WkInterfaceDevice addCachedImage :] Thread Safe?

我可以从后台线程向WkInterfaceDevice图像缓存添加图像吗?如果API在后台线程中可以安全使用,我找不到任何文档。谢谢!斯蒂芬 最佳答案 根据开发者论坛上一位Apple员工的说法,您可以在后台线程中使用addCachedImage:。事实上,这就是我在我的应用程序中使用它的方式。 关于ios-是[WkInterfaceDeviceaddCachedImage:]ThreadSafe?,我们在StackOverflow上找到一个类似的问题: http

ios - Apple Watch - 调用 WKInterfaceDevice 添加 CachedImage 时为 "attempt to insert nil"

调用WKInterfaceDeviceaddCachedImage(_:name:)将图像从我的iPhone应用程序发送到AppleWatch(扩展程序可以告诉ImageView显示它)崩溃。异常(exception)情况是:2015-06-0920:47:57.079TimeInterval[20195:5186462]***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'***-[__NSPlaceholderArrayinitWithObjects:count:]:attemptto