Commit ab343dc0 authored by CZ1004's avatar CZ1004

Merge branch 'dev_main' of http://gitlab.zhangxindiet.com/ShuMing/phonemanager into dev_main

* 'dev_main' of http://gitlab.zhangxindiet.com/ShuMing/phonemanager:
  隐私空间删除弹窗
  优化
  ui 调整

# Conflicts:
#	PhoneManager/Class/Page/Home/Controller/HomePhotosDetailViewController.swift
parents 4bb2bced 76a77d75
{
"images" : [
{
"filename" : "ic_charging_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_charging_home_pre@2x.png",
"filename" : "ic_charging_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_charging_home_pre@3x.png",
"filename" : "ic_charging_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_cmpress_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_cmpress_home_pre@2x.png",
"filename" : "ic_cmpress_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_cmpress_home_pre@3x.png",
"filename" : "ic_cmpress_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_contacts_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_contacts_home_pre@2x.png",
"filename" : "ic_contacts_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_contacts_home_pre@3x.png",
"filename" : "ic_contacts_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_email_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_email_home_pre@2x.png",
"filename" : "ic_email_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_email_home_pre@3x.png",
"filename" : "ic_email_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_secret_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_secret_home_pre@2x.png",
"filename" : "ic_secret_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_secret_home_pre@3x.png",
"filename" : "ic_secret_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -7,7 +7,7 @@
import Foundation
class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigationControllerDelegate {
class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigationControllerDelegate, UIGestureRecognizerDelegate {
......@@ -66,9 +66,10 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
self.view.addSubview(self.guideScrollView)
self.view.addSubview(self.closeButton)
self.view.addSubview(self.pageControl)
navigationController?.delegate = self
titleView.model.isBackBtnShow = false
navigationController?.isNavigationBarHidden = true
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
navigationController?.interactivePopGestureRecognizer?.delegate = self;
self.closeButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-15)
make.top.equalToSuperview().offset(statusBarHeight + 15)
......@@ -130,9 +131,10 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
}
self.guideScrollView.addSubview(endView)
}
@objc func closeCurrentPage(){
self.navigationController?.popViewController(animated: true)
let vc = self.navigationController?.viewControllers.first
vc?.dismiss(animated: true)
}
@objc func jumpButtonAction(_ ges:UIGestureRecognizer){
......
......@@ -75,7 +75,7 @@ class ChargeGuideStartController : BaseViewController {
self.view.addSubview(self.detailTipTitleLabel)
self.view.addSubview(self.chargeView)
self.navigationController?.isNavigationBarHidden = true
self.backView.snp.makeConstraints { make in
make.left.right.bottom.top.equalToSuperview()
......@@ -116,11 +116,13 @@ class ChargeGuideStartController : BaseViewController {
}
@objc func closeCurrentPage(){
self.dismiss(animated: true)
self.navigationController?.dismiss(animated: true)
}
@objc func getStart(){
callback("getStart")
self.dismiss(animated: false)
@objc func getStart() {
let vc : ChargeGuideController = ChargeGuideController()
self.navigationController?.pushViewController(vc, animated: true)
// callback("getStart")
// self.dismiss(animated: false)
}
}
......@@ -62,12 +62,13 @@ class ChargeViewController:BaseViewController {
let vc : ChargeGuideStartController = ChargeGuideStartController()
vc.modalPresentationStyle = .fullScreen
self.present(vc, animated: true)
let navigation = UINavigationController(rootViewController: vc)
navigation.modalPresentationStyle = .fullScreen
self.present(navigation, animated: true)
vc.callback = {[weak self] text in
guard let self else {return}
let vc : ChargeGuideController = ChargeGuideController()
self.navigationController?.pushViewController(vc, animated: true)
// let vc : ChargeGuideController = ChargeGuideController()
// self.navigationController?.pushViewController(vc, animated: true)
}
}
......
......@@ -101,7 +101,9 @@ class ChargeGuideEndView : UIView{
}
}
@objc func closeCurrentPage(){
self.responderViewController()?.navigationController?.popViewController(animated: true)
let vc = self.responderViewController()?.navigationController?.viewControllers.first
vc?.dismiss(animated: true)
// self.responderViewController()?.navigationController?.popViewController(animated: true)
}
required init?(coder: NSCoder) {
......
......@@ -38,7 +38,7 @@ class CustomDupHeaderView : UITableViewHeaderFooterView {
if self.selectStatus {
selectLabel.text = "Select All"
}else{
selectLabel.text = "Unselect all"
selectLabel.text = "Deselect all"
}
let tap = UITapGestureRecognizer()
......@@ -78,7 +78,7 @@ extension CustomDupHeaderView {
@objc func cellSelectTap(){
if self.selectStatus {
self.subLabel.text = "Unselect all"
self.subLabel.text = "Deselect all"
}else {
self.subLabel.text = "Select All"
}
......
......@@ -86,7 +86,7 @@ class SelectAllButton : UIView {
private func updateText() {
imageView.image = isSelected ? UIImage(named: "ic_close_similar") : UIImage(named: "ic_check_similar")
label.textColor = isSelected ? UIColor(red: 0.4, green: 0.4, blue: 0.4, alpha: 1) : UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
label.text = isSelected ? "Unselect all" : "Select All"
label.text = isSelected ? "Deselect all" : "Select All"
// // 强制布局更新以适应新文本
// UIView.animate(withDuration: 0.1) {
......
......@@ -201,7 +201,7 @@ extension ContactDupNormalView : UITableViewDelegate,UITableViewDataSource{
if let tempData = self.selectData[String(section)] {
if tempData.count == self.dataSourceModel[section].count{
// 改变UI
view.subLabel.text = "Unselect all"
view.subLabel.text = "Deselect all"
}else {
view.subLabel.text = "Select All"
}
......
......@@ -49,21 +49,21 @@ class HomePhotosDetailViewController : BaseViewController {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: safeHeight + 78)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
}else if self.selectedModel.count == 1{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Photo", for: .normal)
UIView.animate(withDuration: 0.1) {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: 0)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
}else{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Photos", for: .normal)
UIView.animate(withDuration: 0.1) {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: 0)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
}
......@@ -200,6 +200,12 @@ class HomePhotosDetailViewController : BaseViewController {
self.deleteViewBottomConstraint = make.bottom.equalToSuperview().offset(safeHeight + 78).constraint
}
collectionView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(marginLR)
make.top.equalTo(self.videoDetailNavView!.snp.bottom)
make.bottom.equalToSuperview()
}
self.view.addSubview(self.defaultImageView)
self.defaultImageView.snp.makeConstraints { make in
make.width.height.equalTo(180)
......@@ -236,11 +242,13 @@ class HomePhotosDetailViewController : BaseViewController {
self.deleteButtonView.isHidden = array.count > 0
// 改变collection的位置
if array.count > 0 {
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
}else{
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
}
// if array.count > 0 {
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
// }else{
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
// }
self.videoDetailNavView?.startSelectButton.isHidden = (self.resourceData.count <= 0)
}
}
......@@ -610,6 +618,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
}
}
func referenceSizeForFooter(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize {
return CGSizeMake(ScreenW, 90)
}
func filterDataByDate(orgModels : [AssetModel], startDate:Date? ,endDate : Date?)->[AssetModel]{
var array = orgModels
if startDate != nil {
......
......@@ -16,22 +16,25 @@ class HomeDetailDeleteView: UIView {
view.setTitle("Delete", for: UIControl.State.normal)
view.setTitleColor(.white, for: .normal)
view.clipsToBounds = true
view.layer.cornerRadius = 23
view.backgroundColor = UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1)
view.layer.cornerRadius = 12
view.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold)
view.backgroundColor = UIColor.colorWithHex(hexStr: "#0082FF")//UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1)
view.setImage(UIImage(named: "pm-home-Frame-del"), for: .normal)
view.titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
view.addTarget(self, action: #selector(deleteButtonAction), for: .touchUpInside)
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
self.backgroundColor = .white
self.backgroundColor = .clear
self.addSubview(self.deleteButton)
self.deleteButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(15)
make.right.equalToSuperview().offset(-15)
make.height.equalTo(46)
make.left.equalToSuperview().offset(55)
make.right.equalToSuperview().offset(-55)
make.height.equalTo(45)
}
}
......
......@@ -31,13 +31,18 @@ class HomeTabbarView:UIView {
private func setupUI() {
backgroundColor = .white
self.setShadow(cornerRadius: 20)
}
override func layoutSubviews() {
super.layoutSubviews()
self.setShadow(cornerRadius: 40, sColor: UIColor.colorWithHex(hexStr: "#0082FF"), offset: CGSize(width: 0, height:-2),opacity: 0.1)
}
private func addButton() {
let cW:CGFloat = (self.width - 32) / Double(tabbarItems.count)
let cH:CGFloat = 54
let cH:CGFloat = 56
for (index,item) in tabbarItems.enumerated() {
......@@ -51,9 +56,9 @@ class HomeTabbarView:UIView {
btn.width = cW
btn.tag = 10 + index
btn.height = cH
btn.y = safeHeight == 0 ? 6 : 12
btn.y = 0//safeHeight == 0 ? 6 : 12
btn.x = 16 + Double(index) * cW
btn.changBtnWithStytl(btnStyle: .imageTop, margin: 5)
btn.changBtnWithStytl(btnStyle: .imageTop, margin: 2)
self.addSubview(btn)
}
}
......
......@@ -136,8 +136,9 @@ class HomeView:UIView {
homeTabbarView?.snp.makeConstraints({ make in
make.bottom.centerX.width.equalToSuperview()
make.height.equalTo(safeHeight + 80)
make.centerX.width.equalToSuperview()
make.height.equalTo(80-12)
make.bottom.equalToSuperview().offset(-(cWindow?.safeAreaInsets.bottom ?? 10))
})
homeTabbarView?.indexCallBack = {[weak self] index in
......@@ -173,7 +174,8 @@ class HomeView:UIView {
}
bottomView = UIView(frame: CGRect(x: 0, y: 0, width: width, height: safeHeight + 10))
bottomView?.backgroundColor = .white
bottomView?.backgroundColor = .clear
self.addSubview(bottomView!)
bottomView?.snp.makeConstraints({ make in
make.centerX.width.equalToSuperview()
......@@ -184,7 +186,7 @@ class HomeView:UIView {
collectionView.snp.makeConstraints { make in
make.top.centerX.equalToSuperview()
make.width.equalToSuperview().offset(-2 * marginLR)
make.bottom.equalToSuperview().offset( -homeTabbarView!.height - 16)
make.bottom.equalTo(homeTabbarView!.snp.top)//.offset( -homeTabbarView!.height - 16)
}
self.addSubview(self.tipLabel)
......
......@@ -58,7 +58,7 @@ class HomeInfoTableViewCell:UITableViewCell {
seletedAllBtn = UIButton()
seletedAllBtn?.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
seletedAllBtn?.setTitle("Select All", for: .normal)
seletedAllBtn?.setTitle("Unselect all", for: .selected)
seletedAllBtn?.setTitle("Deselect all", for: .selected)
seletedAllBtn?.setTitleColor(UIColor.colorWithHex(hexStr: mColor), for: .normal)
seletedAllBtn?.sizeToFit()
......
......@@ -31,11 +31,11 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
didSet {
let sizeKB : Double = Double((resourceIdent?.assetSize ?? 0) / 1000)
if sizeKB < 1000{
self.saveSizeLabel.text = String(format: "%.2f KB" ,sizeKB)
self.saveSizeLabel.text = String(format: "%.2fKB" ,sizeKB)
}else if sizeKB < (1000 * 1000) && sizeKB > 1000{
self.saveSizeLabel.text = String(format: "%.2f MB" ,sizeKB/1000)
self.saveSizeLabel.text = String(format: "%.2fMB" ,sizeKB/1000)
}else{
self.saveSizeLabel.text = String(format: "%.2f GB" ,sizeKB/(1000 * 1000))
self.saveSizeLabel.text = String(format: "%.2fGB" ,sizeKB/(1000 * 1000))
}
}
}
......@@ -146,7 +146,6 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
self.saveSizeView.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(6)
make.height.equalTo(24)
make.width.equalTo(100)
}
self.saveSizeLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(11)
......@@ -155,9 +154,10 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
}
self.moreImageView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-10)
make.left.equalTo(saveSizeLabel.snp.right).offset(4)
make.centerY.equalToSuperview()
make.height.width.equalTo(16)
make.right.equalToSuperview().offset(-11)
}
}
......
......@@ -159,15 +159,16 @@ class HomeTitleCollectionCell:UICollectionViewCell {
make.top.left.equalTo(8)
})
titleLabel.sizeToFit()
// titleLabel.sizeToFit()
fileLabel?.snp.makeConstraints({ make in
make.top.centerY.equalTo(titleLabel!)
make.top.equalTo(titleLabel!)
make.centerY.equalTo(titleLabel.snp.centerY)
make.right.equalToSuperview().offset(-34)
})
fileLabel?.sizeToFit()
// fileLabel?.sizeToFit()
collectionView?.snp.makeConstraints({ make in
make.left.equalTo(8)
......@@ -178,7 +179,7 @@ class HomeTitleCollectionCell:UICollectionViewCell {
nextImage?.snp.makeConstraints({ make in
make.centerY.equalTo(fileLabel!)
make.centerY.equalTo(titleLabel.snp.centerY)
make.right.equalToSuperview().inset(12)
make.width.height.equalTo(20)
})
......
......@@ -27,11 +27,11 @@ class HomeVideoDetailCell : UICollectionViewCell {
let sizeKB : Double = Double(model.assetSize / 1000)
if sizeKB < 1000{
self.saveSizeLabel.text = String(format: "%.2f KB" ,sizeKB)
self.saveSizeLabel.text = String(format: "%.2fKB" ,sizeKB)
}else if sizeKB < (1000 * 1000) && sizeKB > 1000{
self.saveSizeLabel.text = String(format: "%.2f MB" ,sizeKB/1000)
self.saveSizeLabel.text = String(format: "%.2fMB" ,sizeKB/1000)
}else{
self.saveSizeLabel.text = String(format: "%.2f GB" ,sizeKB/(1000 * 1000))
self.saveSizeLabel.text = String(format: "%.2fGB" ,sizeKB/(1000 * 1000))
}
......@@ -201,7 +201,6 @@ class HomeVideoDetailCell : UICollectionViewCell {
self.saveSizeView.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(6)
make.height.equalTo(24)
make.width.equalTo(100)
}
self.saveSizeLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(11)
......@@ -210,9 +209,10 @@ class HomeVideoDetailCell : UICollectionViewCell {
}
self.moreImageView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-10)
make.left.equalTo(saveSizeLabel.snp.right).offset(4)
make.centerY.equalToSuperview()
make.height.width.equalTo(16)
make.right.equalToSuperview().offset(-11)
}
self.selectImageView.snp.makeConstraints { make in
......
......@@ -218,12 +218,21 @@ class PMShowImgVideoController: BaseViewController {
}
}
// if SettingConfiguration.share.config.removeImg {
PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
if selectidx == 1 {
let alert = PMSecretHintsAlert()
self.view.showBlur()
alert.show { idx in
if idx == 1 {
DelCallBlock()
}
self.view.hideBlur()
alert.dismiss(animated: true)
})
}
// PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
// if selectidx == 1 {
// DelCallBlock()
// }
// alert.dismiss(animated: true)
// })
// }else{
// DelCallBlock()
// }
......
......@@ -126,12 +126,22 @@ class SecretViewController: BaseViewController {
self.bottomm.state = .add
}
// if SettingConfiguration.share.config.removeImg {
PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
if selectidx == 1 {
DelCallBlock()
}
alert.dismiss(animated: true)
})
let alert = PMSecretHintsAlert()
self.view.showBlur()
alert.show { idx in
if idx == 1 {
DelCallBlock()
}
self.view.hideBlur()
alert.dismiss(animated: true)
}
// PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
// if selectidx == 1 {
// DelCallBlock()
// }
// alert.dismiss(animated: true)
// })
// }else{
// DelCallBlock()
// }
......
//
// PMSecretHintsAlert.swift
// PhoneManager
//
// Created by edy on 2025/5/23.
//
import UIKit
class PMSecretHintsAlert: UIViewController {
var callblock:((Int)->Void) = { idx in}
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func deleteActions(_ sender: Any) {
callblock(1)
}
@IBAction func cancelActions(_ sender: Any) {
callblock(0)
}
func show(_ complate:@escaping((Int)->Void)) -> Void {
self.callblock = complate
self.modalPresentationStyle = .overFullScreen
UIViewController.topMostViewController()?.present(self, animated: true)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PMSecretHintsAlert" customModule="PhoneManager" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4PM-DR-RyH">
<rect key="frame" x="16" y="282.66666666666669" width="361" height="287.00000000000006"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="32" translatesAutoresizingMaskIntoConstraints="NO" id="4op-wJ-tFy">
<rect key="frame" x="32" y="16" width="297" height="261"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pm-screct-remove-hint" translatesAutoresizingMaskIntoConstraints="NO" id="IGo-Uk-Mne">
<rect key="frame" x="115.33333333333334" y="0.0" width="66.333333333333343" height="66"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="These photos will be deleted from your secret space." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fXm-CK-d9V">
<rect key="frame" x="4.6666666666666572" y="98" width="288" height="43"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
<color key="textColor" red="0.066666666666666666" green="0.066666666666666666" blue="0.066666666666666666" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="GmY-zo-ECX">
<rect key="frame" x="20" y="173" width="257" height="88"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PwB-Ca-yNf">
<rect key="frame" x="0.0" y="0.0" width="257" height="44"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="2EK-2Y-DHI"/>
<constraint firstAttribute="width" constant="257" id="ivh-EF-yw9"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Delete"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="Radius">
<real key="value" value="22"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="deleteActions:" destination="-1" eventType="touchUpInside" id="qkJ-8N-7aC"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UlC-p0-NYR">
<rect key="frame" x="0.0" y="43.999999999999943" width="257" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="Kli-Cu-oKo"/>
<constraint firstAttribute="width" constant="257" id="cTL-mF-DTM"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Cancel">
<color key="titleColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="cancelActions:" destination="-1" eventType="touchUpInside" id="OK6-9W-DvT"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="4op-wJ-tFy" firstAttribute="centerX" secondItem="4PM-DR-RyH" secondAttribute="centerX" id="JR1-hs-CEX"/>
<constraint firstItem="4op-wJ-tFy" firstAttribute="top" secondItem="4PM-DR-RyH" secondAttribute="top" constant="16" id="O4a-Ns-oDB"/>
<constraint firstAttribute="trailing" secondItem="4op-wJ-tFy" secondAttribute="trailing" constant="32" id="S3R-nV-Ia9"/>
<constraint firstItem="4op-wJ-tFy" firstAttribute="leading" secondItem="4PM-DR-RyH" secondAttribute="leading" constant="32" id="c8P-8c-YQA"/>
<constraint firstAttribute="bottom" secondItem="4op-wJ-tFy" secondAttribute="bottom" constant="10" id="v99-F8-sb8"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="Radius">
<real key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4PM-DR-RyH" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="4A7-HI-0xS"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="4PM-DR-RyH" secondAttribute="trailing" constant="16" id="Tuu-pd-edo"/>
<constraint firstItem="4PM-DR-RyH" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="xZz-3h-JAB"/>
</constraints>
<point key="canvasLocation" x="77" y="-12"/>
</view>
</objects>
<resources>
<image name="pm-screct-remove-hint" width="66.333335876464844" height="66"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
......@@ -343,7 +343,7 @@ extension TrashContenView:UICollectionViewDelegate,UICollectionViewDataSource,UI
// 设置button的文字和样式
self.setDeleteButtonUI()
self.deleteButton?.isHidden = !(self.dataSource.count > 0)
if self.dataSource.count > 0 {
self.collectionView.reloadData()
}else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment