Dmitry
Dmitry

Reputation: 14632

How can I change frame or size of WKInterfaceImage object for Apple Watch?

How can I change size of WKInterfaceImage object? Official documentation doesn't provide any way to do this simple step.

Upvotes: 0

Views: 1108

Answers (1)

Aaron Brager
Aaron Brager

Reputation: 66302

The UIImage you provide to a WKInterfaceImage should already have the desired size. If it doesn't, resize it on the iPhone before sending it to the watch.

If you want to change the size anyway, call setWidth(_:) and setHeight(_:). This will also change the scaling mode of your image to "scale to fill".

Upvotes: 1

Related Questions