Sam Soffes changelog.com/posts

INAppStoreWindow - A Mac App Store style Cocoa NSWindow subclass

This is handy NSWindow subclass that lets you center the traffic lights (close, minimize, and zoom) or do custom drawing in the window’s title bar. INAppStoreWindow doesn’t use any private APIs, so it’s App Store friendly. It also supports ARC or non-ARC.

The custom drawing is really simple. You just give it a block:

[self.window setTitleBarDrawingBlock:^(BOOL drawsAsMainWindow, CGRect drawingRect, CGPathRef clippingPath){
    // Custom drawing code!    
}];

David Keegan has a little demo app you can checkout as well.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00