                 completion: { _ in
                     tempMask.removeFromSuperview()
                     imageViewer.view.removeFromSuperview()
-                    self.transitionInfo.fromView!.alpha = 1
+                    self.transitionInfo.fromView?.alpha = 1
                     transitionContext.completeTransition(true)
                 }
             )

    public convenience init(imageInfo: GSImageInfo, transitionInfo: GSTransitionInfo) {
        self.init(imageInfo: imageInfo)
        self.transitionInfo = transitionInfo
        if let fromView = transitionInfo.fromView, let referenceView = fromView.superview {
            self.transitioningDelegate = self
            self.modalPresentationStyle = .custom
            transitionInfo.convertedRect = referenceView.convert(fromView.frame, to: nil)
        }
    }
    

        self.fromView = fromView
    }
    
    public init(fromRect: CGRect) {
        self.convertedRect = fromRect
    }
    
    weak var fromView : UIView?
    
    fileprivate var convertedRect : CGRect?
