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

                closeButton.rightAnchor.constraint(equalTo: view.rightAnchor, constant: 0.0),
                closeButton.heightAnchor.constraint(equalToConstant: 52.0),
                closeButton.widthAnchor.constraint(equalToConstant: 52.0),
                ].forEach { $0.isActive = true }
            
        }

    @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) {
