我遇到了一些问题,让UIView使用大型CAEAGLLayer来正确显示.如果帧高于某个大小(在任一维度上显然为768,且contentScaleFactor为2.0),则会使用先前版本缓冲区的扭曲图像重绘.
在Apple的GLPaint示例中重现它非常容易.PaintingView.m的硬编码contentScaleFactor为1.0,但如果将其更改为2.0:
self.contentScaleFactor = 2.0;
Run Code Online (Sandbox Code Playgroud)
并在Retina iPad(而不是模拟器)上运行它,当你绘制时你得到这样的东西: