我正在创建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];}发布于 2010-09-03 01:49:58
[self setBoundsRotation:90];
[self setNeedsDisplay];现在,我只需要弄清楚如何让可调整大小的边缘从水平变为垂直……
https://stackoverflow.com/questions/3628790
复制相似问题