ios - Changing alpha value with increment of x coordinate value -
is possible give different alpha values same view @ same time? want display color in uiview, should faded out direction. means want alter alpha value within increasing x coordinate value.
yes can accomplish this, have remember range alpha value 0-1. in case can define can define alter according width ie
float changeinalphaperx = 1/self.frame.width; and getting changed x value, can do..
view.alpha = changeinalphaperx * x; hope helps..
ios objective-c
No comments:
Post a Comment