From cb072baddde141321787f46b96a69e4fca9ec672 Mon Sep 17 00:00:00 2001 From: wzxjiang Date: Sun, 8 Apr 2018 16:48:26 +0800 Subject: [PATCH] add -enableSelect --- PhotoBrowser/PhotoBrowser.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PhotoBrowser/PhotoBrowser.swift b/PhotoBrowser/PhotoBrowser.swift index fa7cdf8..2e771bc 100644 --- a/PhotoBrowser/PhotoBrowser.swift +++ b/PhotoBrowser/PhotoBrowser.swift @@ -48,7 +48,6 @@ open class PhotoBrowser: UIPageViewController { var isFullScreen = false var headerView: PBNavigationBar? - open var photos: [Photo]? { didSet { if let photos = photos { @@ -85,12 +84,17 @@ open class PhotoBrowser: UIPageViewController { open var toolbar: PBToolbar? open var backgroundColor = UIColor.black open weak var photoBrowserDelegate: PhotoBrowserDelegate? - open var enableShare = true { + open var enableShare: Bool = true { didSet { headerView?.rightButton.isHidden = !enableShare headerView?.updateShareStatus(enableShare) } } + open var enableSelect: Bool = true { + didSet { + headerView?.rightButton.isHidden = !enableSelect + } + } open var currentIndex: Int = 0 open var currentPhoto: Photo? {