NSViewAnimation and fading in NSWindow
NSViewAnimation and fading in NSWindow
- Subject: NSViewAnimation and fading in NSWindow
- From: "Kevin" <email@hidden>
- Date: Mon, 29 Jan 2007 20:06:36 +0000
- Importance: Normal
- Sensitivity: Normal
I have an NSWindow that I wish to fade in when my application starts. In IB, the "Visible at launch time" checkbox is unchecked so it's hidden when the app starts.
In applicationDidFinishLaunching:, I'm using the following code but it doesn't work:
NSDictionary *dict = [NSDictionary dictionary WithObjectsAndKeys:window, NSViewAnimationTargetKey, NSViewAnimationFadeInEffect,NSViewAnimationEffectKey,nil];
NSViewAnimation *animation = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict]];
[animation startAnimation]:
[animation release];
When my app runs, I don't see the window. The reverse, however, works. If I check the "Visible at launch time" checkbox, and change the animation effect to fade out, it works and the window fades out as soon as the app starts.
Am I missing something? I tried adding the start frame and end frame keys to the dictionary, but that didn't help.
Kevin
Sent via BlackBerry from Cingular Wireless
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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