Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何更改 WKInterfaceImage 对象的大小?官方文档没有提供任何方法来完成这个简单的步骤。
UIImage您提供给 a 的应该WKInterfaceImage已经具有所需的大小。如果没有,请先在 iPhone 上调整大小,然后再将其发送到手表。
UIImage
WKInterfaceImage
如果您仍然想更改大小,请调用setWidth(_:)and setHeight(_:)。这也会将图像的缩放模式更改为“缩放填充”。
setWidth(_:)
setHeight(_:)