开发者

Making UIScrollView (and contents) opaque

I'm trying to speed up my UIScrollView and one method I know of is to set everything to be opaque. I think I have done so, to my UIScrollView, its contentView, the contentView's 开发者_如何学GotiledLayer (I have a CATiledLayer as the actual useful bit that the users see), and on the UIView that all of this sits in. But despite all of that when I look it through the Core Animation instrument with 'Color Blended Layers' turned on the scrollview's contents are shaded red showing they are transparent. The only green bits are outside the bounds of the contentview (which I can only see when it pans out to the side and then bounces back).

Is there something built in to ScrollViews, or CATiledLayers that could be ignoring 'setOpaque:' or have I messed up my view hierarchy and left something not-opaque?


To answer the question "Have I messed up my view hierarchy and left something not-opaque?", from https://developer.apple.com/library/ios/technotes/tn2239/_index.html:

UIView implements a useful description method. In addition, it implements a recursiveDescription method that you can call to get a summary of an entire view hierarchy.

So, call -recursiveDescription on the topmost view, and check each subview for opaque = NO;.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜