• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ScreenSaverView and Core Animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScreenSaverView and Core Animation


  • Subject: Re: ScreenSaverView and Core Animation
  • From: Brian Williams <email@hidden>
  • Date: Tue, 5 Feb 2008 12:21:42 -0800 (PST)

I'll anwser my own question for the sake of the archives.

The problem was here

>[[NSImage imageNamed:@"water"]
drawInRect:NSRectFromCGRect(CGContextGetClipBoundingBox(context))
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];

[NSImage imageNamed:@"water"} returns nil in the screen saver frame work
apparently. It worked fine when it was in a regular app.

so I changed it to use:

NSBundle *programBundle = [NSBundle bundleForClass:[self class]];
NSString *path = [programBundle pathForResource:@"water" ofType:@"jpg"];
NSImage  *backgroundImage = [[NSImage alloc] initWithContentsOfFile:path];

and it works. So no problem with CA, just my debugging skills :)


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: ScreenSaverView and Core Animation (From: Brian Williams <email@hidden>)

  • Prev by Date: Re: CoreData: Can't modify an immutable model
  • Next by Date: Animation with CALayer?
  • Previous by thread: Re: ScreenSaverView and Core Animation
  • Next by thread: Standard Permissions and/or ACLs in OS X
  • Index(es):
    • Date
    • Thread