     private func animateTransitionWithDuration(duration: Double, imageView: UIImageView, nextImageView: UIImageView, completion: @escaping () -> ()) {
         UIView.animate(withDuration: duration,
                                    delay: 0.0,
-                                   options: UIViewAnimationOptions.curveEaseInOut,
+                                   options: UIView.AnimationOptions.curveEaseInOut,
                                    animations: {
                                        imageView.alpha = 0.0
                                        nextImageView.alpha = 1.0

        guard superview == nil else {
            notificationCenter.addObserver(self,
                                           selector: #selector(applicationWillResignActive),
                                           name: NSNotification.Name.UIApplicationWillResignActive,
                                           object: nil)
            notificationCenter.addObserver(self,
                                           selector: #selector(applicationDidBecomeActive),
                                           name: NSNotification.Name.UIApplicationDidBecomeActive,
                                           object: nil)
            return
        }

    private func buildDefaultImageView() -> UIImageView {
        let imageView = UIImageView(frame: bounds)
        imageView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
        imageView.contentMode = UIView.ContentMode.center
        self.addSubview(imageView)

        return imageView
