質問

私は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];

さて、私はちょうど水平から垂直に変更にサイズ変更可能なエッジを取得する方法を見つけ出す必要がある...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top