简体   繁体   中英

How do you implement SpriteKit within a WatchKit extension app?

我正在尝试将基于SpriteKit的iPhone应用程序扩展到Apple Watch,但是鉴于Watch扩展不使用UIKit和UIViews(而是使用WKInterfaceObject及其子类),我不确定如何在其中设置我的SKView和SKScene观看扩展。

这是旧的,但只是想提一下,在watchOS 3中你可以使用SpriteKit和SceneKit。

You can't use SpriteKit in a WatchApp. You can ONLY use the UI elements provided for a Watch App. You can't create custom UI elements. The closest you can get is to create custom images in your watch extension running on the iPhone and set those in your Watch UI. See Watchkit animation implementations: clock face, animated charts, circular progress bar for more info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM