1

I'm trying to animate background image sitting in a glance. Though this approach works in an app, it doesn't for a glance:

@IBOutlet var iconGroup: WKInterfaceGroup!

override func willActivate() {
    super.willActivate()
    iconGroup.setBackgroundImageNamed("icon")
    iconGroup.startAnimatingWithImagesInRange(NSRange(location: 0, length: 8), duration: 0.3, repeatCount: 1000)
}

Does it at all work in a glance? Or what am I doing wrong?

Edit

According to Apple docs it should be possible:

You can use animated image sequences in your glance and notification interfaces.

andriys
  • 2,202
  • 2
  • 19
  • 24
  • Yes, you can use animated image sequences in your glance interface. (I could do so in my glance) Is your image file name icon[0-8].png ? – Kosuke Ogawa Nov 04 '15 at 04:24
  • @KosukeOgawa that is correct - my image is in icon[0-8].png format and the same code given above works when animating image in an app, but not in glance. – andriys Nov 04 '15 at 18:02
  • ran into similar problem while using 'icon0.png' on Interface.storyboard as image 'background'. You might want to leave the background field empty on the storyboard if you have set it to something. – danfelabs Jan 13 '16 at 16:18

0 Answers0