         }
     }
     
-    func scrollViewDidScroll(scrollView: UIScrollView) {
+    func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
         let pageSize: Float = Float(view.bounds.size.width)
         var page: Float = floorf((Float(scrollView.contentOffset.x) - pageSize / 2.0) / pageSize) + 1
         let numPages = eventImages?.count

            animateHeaderColorChanges(direction)
            dragStartingPoint = CGPoint(x: loc.x, y: loc.y)
            initialDragOffset = contentView.frame.origin.y
        } else if sender.state == .Changed {
            let dy = loc.y - dragStartingPoint.y
            contentView.frame.origin.y = initialDragOffset + dy
            if currentImageView != nil {
                currentImageView?.transform = CGAffineTransformTranslate(currentImageView!.transform, 0, dy/50)
            } else {
                println("current image view is empty during dragging")
            }

            self.view.layoutIfNeeded()
            
            if self.currentImageView != nil {
                self.currentImageView?.frame.origin.y = 0
            }
            }) { (completed) -> Void in
                if completed {
