How to create source-list programmatically?
How to create source-list programmatically?
- Subject: How to create source-list programmatically?
- From: Hoon Hwangbo <email@hidden>
- Date: Sat, 19 Oct 2013 05:48:50 +0900
Hello.
Today, I spend a whole day to configure source-list.
It is typical job, but it work too hard for me because I wanted to avoid Interface Builder.
I configured NSOutlineView and subclassed NSTableCellView and assigned my own NSImageView and NSTextField
to the properties. I expected to will work like UITableView on iOS, but it never worked.
After all my trial failed, I discovered SidebarDemo(https://developer.apple.com/library/mac/samplecode/SidebarDemo/Listings/SidebarDemoAppDelegate_m.html) sample.
And I realized that just using image-view and text-field supplied by IB will clear all the problems.
I think IB is configuring something special classes, and those classes are don't seem to be accessible from plain Objective-C code.
Because, when I configured the text-field and image-view myself, NSOutlineView doesn't even try to layout it.
So should I always use the IB to make source-list correctly? Is there no *purely programatic* - with only code - way to do that?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden