iTunes-style NSWindow subclass?

后端 未结 3 1203
南方客
南方客 2020-12-08 12:52

Is there an open-source library for Cocoa to create a window following iTunes\' style? That is the window controls are laid out vertically instead of horizontally:

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 13:20

    You'll probably have to subclass NSWindow, NSView and do the window and buttons drawing yourself.

    Oh and just wanted to add that you lose some quite important details doing custom drawing. Since the drawing is done in the main thread and your main thread might get busy doing some heavy important task blocking the main thread execution for a while, user won't be able to move the window and they button mouse over animation won't work.

    Unless of course you implement mouse listening events in another thread, do the drawing there, lock focus... What I meant was - don't bother unless you really think this will make your app much better :)

提交回复
热议问题