ios - Setting Animation behaviour for UIImageView -
i have image view circle upper half in black , lower half white black circle @ center.
if swipe white color should increase both ends simultaneously... have added uiswipegesturerecognizer , gestures detected
how increase color lower half using animation?
is there way can set alpha value while swiping up, using animation?
several things:
a swipe gesture one-shot. fires once, , doesn't give chance animate user drags. want pan gesture recognizer that.
there no off-the-shelf animation animate color changes different parts of image describe. you'll have create own. description kind of vague, it's bit hard give suggestions. want replace previous contents of image view pure white, coming top , bottom, or want brighten original image view towards white? need describe effect you're after in lot more detail. effect after using core animation , either cagradientlayer or cashapelayer. gradient layer act either overlay cover image view underneath, or mask reveal new image on top in final state you're after.
as question #2, animating alpha trivial. again, need use pan gesture recognizer, not swipe gesture recognizer. adjust alpha value of view pan position moves view. trigger crossfade style animation swipe gesture, , use uiview animation methods animatewithduration:animations:
Comments
Post a Comment