Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. let image = self.overlayImageView[cell1]
  2.  
  3. image.clipsToBounds = true
  4.  
  5. image.center.x -= image.bounds.width
  6.  
  7. UIView.animateWithDuration(0.75, animations: { () -> Void in
  8.  
  9. image.center.x += image.bounds.width
  10.  
  11. }) { (Bool) -> Void in
  12.  
  13. //completion handler
  14.  
  15. }
  16.  
  17. cell.clipsToBounds = true
  18.  
  19. button.clipsToBounds = true
  20.  
  21. let image = UIImage(named: answeredCorrectlyImage)
  22.  
  23. button.addSubview(cell) //this was all that was missing
  24.  
  25. cell.center.x -= cell.bounds.width
  26.  
  27. if users == 1...5 && cell.hidden == true {
  28.  
  29. button.enabled = false
  30.  
  31. cell.hidden = false
  32.  
  33. cell.image = image
  34.  
  35. UIView.animateWithDuration(2.0, animations: { () -> Void in
  36.  
  37. cell.center.x += cell.bounds.width
  38.  
  39. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement