How can I create the floating, translucent, black notifications Xcode 4 and some other apps use to notify users of events?
This screenshot shows Xcode's "Build Succeed开发者_高级运维ed" notification as an example.
Thanks in advance.
My answer here How to implement HUD-style window like Address Book's “Show in Large Type” could serve as a pretty good starting point. You would want to up the radius on the rounded NSBezierPath
that's drawn, and set the opacity lower in the window so it matches that of the Xcode notification.
Also checkout the RoundedFloatingPanel
example project by Matt Gemmell:
http://mattgemmell.com/source/
Have a look at the code (Open Source) for Growl.
It might give you some ideas.
精彩评论