问题的标题说明了一切。为了获得更多帮助,我想告诉我,我的应用程序是使用Apple Photo Scroller开发的(Apple的PhotoScroller示例代码的修改,用于在UIViewController子类中加载UIPageViewController ),有多个图像库。问题是在ipad2上完全适用于缩放功能,但在视网膜iPad上却没有。我的图片大小为2048x1536。
有人可以告诉我为什么缩放不适用于视网膜iPad吗?
答案 0 :(得分:0)
首先检查contentScaleFactor
是否设置为1。
来自PhotoScroller的TilingView.m文件:
// to handle the interaction between CATiledLayer and high resolution screens, we need to
// always keep the tiling view's contentScaleFactor at 1.0. UIKit will try to set it back
// to 2.0 on retina displays, which is the right call in most cases, but since we're backed
// by a CATiledLayer it will actually cause us to load the wrong sized tiles.
//
- (void)setContentScaleFactor:(CGFloat)contentScaleFactor
{
[super setContentScaleFactor:1.f];
}