Automatically hide toolbar when it is not in use.

Posted by Koning WWWWWWWWWWWWWWWWWWWWWWW on Stack Overflow See other posts from Stack Overflow or by Koning WWWWWWWWWWWWWWWWWWWWWWW
Published on 2010-05-20T15:08:05Z Indexed on 2010/05/20 16:20 UTC
Read the original article Hit count: 243

Filed under:
|
|
|

I am creating a Cocoa Application for Mac OS 10.6 >, and I want to hide the toolbar of an NSWindow automatically when it is not in use for at least 30 seconds. I think this can be done with NSTimers, but I'm not familiar with them and I don't know how I can implement this.

Another problem is that both the NSToolbarDelegate and NSWindowDelegate protocols don't have delegate methods like toolbarDidShow:

Can anyone point me in the right direction? Thanks.


PS. This is not to punish the user, but rather give the user a cleaner window (the window consist of only a toolbar for color and font and a text-view).


PPS. Can the hide-toolbar-animation lead into a problem with the cursor while the user is typing?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c