0
我正在做一个NSLevelIndicatorCell的子类,我想垂直绘制它。这不起作用,我做错了什么?现在如何旋转nscell
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView{
[[NSGraphicsContext currentContext] saveGraphicsState];
NSAffineTransform *transform = [NSAffineTransform transform];
[transform rotateByDegrees:90];
[transform concat];
[super drawWithFrame:cellFrame inView:controlView];
[[NSGraphicsContext currentContext] restoreGraphicsState];}
你是什么意思是“这行不通”吗? – 2010-09-02 16:21:10
它正在绘制指标超出界限。有没有办法转动整个控制器,而不是画出旋转的单元格? – joels 2010-09-02 17:37:48