I am using Xcode to create a Cocoa app for Mac OSX written in Objective-C. I was wondering if I could use an NSTimer to make a label Smoothly disappear after a certain time after I have clicked a button.
Or I thought I could use this code:
- (IBAction)clickToLoadAppButtonClicked:(id)sender; {
[self performSelector:@selector(delayedLoad) withObject:nil afterDelay:3.0]
}
All I would need to do would be to add a void function called delayedLoad. I just need to know the code to make the label smoothly disappear so I can put it in the void…
Please help and thanks guys 😀
You can do it using core animation:
This animates to transparent over a default period of 0.25 seconds.
See here for some further explanation or here for the full docs.