Jeff
Jeff

Reputation: 14279

How is this Cocoa window architected?

I'm designing and building a Cocoa app (OX X, not a Cocoa Touch iOS app). I see other apps like Evernote, Chrome or Xcode have complicated, interesting top bars for their windows. How are these designed? Is it a custom window? If so, what is done to add the extra real estate?

A regular top bar looks like:

enter image description here

Evernote's top bar looks like

enter image description here

Upvotes: 1

Views: 73

Answers (1)

Caleb
Caleb

Reputation: 124997

How are these designed?

They're almost certainly using NSToolbar, a Cocoa class that makes it easy to add a number of icons, buttons, search bars, etc. to the top of a window such that the items look like part of the window title bar. It's impossible to know what they're using just by looking at them, but NSToolbar is one way to get that effect.

Here's a good example straight from the linked documentation:

Keynote toolbar

Upvotes: 2

Related Questions