Can anyone tell me how to use NSTitlebarAccessoryViewController, to add subview to a view with an example? As I am new to mac programming you may have to explain from basics. Please.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- back button text does not change
- iOS (objective-c) compression_decode_buffer() retu
- how to find the index position of the ARRAY Where
相关文章
- 现在使用swift开发ios应用好还是swift?
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- Popover segue to static cell UITableView causes co
- “Storyboard.storyboard” could not be opened
NSTitlebarAccessoryViewController
is for adding subviews to the windows title bar.Here is a example: Set up a
view
in interface builder. Go to the `applicationDidFinishLaunching: method to add the view to the title bar.The code would be the following:
You can play with the size of the view to make it fit into the title bar.
Update
OS X 10.11 introduced the new
layoutAttribute
left
. There are now threelayoutAttribute
s in total.bottom
adds a bar beneath the titleBar (like the tabBar) andleft
/right
places your subview within the titleBar.