Cocoa Grey Message Overlay

Various applications on Mac OS X display messages in a grey, transparent, rounded box overlay to notify the user of something; for example the "Build Succeeded" message in Xcode, the looped search message in the Lion inline-search bar and Chrome's "Warn Before Quitting" message.

An example of the message box I'm describing: http://2.bp.blogspot.com/-eG890NRhQbs/Ty0vLkqpBWI/AAAAAAAAAMs/PO2EbJ3lTs0/s1600/Xcode-11.png

As they're all very similar in formatting, it makes sense to assume there are some sort of standard functions for displaying a similar message. How can I have such an effect in my own Cocoa application?

Answers


There isn't a public system API to do them.

You could have a look at Matt Gemmell's version: scroll down to RoundedFloatingPanel on this page.

Alternatively, if you want to Google for others, they're often known as Bezels. The private framework that draws the system ones is BezelServices.


Need Your Help

Scrollview not working in ios7

ios iphone ios7 uiscrollview

I have scrollview in my xib. I have added it as subview of view. And I have added 2 labels in scrollview one is at top part and anotherone is at bootom. I have set:

Facebook PHP SDK - getLoginUrl() and getLogoutUrl() not working

facebook-graph-api login facebook-php-sdk logout

This is driving me insane, I can't figure out why this simple page would have problems letting me login and logout of my app?