Reputation: 351
I am trying to get the below effect in OS X.
I found out the first step is to create a custom toolbar, then hide the window title.
I have managed to hide the window title but I am new to OS X development so I am not sure how to create a custom toolbar.
Here is the effect I am trying to create (toolbar with a search field and maybe some buttons).
Upvotes: 3
Views: 1877
Reputation: 4966
You can easily customize the toolbar in Interface Builder. Click on the toolbar
that you have dragged into the window
. Now you can remove all the items in there and add the ones you would like to have. You can add anything from TextFields
, Buttons
to custom views
.
Add items by dragging them from the object library into the "Allowed Toolbar Items" section. From there, drag them into the "Default Toolbar Items" section. Otherwise the control will be available to the user, but not in the toolbar until he customizes it.
You can align the controls by using the space and flexible space objects that can be found in the objects library of Xcode.
Aligning the controls works via drag and drop.
To center controls, simply add flexible spaces to the left and right of the control.
Upvotes: 5