Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an iTunes like (playlists, library) left-sided (collapsible) navigation bar?

I am talking about the navigation area on the left side of iTunes for Library and Playlists. I'm wondering if this is a built in class (which I couldn't find documented) or something custom implemented by Apple.

I'm working an a mac application where I want to include that type of navigation. I want to allow people to "fold" the categories up by using the triangles. Do I need to write a custom implementation of this, or can I use some control in Interface Builder or some open source library?

Thanks!

like image 404
rksprst Avatar asked Mar 04 '09 05:03

rksprst


2 Answers

The bar is called a source list. In 10.5, you can use an NSTableView for this, as described here. Before 10.5, you'll have to resort to third-party implementations.

See also: "How would one implement a sidebar similar to Mail/iTunes/Finder/etc in Cocoa/IB?"

like image 175
Sören Kuklau Avatar answered Sep 29 '22 20:09

Sören Kuklau


You can also use NSOutlineView, as shown in this example

like image 24
Jesús A. Álvarez Avatar answered Sep 29 '22 22:09

Jesús A. Álvarez