如何将UIImage从iPhone应用程序传递到Apple Watch应用程序 [英] How to pass UIImage from iPhone app to Apple Watch app
本文介绍了如何将UIImage从iPhone应用程序传递到Apple Watch应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个iPhone应用程序,在5-10秒后将UIView捕获为UIImage。是否可以将UIImage传递给我的Apple Watch应用并在那里用UIImageView显示?
I have an iPhone app that captures a UIView as UIImage after 5-10 seconds. Is it possible to pass that UIImage to my Apple Watch app and show it in UIImageView there?
推荐答案
是的。您需要做的就是创建一个 NSDictionary
,如:
Yes it is. All you need to do is create a NSDictionary
like:
var dict:[NSString : UIImage] = ["image" : yourImage]
然后你只需使用以下内容Apple Watch和iOS应用程序之间进行通信的方法:
链接
And then you just use the following methods to communicate between the Apple Watch and the iOS app: LINK
这篇关于如何将UIImage从iPhone应用程序传递到Apple Watch应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文