I have a view that takes a pan gesture. So that view can translate. I gradually want to change the alpha of the view taking the pan gesture from 1.0 to 0.0 as it is moving close to another view so that there is no abrupt overlapping of the frames of two views. How can i achieve this?
Asked
Active
Viewed 322 times
2 Answers
0
I do not think there is a method for assigning different alpha value to different region of a single view.
As a workaround, you can have an overlay view with same color as the background, or set an image on the view which has gradually increasing alpha and allow the target view to slide under this overlay view.

metsburg
- 2,021
- 1
- 20
- 32
0
You have to do some work in a CALayer
, Check the answer by @robmayoff from below SO question, I think it could help:

Community
- 1
- 1

Tarek Hallak
- 18,422
- 7
- 59
- 68