|
@@ -45,7 +45,7 @@ class PQPhotoAlbumController: PQBaseViewController {
|
|
|
let emptyRemindView = PQEmptyRemindView(frame: albaumCollectionView.bounds)
|
|
|
emptyRemindView.isHidden = true
|
|
|
albaumCollectionView.addSubview(emptyRemindView)
|
|
|
- emptyRemindView.backgroundColor = UIColor.hexColor(hexadecimal: "#242424")
|
|
|
+ emptyRemindView.backgroundColor = PQBFConfig.shared.styleBackGroundColor
|
|
|
emptyRemindView.fullRefreshBloc = { [weak self] _, _ in
|
|
|
if emptyRemindView.refreshBtn.currentTitle == "授予权限" {
|
|
|
openAppSetting()
|
|
@@ -61,13 +61,14 @@ class PQPhotoAlbumController: PQBaseViewController {
|
|
|
anthorEmptyData.summary = "要挑选相册素材,请先授予相册使用权限"
|
|
|
anthorEmptyData.emptyImage = "icon_authorError"
|
|
|
anthorEmptyData.isRefreshHidden = false
|
|
|
+ anthorEmptyData.refreshBgColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
|
|
|
emptyRemindView.emptyData = anthorEmptyData
|
|
|
return emptyRemindView
|
|
|
}()
|
|
|
|
|
|
lazy var albaumView: UIView = {
|
|
|
let albaumView = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))
|
|
|
- let ges = UITapGestureRecognizer(target: self, action: #selector(dismissCategoryView))
|
|
|
+ let ges = UITapGestureRecognizer(target: self, action: #selector(gesTagClick))
|
|
|
albaumView.addGestureRecognizer(ges)
|
|
|
return albaumView
|
|
|
}()
|
|
@@ -180,6 +181,16 @@ extension PQPhotoAlbumController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// 点击隐藏view
|
|
|
+ /// - Returns: <#description#>
|
|
|
+ @objc func gesTagClick() {
|
|
|
+ if selectedHandle != nil {
|
|
|
+ selectedHandle!(nil)
|
|
|
+ }
|
|
|
+ albaumCollectionView.reloadData()
|
|
|
+ dismissCategoryView()
|
|
|
+ }
|
|
|
+
|
|
|
@objc func dismissCategoryView() {
|
|
|
if isTopShow {
|
|
|
UIView.animate(withDuration: 0.3, animations: {
|
|
@@ -189,7 +200,6 @@ extension PQPhotoAlbumController {
|
|
|
self.albaumView.isHidden = true
|
|
|
self.view.isHidden = true
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
albaumCollectionView.dismissViewAnimate { [weak self] _ in
|
|
|
self?.view.isHidden = true
|
|
@@ -251,6 +261,9 @@ extension PQPhotoAlbumController: UICollectionViewDelegate, UICollectionViewData
|
|
|
|
|
|
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
|
|
if (!isTopShow && (scrollView.contentOffset.y < -cDefaultMargin * 7)) || (isTopShow && scrollView.contentOffset.y > ((scrollView.contentSize.height - scrollView.frame.height) + cDefaultMargin * 10)) {
|
|
|
+ if selectedHandle != nil {
|
|
|
+ selectedHandle!(nil)
|
|
|
+ }
|
|
|
dismissCategoryView()
|
|
|
}
|
|
|
}
|