zvonicek / ImageSlideshow

Swift image slideshow with circular scrolling, timer and full screen viewer
MIT License
1.77k stars 475 forks source link

Add optional property for defining a custom fullscreen close button. #394

Open thisisaaronland opened 4 years ago

thisisaaronland commented 4 years ago

This PR tries to build on https://github.com/zvonicek/ImageSlideshow/pull/385 but rather than defining new presets allows for a consume of the ImageSlideshow package to define a custom UIButton to use for ending fullscreen mode.

The button is assigned to the slideshow's fullscreenCloseButton property which is then assigned to the FullScreenSlideshowViewController's closeButtonCustom property. For example:

        let closeButton = UIButton()
        closeButton.setImage(UIImage(systemName: "xmark"), for: UIControl.State())
        closeButton.tintColor = .white

        slideshow.fullscreenCloseButton = closeButton