Created
August 15, 2009 18:33
-
-
Save ddribin/168421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Allow hiding of disclosure triangles. | |
| * Taken from: | |
| * | |
| * http://blog.petecallaway.net/?p=11 | |
| */ | |
| - (NSRect)frameOfOutlineCellAtRow:(NSInteger)row; | |
| { | |
| BOOL showTriangle = YES; | |
| SEL selector = @selector(bm_outlineView:shouldShowDisclosureTriangleForItem:); | |
| if ([[self delegate] respondsToSelector: selector]) | |
| { | |
| id item = [self itemAtRow: row]; | |
| showTriangle = [[self delegate] bm_outlineView: self | |
| shouldShowDisclosureTriangleForItem: item]; | |
| } | |
| if (showTriangle) | |
| return [super frameOfOutlineCellAtRow: row]; | |
| else | |
| return NSZeroRect; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment