Reputation: 32247
I know you can mask an image in ios, but can you mask a scrollview? I'm wanting to alpha mask my scrollview so that the content on the ends appears to fade out before it gets clipped by the scrollview. Is something like this possible?
FYI I have already tried work-arounds that "fake" this effect and they don't work due to a dynamic background. I need strict alpha masking on the scrollview if at all possible.
Upvotes: 4
Views: 1732
Reputation: 1034
You can do this nicely by using layer masking:
It is all explained very well here: http://www.cocoanetics.com/2011/08/adding-fading-gradients-to-uitableview/
Upvotes: 1
Reputation: 9902
You can fake this effect by laying over an image with alpha over the end of the scrollview. That way the fading effect stays in place, and the scrollView appears to fade out.
Upvotes: 1
Reputation: 2396
Could you implement a footer (or last cell) that has the appropriate alpha fade to give you the effect you are looking for?
Upvotes: 0