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
Post a Comment