0

我正在制作 NSLevelIndicatorCell 的子类,我想垂直绘制它。这不起作用,我做错了什么?

- (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];}
4

1 回答 1

0
[self setBoundsRotation:90];

[self setNeedsDisplay];

现在,我只需要弄清楚如何让可调整大小的边缘从水平变为垂直......

于 2010-09-02T17:49:58.480 回答