首先,watchOS中帧动画的操作被单独封装成了一个协议,当然,WKInterfaceImage类是遵守了这个协议的: public protocol WKImageAnimatable : NSObjectProtocol NSTimeInterval, repeatCount: Int) //停止播放动画 public func stopAnimating() } 创建帧动画的步骤与一些注意: 1、关联一个视图中的WKInterfaceImage 对象 2、所有帧动画的图片帧必须有统一的格式:比如image1.png,image2.png等等 3、给WKInterfaceImage对象设置帧前缀: imageInterface.setImageNamed
WKInterfaceImage 使用 WKInterfaceImage 类似于 UIImageView, 使用时,可用setImage 来设置图片。