2 ms·
More info on WatchKit, per [1] > Can I use custom views in the Apple Watch? Can I customize the interface elements beyond their public API? > No. You can’t us
by wlesieutre 5y ago
More info on WatchKit, per [1]
> Can I use custom views in the Apple Watch? Can I customize the interface elements beyond their public API?
> No. You can’t use custom views. WatchKit only supports certain native interface elements. None of the interface elements can be subclassed or customized beyond their public API. The available interface elements are WKInterfaceLabel, WKInterfaceButton, WKInterfaceImage, WKInterfaceGroup, WKInterfaceSeparator, WKInterfaceTable, WKInterfaceSwitch, WKInterfaceMap, WKInterfaceSlider and WKInterfaceTimer.
In the original watchOS release, you can't even draw shapes, only display images. So to make a custom map you'd have to render the image yourself for display as a WKInterfaceImage.
With watchOS 2 you were able to draw to a WKInterfaceImage with Core Graphics [2], but Uber had written their app before this.
[1] https://www.raywenderlich.com/1950-watchkit-faq https://www.raywenderlich.com/1950-watchkit-faq
[2] https://github.com/shu223/watchOS-2-Sampler#draw-paths-updated-by-hoppenichu https://github.com/shu223/watchOS-2-Sampler#draw-paths-updat...