Visual guide of AppKit controls? - cocoa

Is there a visual guide to the controls in Mac OS/X AppKit?
Take, for instance, the following control that appears at different places in XCode UI:
I don't know which AppKit control is that. Any ideas?

It looks like a series of NSRadioButton views in an NSMatrix. You can determine the former using Accessibility Inspector, which will tell you that these buttons are of the accessibility class AXRadioButton. You can determine the latter using f-script. (You'll need the new 10.7 injection workflow that isn't in 2.1 yet.)

Related

How to make preferences menu item in the menu to display user preferences in os-x application? [duplicate]

I would like to create a preferences window like in the standard Mac OS X apps (Safari etc.). I have found resources like DBPrefsWindowController from back in 2008 that matches the Apple HIG.
Just wondering if there is a new way to accomplish this? I can't locate any standard windows in Interface Builder so I assume Apple doesn't provide those, nor can I locate a official Apple sample code for providing this standard UI.
Thank you
It seems DBPrefsWindowController is no longer available.
For now, I would recommend the up to date RHPreferences framework.
Available on GitHub. BSD Licensed.
It’s a simple and easy Preferences window controller with multiple tabs for your next Mac application.
It also provides:
Auto resizing between different sized tab views (With animation)
Custom NSToolbarItem support
Persistence of the last used tab
Support for placeholder NSToolbarItems (eg NSToolbarFlexibleSpaceItemIdentifier & NSToolbarShowFontsItemIdentifier)

Text tabbed interface new to Lion

I like the new tab interface displayed in the Lion “About This Mac” window. It's not gorgeous, but I think it's extremely useful in presenting information where icons would most probably fail to do a good job.
Question is: is that UI available from standard Cocoa components? I.e., can something similar to it be built with Xcode, without resorting to custom classes with custom drawing code?
Isn't that just a toolbar without images?

Cocoa - XCode style notification window

Is the semi-transparant notification window which XCode 4 shows on Snow Leopard and on Lion a standard Cocoa control or is it something custom? I've seen more and more apps with similarly styled popups, and don't want to go about reinventing something if a much cleaner implementation exists in Cocoa. If this is a standard control, could someone tell me the name or point me to the documentation for it?
This is the popup window I am referring to:
This is custom but Matt Gemmell has sample code at http://mattgemmell.com/source. It's called RoundedFloatingPanel.

How can I create an iOS-style toolbar in my Mac Cocoa application?

Several iLife '11 applications on the Mac use iOS-style black toolbars. For instance, the toolbar at the bottom of this screenshot of iPhoto:
(source: pocket-lint.com)
This sort of look is available in the iOS SDK as "UITabBar."
I am wondering if there is an easy way to achieve this in my ordinary, non-iOS Mac application. If not, what would be the best way to go about creating this effect?
There's nothing that will give you this view out of the box. You'll need to build it yourself.
The simplest method would be to create a custom view with a gradient background and place monochrome buttons in it.
Better would be to create a set of classes similar to NSToolBar that handle positioning, highlighting etc. Even better, build it and then open-source it :-)
However, you'll have to build it yourself. Apart from NSButton there's not much that will help in the pre-existing objects.

Where do I find the "Collapsible Panel" Cocoa control in Interface Builder?

I'm trying to add a collapsible panel to a panel I added in the Interface Builder, similar to the one found in Office 2008 and XCode itself.
This is the collapsible panel for those that don't know it:
OS X collapsible panel http://grab.by/3Hqv
Any idea how I can add this to my project? Google hasn't been of much help.
This is most often referred to as a "disclosure view" or "disclosure panel" and usually has to come with an intelligent container view (that grows/shrinks/scrolls correctly with multiple disclosure subviews). There is no such control as part of the API. Most developers roll their own while some use third-party open source.
The Omni Frameworks have one such control that works very well (including "tear-off" panels, etc., if I recall correctly). The drawback: it's a large framework and has a lot of other stuff in it as well.
InspectorKit is another. It's more focused (just the control itself and an IB plugin), but the last incarnation I tested did have a few UI issues with the Interface Builder plugin.
I've also written a framework for handling this: SFBInspectors

Resources