ios - UIView.transitionWithView not animating -


i'm trying animate change of image in uiimageview using transitionwithview. image changes, doesn't seem animating. not sure why happening.

here's code:

func changebackgroundatindex(index : int) {         switch index {         case 0:             animatechangewithimage(mlstylekit.imageofaboutme)         case 1:             animatechangewithimage(mlstylekit.imageofprojects)         case 2:             animatechangewithimage(mlstylekit.imageofskills)         case 3:             animatechangewithimage(mlstylekit.imageofeducation)         case 4:             animatechangewithimage(mlstylekit.imageofthefuture)         default:             animatechangewithimage(mlstylekit.imageofaboutme)         }     }      func animatechangewithimage(image : uiimage) {         uiview.transitionwithview(backgroundimageview, duration: 0.4, options: uiviewanimationoptions.transitioncrossdissolve, animations: { () -> void in             self.backgroundimageview.image = image         }, completion: nil)     } 

any ideas? :)

change function signature this, take both image want change , uiimageview itself. func animatechangewithimage(image: uiimage, inimageview: uiimageview)


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -