Is there an equivalent class to UIView in WatchKit?

Will

I have an iOS app that dynamically draw shapes on UIView (through drawRect), and I am looking at the possibility to port that app (or a small part of that) to Apple Watch. Unfortunately, after read through relative posts I cannot find which class can handle the similar job in WatchKit.

So the question is:

  1. If there is a similar class like UIView, in WatchKit, to draw lines cycles on Apple Watch?

  2. What is the best (possible) way to implement a simple drawing function on Apple Watch, if there is no UIView like class. (Assume this is achievable)

Thanks in advance.

Lukas Kukacka
  1. No, there is no class similar to UIView in WatchKit
  2. You can 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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

prepareForSegue equivalent in WatchKit

From Dev

prepareForSegue equivalent in WatchKit based on rowindex

From Dev

UIView equivalent in Android

From Dev

Capture UIImage from UIView then use it in WatchKit WKInterfaceImage

From Dev

UIView animateWithDuration equivalent for OSX Cocoa

From Dev

UIView animateWithDuration equivalent for OSX Cocoa

From Dev

Watchkit Extension Test Class - Bad Access Issue

From Dev

Make a Data Class with Swift in Watchkit Target

From Dev

Custom UIView Class - Swift

From Dev

C equivalent of IOMemoryDescriptor class

From Dev

Declaration of @class equivalent for a struct

From Dev

::class equivalent in PHP 5.4

From Dev

Fortran equivalent of Class

From Dev

C equivalent of IOMemoryDescriptor class

From Dev

equivalent DBIx::Class syntax?

From Dev

equivalent to [obj class] in Swift?

From Dev

Is there a contains class equivalent for css?

From Dev

Extended UIView class using Swift

From Dev

Properties wont work in UIView class

From Dev

ViewController is not updating UIView with custom class

From Dev

ViewController is not updating UIView with custom class

From Dev

WatchKit error - unable to find interface controller class '' to instantiate

From Dev

Reference a Objective c class in my WatchKit extension (swift)

From Dev

What is the equivalent of class in pure C

From Java

Lambda expression and equivalent anonymous class

From Dev

What is the Javascript equivalent of a Class variable?

From Dev

self class alloc equivalent in Swift

From Dev

What's the class equivalent of instancesRespondToSelector?

From Dev

is there a Vector Java class equivalent in javascript?

Related Related

HotTag

Archive