首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何旋转nscell

如何旋转nscell
EN

Stack Overflow用户
提问于 2010-09-02 23:48:57
回答 1查看 188关注 0票数 0

我正在创建NSLevelIndicatorCell的一个子类,我想垂直绘制它。这不起作用,我哪里做错了?

代码语言:javascript
复制
- (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];}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-09-03 01:49:58

代码语言:javascript
复制
[self setBoundsRotation:90];

[self setNeedsDisplay];

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3628790

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档