             layoutCloseButton()
         }
         
+        if visibleShareButton {
+            view.addSubview(shareButton)
+            layoutShareButton()
+        }
+        
         // Caption Background
         view.addSubview(captionBackgroundView)
         

    public weak var delegate: PhotoSliderDelegate?
    public var visiblePageControl = true
    public var visibleCloseButton = true
    public var currentPage = 0
    public var captionNumberOfLines = 3
    public var openableActivityController = false

    @objc func closeButtonDidTap(_ sender: UIButton) {
        delegate?.photoSliderControllerWillDismiss?(self)
        dissmissViewControllerAnimated(animated: true)
    }
    
    @objc func shareButtonDidTap(_ sender: UIButton) {
        guard let currentImage = imageViews[currentPage].imageView.image else { return }
        
        let imageToShare : [UIImage] = [ currentImage ]
        let activityViewController = UIActivityViewController(activityItems: imageToShare, applicationActivities: nil)
        activityViewController.popoverPresentationController?.sourceView = self.view // so that iPads won't crash

        present(activityViewController, animated: true, completion: nil)
    }
    
    override public func viewWillAppear(_ animated: Bool) {
