uiimageview animation stops when user touches screen <p>I have a UImageview with animated image. i am adding the uiimageview in code and its a part of a CollectionViewCell When the user touches the cell the animation stops, why does this happen?</p> <p>code:</p> <pre><code> var images: [UIImage] = [] for i in 0...10 { images.append(UIImage(named: "image\(i)")) } let i = UIImageView(frame: CGRect(x: xPos, y: yPos, width: 200, height: 200)) i.animationImages = images i.animationDuration = 0.5 i.startAnimating() i.contentMode = UIViewContentMode.Center i.userInteractionEnabled = false self.addSubview(i) </code></pre>