2

I have the iOS Charts framework installed and running on my iPhone. I was wondering if there was a way to display the charts from my iPhone to the Apple Watch.

How would I go about this?

Husein Kareem
  • 516
  • 1
  • 4
  • 12

1 Answers1

1

I guess No, there is no class similar to UIView in WatchKit. I am not sure if watch os 2 support, you could take a look.

But, you could try to generate images and transfer them to Watch App using WKInterfaceImage's func setImage(image: UIImage?)

If you already have drawing code for drawing in -drawRect:, it shouldn't be that difficult to modify it to support drawing to image

If you are just looking for some bars or lines chart, there are some libraries there, for instance, https://github.com/yasuoza/YOChartImageKit

Wingzero
  • 9,644
  • 10
  • 39
  • 80