如果我将图像绘制到CGContext中,当我稍后将其制作为图像时,它将按预期工作。但是,当我想通过将X轴缩放-1来镜像这个图像时,生成图像的相同代码会生成一个全白图像-即。不起作用。我遗漏了什么?let context = CGContext(data: nil, width: Int(aspectFitSize.width), height: Int(aspectFitSize.height)this line causes the problem; it's fine without it,