Question

I am triggering an iOS animation to move some elements around on my screen, and when I do so, an area at the bottom of the screen (away from where I think I'm doing the operation) changes shade slightly. When I turn on 'show blended layers' in the iPhone simulator, it's clear that at the beginning of my animation, something starts overlaying that area, but I cannot figure out what. The view that I'm adding to my screen is a composite view, including a scrollview and an overlay -- something in there is overflowing the bounds it should be in, and I can't figure out what. The simulator obviously knows what it is -- it's happy to color it red for me as a blended layer -- but I can't get it to tell me what layer is being blended so I can fix it. How do I do this?

ETA: If I turn on clipsToBounds on the inserted view, my problem goes away. But I'd still like to know how to identify layered views when I'm trying to debug. Is there a way?

Was it helpful?

Solution

Try animating it all, but each time hide one more subview until one moment, when a subview is removed and problem is no longer visible - You will know which view is faulty.

Better is to go [view subviews] - to really access them all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top