animated in gif in nsimageview inside a layer-backed view doesn't animate without workaround
| Originator: | Pich.Dominik | ||
| Number: | rdar://17089635 | Date Originated: | 1-Jun-2014 |
| Status: | Open | Resolved: | |
| Product: | OSX SDK | Product Version: | 10.9.3 |
| Classification: | UI | Reproducible: | Always |
Summary:
I have a gif that I want to show animated. It works fine as long the NSImageView or any of its superviews isn't layer backed.
as soon as there is a layer backed view in its path, it stops animating. The only workaround I found is setting canDrawSubviewsIntoLayer=YES
Steps to Reproduce:
Add a NSImageView with an animated gif inside a layer backed supview
Expected Results:
see it animate the gif
Actual Results:
see it won't animate the gif (except if I now set canDrawSubviewsIntoLayer=YES)
Notes:
workaround is to set canDrawSubviewsIntoLayer=YES on the image view.... which feels wrong :D
---
NSImageView *view = [[NSImageView alloc] initWithFrame:CGRectMake(10, 10, 50, 50)];
view.imageScaling = NSImageScaleNone;
view.animates = YES;
view.image = [NSImage imageNamed:@"FanBlades2_42x42.gif"];
view.canDrawSubviewsIntoLayer = YES;
NSView *layerview = [[NSView alloc] initWithFrame:CGRectMake(0, 0, 60, 60)];
layerview.wantsLayer = YES;
[layerview addSubview:view];
[self.window.contentView addSubview:layerview];
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!