NSCellのを回転させる方法
-
26-09-2019 - |
質問
私は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];}
解決
[self setBoundsRotation:90];
[self setNeedsDisplay];
さて、私はちょうど水平から垂直に変更にサイズ変更可能なエッジを取得する方法を見つけ出す必要がある...
所属していません StackOverflow