                     options: .curveLinear,
                     animations: { () -> Void in
                         self.captionLabel.alpha = 0.0
-                        self.captionBackgroundView.alpha = 0.0
+                        self.captionBackgroundView.backgroundColor = .clear
                 }, completion: { _ -> Void in
                     self.captionLabel.text = photo.caption
                     UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveLinear, animations: { () -> Void in
                         self.captionLabel.alpha = 1.0
                         if let captionText = self.captionLabel.text, !captionText.isEmpty {
-                            self.captionBackgroundView.alpha = 1.0
+                            self.captionBackgroundView.backgroundColor = self.captionBackgroundViewColor
                         }
                     }, completion: nil)
                 })

                self.closeButton.alpha = 1.0
                self.captionLabel.alpha = 1.0
                if let captionText = self.captionLabel.text, !captionText.isEmpty {
                    self.captionBackgroundView.alpha = 1.0
                }
                if self.visiblePageControl {
                    self.pageControl.alpha = 1.0

            UIView.animate(withDuration: 0.05, delay: 0.0, options: UIViewAnimationOptions.curveLinear, animations: { () -> Void in
                self.closeButton.alpha = 0.0
                self.captionLabel.alpha = 0.0
                self.captionBackgroundView.backgroundColor = .clear
                if self.visiblePageControl {
                    self.pageControl.alpha = 0.0
                }
