CALayer and view disappeared

孤人 提交于 2019-12-11 02:36:39

问题


I have a large image managed with CATiledLayer (like the Large Image Downsizing iOS sample code).

I had a drawing view (UIView overrided with drawing methods) on it but when I zoom a lot, I get the following message and my view disappeared..

-[<CALayer: 0xb253aa0> display]: Ignoring bogus layer size (25504.578125, 15940.361328)

Is there a way to avoid this ?


回答1:


Sounds like the levelsOfDetail and levelsOfDetailBias you are setting are allowing for more zoom than the tiled layer should allow given the max layer size allowable for the layer. Try changing those to lessen how much the user can zoom.

Here is a great article explaining some of the undocumented behavior of CATiledLayer.



来源:https://stackoverflow.com/questions/14023797/calayer-and-view-disappeared

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!