Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'feature/fix-more-button-bug'
Browse files Browse the repository at this point in the history
  • Loading branch information
medisean committed Oct 10, 2017
2 parents 8a6f98b + f1a016d commit 5bca9e6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
5 changes: 5 additions & 0 deletions PhotoBrowser/PBCustomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class PBNavigationBar: UIView {
}
}
}
var isShowMoreButton: Bool = true {
didSet {
self.updateMoreButtonStatus(!isShowMoreButton)
}
}

lazy var contentView: UIView = {
let view = UIView()
Expand Down
6 changes: 6 additions & 0 deletions PhotoBrowser/PhotoBrowser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ open class PhotoBrowser: UIPageViewController {
}
}

open var isShowMoreButton: Bool = true {
didSet {
headerView?.isShowMoreButton = isShowMoreButton
}
}
open var isFromPhotoPicker: Bool = false
open var isPreviewMode: Bool = false
open var selectedIndex: [Int] = []
Expand Down Expand Up @@ -238,6 +243,7 @@ extension PhotoBrowser {
if let headerView = headerView {
headerView.isFromPhotoPicker = isFromPhotoPicker
headerView.isPreviewMode = isPreviewMode
headerView.isShowMoreButton = isShowMoreButton
headerView.alpha = 0
view.addSubview(headerView)
headerView.translatesAutoresizingMaskIntoConstraints = false
Expand Down
6 changes: 2 additions & 4 deletions PhotoBrowserDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
4A52D2131C72D13B001C257B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4A52D2121C72D13B001C257B /* Assets.xcassets */; };
4A52D2161C72D13B001C257B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A52D2141C72D13B001C257B /* LaunchScreen.storyboard */; };
4A8EB7231CEF068D0065EAB0 /* Kingfisher.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A6BC7BB1C770DE100DACDA5 /* Kingfisher.framework */; };
86AEF72E1EDEB9D100034DBA /* PhotoBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86AEF72D1EDEB9D100034DBA /* PhotoBrowser.framework */; };
869D74FB1F6784CF00765F38 /* PhotoBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 86AEF72D1EDEB9D100034DBA /* PhotoBrowser.framework */; };
AC570BBF1E247C550083620C /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC570BBE1E247C550083620C /* DetailViewController.swift */; };
/* End PBXBuildFile section */

Expand All @@ -40,7 +40,6 @@
4A52D2171C72D13B001C257B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4A6BC7BB1C770DE100DACDA5 /* Kingfisher.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kingfisher.framework; path = Carthage/Build/iOS/Kingfisher.framework; sourceTree = "<group>"; };
86AEF72D1EDEB9D100034DBA /* PhotoBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotoBrowser.framework; path = "../Library/Developer/Xcode/DerivedData/PhotoBrowser-atvddxmpufwrrkfytkysyblmhonv/Build/Products/Debug-iphonesimulator/PhotoBrowser.framework"; sourceTree = "<group>"; };
A168310A1E7ABDC200AA1DC9 /* PhotoBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PhotoBrowser.framework; sourceTree = "<group>"; };
AC570BBE1E247C550083620C /* DetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -49,7 +48,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
86AEF72E1EDEB9D100034DBA /* PhotoBrowser.framework in Frameworks */,
869D74FB1F6784CF00765F38 /* PhotoBrowser.framework in Frameworks */,
4A8EB7231CEF068D0065EAB0 /* Kingfisher.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -60,7 +59,6 @@
4A52D1FF1C72D13B001C257B = {
isa = PBXGroup;
children = (
A168310A1E7ABDC200AA1DC9 /* PhotoBrowser.framework */,
4A6BC7BB1C770DE100DACDA5 /* Kingfisher.framework */,
4A52D20A1C72D13B001C257B /* PhotoBrowserDemo */,
4A52D2091C72D13B001C257B /* Products */,
Expand Down
5 changes: 4 additions & 1 deletion PhotoBrowserDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ extension ViewController {
browser.actionItems = [item1, item2, item3, item4]
browser.photoBrowserDelegate = self
browser.currentIndex = 0
browser.enableShare = false
// browser.isFromPhotoPicker = true
browser.isShowMoreButton = false

// browser.isPreviewMode = false
presentPhotoBrowser(browser, fromView: imageView)
}
}
Expand Down

0 comments on commit 5bca9e6

Please sign in to comment.