I want to customize my NSTableView
. My overall requirements are like this:
- Each row will have one image and some text; images and text could be different.
- Some cells might not have an image.
- Row height is dependent upon some external factor.
- A cell shouldn't draw the background, it should show the
NSTableView
background.
So far I am able to draw transparent cells with some text. I Googled and found out I need to customize each cell. Now I have this question: should I maintain two columns or should one column be okay, having one image on the left hand side and text adjacent to that?
I also understand that I need to override two methods:
- (void) drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
So for each cell, I need to draw/construct the cell -- can anyone guide me? Am I going in the right direction? Can I achieve a transparent background with dynamic height with the above approach?