0

I needed to implement the following code in my image view to make a gif properly animate:

self.homeView.radarImageView.animates = YES;
self.homeView.radarImageView.canDrawSubviewsIntoLayer = YES;
self.homeView.radarImageView.image = currentData.radarImage;

Unfortunately, the canDrawSubviewsIntoLayer method is not compatible with OSX prior to 10.9. Is there an alternative approach that I can use that will make this work in OSX 10.7 and higher?

wigging
  • 8,492
  • 12
  • 75
  • 117

1 Answers1

0

avoid layer-based views under 10.8 and below as they don't seem to mix well with animated gifs

see: How to display animated GIF in Objective C on top of the layered View?

edit:

as asked in the comment, one can draw gradients (and all other effects without using layers)
For Gradients for example there is NSGradient that takes NSColors and can fill a rect

shameless plug:

A NSView that can draw all that you ever want in your background: color, gradient, patttern image, just an image, a border, rounded corners... all in one view https://github.com/Daij-Djan/DDBackgroundView

Community
  • 1
  • 1
Daij-Djan
  • 49,552
  • 17
  • 113
  • 135
  • I have layered backed views so I can create a gradient color for the background. How would I do this if the view is not layer backed? – wigging Jul 19 '14 at 03:29