I needed to implement the following code in my image view in order to properly set the gif:
self.homeView.radarImageView.animates = YES; self.homeView.radarImageView.canDrawSubviewsIntoLayer = YES; self.homeView.radarImageView.image = currentData.radarImage;
Unfortunately, the canDrawSubviewsIntoLayer method canDrawSubviewsIntoLayer not compatible with OSX until 10.9. Is there an alternative approach that I can use that will make this work in OSX 10.7 and higher?
canDrawSubviewsIntoLayer
avoid views based on layers below 10.8 and below, as they don't seem to mix with animated gifs
see: How to display an animated GIF in Objective-C on top of a layered view?
as indicated in the comment, you can draw gradients (and all other effects without using layers)For gradients, for example, there is an NSGradient that accepts NSColors and can fill a rectangle
NSView that can draw everything you ever wanted in its background: color, gradient, patttern image, just image, frame, rounded corners ... all in one view https://github.com/Daij-Djan / DDBackgroundView
Source: https://habr.com/ru/post/970121/More articles:How to transfer third-party password and account management to a third party? - securityWill different math processors get the same floating point results? - c ++HTTP interceptor restriction for a specific domain - angularjsWhen is the automatic return type applied? - c ++How to display an animated GIF in Objective-C on top of a layered view? - objective-cDisplaying C ++ Compilation Errors in VS 2013 Editor - c ++angular -leaflet-customive html with angular directives in the marker popup. How? - javascriptfixed-width double-string conversion - c ++Slick: why should I save "Unit" in my database? - scalaLifecycle / Navigation Management MediaCapture + CaptureElement - c #All Articles