【发布时间】:2021-05-21 04:01:37
【问题描述】:
这是来自 Mac OS X 的代码。我想将它们转换为 iOS。
- (void)drawRect:(NSRect)rect {
NSGraphicsContext *gc = [NSGraphicsContext currentContext];
[gc setShouldAntialias:YES];
NSAffineTransform *trans;
if ([NSGraphicsContext currentContextDrawingToScreen]) {
trans = [NSAffineTransform transform];
[trans scaleXBy:zoom yBy:zoom];
[trans concat];
}
if ([NSGraphicsContext currentContextDrawingToScreen]) {
trans = [NSAffineTransform transform];
[trans translateXBy:0 yBy:10.0];
[trans concat];
}
}
NSAffineTransform如何转换成CGAffineTransform
感谢您的帮助~
【问题讨论】:
标签: ios objective-c macos