I am having a hard time setting up custom NSCells.
How can I set up a custom NSCell that displays parameters from an array that contains object with more than one property?
I have already managed to make a custom NSCell by overriding the "drawWithFrame
NSRect)cellFrame inView
NSView *)controlView" method.
But how do I manage to display information with multiple values in a Cell?
How can I set up a custom NSCell that displays parameters from an array that contains object with more than one property?
I have already managed to make a custom NSCell by overriding the "drawWithFrame
Code:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
NSString *firstNameString = [self objectValue];
NSPoint textPoint;
textPoint.x = cellFrame.origin.x + 1;
textPoint.y = cellFrame.origin.y;
NSDictionary *textAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [NSColor blackColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize:13], NSFontAttributeName, nil];
[firstNameString drawAtPoint:textPoint withAttributes:textAttributes];
}
But how do I manage to display information with multiple values in a Cell?