I'm trying to create a super thin UIVisualEffectView (2 pixels tall) with a blur effect. I'm attaching it to the bottom of a collection view cell. The issue on scrolling the effect view flickers between a black color and the blur (sometimes it will remain black when I stop scrolling). When I increase the height to 3 pixels, it behaves normally.
Is there a limitation on how small I can make a UIVisualEffectView before it behaves unpredictably? If so, is there a workaround?
Based on the OP's comment...
UIVisualEffectViewwith blur effect uses adjacent pixels to generate the blur ... using a very small (in this case, 2-points-tall) view apparently causes the issue.To avoid that, use a slightly larger
UIVisualEffectViewand mask it to the desired 2-points height.