Filling gradient in NSTableHeaderView not working properly
Filling gradient in NSTableHeaderView not working properly
- Subject: Filling gradient in NSTableHeaderView not working properly
- From: Devarshi Kulshreshtha <email@hidden>
- Date: Tue, 13 Dec 2011 20:39:32 +0530
Hi all,
I am trying to fill gradient in header of tableview. So far I am able to
achieve it by subclassing NSTableHeaderView and using this code in
it-
- (void)drawRect:(NSRect)dirtyRect {
// Drawing code here.
NSGradient *gradientToFill = [[NSGradient alloc]
initWithStartingColor:[NSColor colorWithCalibratedRed:0.8828125 green:
0.8984375 blue:0.91015625 alpha:1.0]
endingColor:[NSColor colorWithCalibratedRed:
0.5546875 green:0.59765625 blue:0.66015625 alpha:1.0] ];
[gradientToFill drawInRect:dirtyRect angle:90];
}
So earlier it was appearing like this-
http://db.tt/PVE9rnXu<http://www.google.com/url?sa=D&q=http://db.tt/PVE9rnXu&usg=AFQjCNEIuYicJ1GFjsSvZcX0sqWsacM94g>
Now it is appearing like this-
http://db.tt/D1zrJJJa<http://www.google.com/url?sa=D&q=http://db.tt/D1zrJJJa&usg=AFQjCNEV4NOJZ4OehohH4aQmXMeFpfZk3A>
As shown in above screen-shot, when I used this code I faced few problems:
1. Column header titles are not getting displayed.
2. Header column separators are not appearing.
Can anyone suggest me how to resolve these problems or some better way to
implement it?
Thanks !
_______________________________________________
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