ios - How To Only Animate Contents of UIImageView -


how animate contents of uiimageview? if image view centered in middle of screen how animate image slide in left shown within frame of image view?

as if looking @ wall window , walks by. don't see them until in frame of window.

the code below not it. had few days ago ease , erased , can't remember how did it. pretty simple it's driving me crazy.

        self.lockimages[button.tag].center.x -= self.lockimages[button.tag].bounds.width           uiview.animatewithduration(2.0, delay: 0.0, usingspringwithdamping: 0.5, initialspringvelocity: 1.0, options: nil, animations: { () -> void in              self.lockimages[button.tag].center.x += self.lockimages[button.tag].bounds.maxx           }, completion: { (bool) -> void in           }) 

uiimageview subclass of uiview, inherits .clipstobounds() method, create desired effect.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -