Commit 47c88f21 authored by shenyong's avatar shenyong

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

# Conflicts:
#	PhoneManager/Class/Page/Settings/ViewController/SettingViewController.swift
parents b53d6043 cb73e88f
......@@ -74,7 +74,7 @@ class ChargeInfoViewController:BaseViewController {
self.view.showBlur()
self.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
alertView.dismiss(animated: true) {
self.view.hideBlur()
if isSure {
self.popAdverTisement()
......@@ -83,6 +83,7 @@ class ChargeInfoViewController:BaseViewController {
}
}
}
}
}else{
self.setAnimation()
}
......
......@@ -45,6 +45,9 @@ class CompressingViewController: BaseViewController {
return view
}()
let alert = EmailContentDelAlert(state: .endCompress)
var alertShow : Bool = false
lazy var animationView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "iOS压缩完成")
animationView.layer.cornerRadius = 12
......@@ -93,7 +96,20 @@ class CompressingViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(red: 0.95, green: 0.96, blue: 0.99, alpha: 1)
self.titleView.isHidden = true
self.titleView.callBack = { text in
// 弹框
self.view.showBlur()
self.alert.endCompressCallback = { idx in
self.view.hideBlur()
self.navigationController?.popViewController(animated: true)
}
self.alert.callblock = {idx in
self.view.hideBlur()
}
self.alert.show()
self.alertShow = true
}
setUI()
......@@ -182,6 +198,18 @@ class CompressingViewController: BaseViewController {
/// - comVideoDataSource: 压缩后的视频链接数组
fileprivate func updateNextView(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]) {
DispatchQueue.main.async {
if self.alertShow {
self.view.hideBlur()
self.alert.dismiss(animated: true) {
self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
}
}else {
self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
}
}
}
func jumpNextPage(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]){
let vc = CompressCompletedViewController()
vc.currentMediaType = self.currentMediaType
vc.comDataSource = comDataSource
......@@ -190,7 +218,6 @@ class CompressingViewController: BaseViewController {
vc.completedSize = compressAllSize
self.navigationController?.pushViewController(vc, animated: true)
}
}
// MARK: 设置UI
......
<?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">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<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"/>
......@@ -17,59 +17,82 @@
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" ambiguous="YES" 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>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jgO-hZ-9Df">
<rect key="frame" x="0.0" y="119" width="393" height="613.33333333333337"/>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jgO-hZ-9Df">
<rect key="frame" x="0.0" y="178" width="393" height="520.33333333333337"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="uZH-h3-Fkz">
<rect key="frame" x="0.0" y="0.0" width="1965" height="613.33333333333337"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="uZH-h3-Fkz">
<rect key="frame" x="0.0" y="0.0" width="1965" height="579.66666666666663"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Xa-3c-aHx">
<rect key="frame" x="0.0" y="0.0" width="393" height="613.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5Xa-3c-aHx">
<rect key="frame" x="0.0" y="0.0" width="393" height="579.66666666666663"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="ngA-9i-uKc">
<rect key="frame" x="45" y="5" width="303" height="603.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lVv-Tb-ERt">
<rect key="frame" x="0.0" y="0.0" width="393" height="365.33333333333331"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="ngA-9i-uKc">
<rect key="frame" x="55.666666666666657" y="20" width="281.66666666666674" height="368.66666666666669"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tNx-bS-tcw">
<rect key="frame" x="0.0" y="0.0" width="303" height="19.333333333333332"/>
<rect key="frame" x="0.0" y="0.0" width="281.66666666666669" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="WT1-T2-JBw"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="H33-nl-3al">
<rect key="frame" x="0.0" y="57.999999999999986" width="303" height="147.66666666666663"/>
<rect key="frame" x="0.0" y="38" width="281.66666666666669" height="137.33333333333334"/>
<constraints>
<constraint firstAttribute="width" secondItem="H33-nl-3al" secondAttribute="height" multiplier="281:137" id="yld-7C-nEV"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DdZ-J7-5Kl">
<rect key="frame" x="0.0" y="244" width="303" height="19.333333333333314"/>
<rect key="frame" x="0.0" y="193.33333333333331" width="281.66666666666669" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="0pV-6M-mBF"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_2" translatesAutoresizingMaskIntoConstraints="NO" id="fbi-32-E9s">
<rect key="frame" x="0.0" y="302" width="303" height="147.66666666666663"/>
<rect key="frame" x="0.0" y="231.33333333333331" width="281.66666666666669" height="137.33333333333331"/>
<constraints>
<constraint firstAttribute="width" secondItem="fbi-32-E9s" secondAttribute="height" multiplier="281:137" id="ge1-Q5-cNm"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="gJQ-p8-Usv">
<rect key="frame" x="0.0" y="488.33333333333337" width="303" height="115"/>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="ngA-9i-uKc" secondAttribute="bottom" constant="20" id="S1P-KO-TdO"/>
<constraint firstItem="ngA-9i-uKc" firstAttribute="centerY" secondItem="lVv-Tb-ERt" secondAttribute="centerY" id="SLi-Cb-xbY"/>
<constraint firstItem="ngA-9i-uKc" firstAttribute="centerX" secondItem="lVv-Tb-ERt" secondAttribute="centerX" id="TQ1-y9-ng3"/>
<constraint firstItem="ngA-9i-uKc" firstAttribute="top" relation="greaterThanOrEqual" secondItem="lVv-Tb-ERt" secondAttribute="top" constant="20" id="Xhe-0s-nC3"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="gJQ-p8-Usv">
<rect key="frame" x="44" y="400.33333333333337" width="305" height="115"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QZP-ld-Qdn">
<rect key="frame" x="89.333333333333343" y="0.0" width="124.66666666666666" height="30"/>
<rect key="frame" x="90.333333333333343" y="0.0" width="124.66666666666666" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="cCG-0e-OFJ"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CfK-fg-ZIg">
<rect key="frame" x="14.333333333333343" y="48" width="274.66666666666663" height="67"/>
<rect key="frame" x="0.0" y="48" width="305" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="IRr-pT-284"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="67" id="IRr-pT-284"/>
</constraints>
<string key="text">These are duplicate photos - they are completely identical to each other. Immediately delete all duplicate items and keep the original version.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -79,21 +102,22 @@
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="ngA-9i-uKc" secondAttribute="bottom" constant="5" id="02n-uu-bxm"/>
<constraint firstItem="ngA-9i-uKc" firstAttribute="leading" secondItem="5Xa-3c-aHx" secondAttribute="leading" constant="45" id="8ED-4c-WNC"/>
<constraint firstItem="ngA-9i-uKc" firstAttribute="top" secondItem="5Xa-3c-aHx" secondAttribute="top" constant="5" id="XqW-o6-rnu"/>
<constraint firstAttribute="trailing" secondItem="ngA-9i-uKc" secondAttribute="trailing" constant="45" id="meh-Mt-0K2"/>
<constraint firstItem="gJQ-p8-Usv" firstAttribute="top" secondItem="lVv-Tb-ERt" secondAttribute="bottom" constant="35" id="Fe7-Ar-qPu"/>
<constraint firstItem="gJQ-p8-Usv" firstAttribute="leading" secondItem="5Xa-3c-aHx" secondAttribute="leading" constant="44" id="J7z-yS-CPr"/>
<constraint firstAttribute="trailing" secondItem="lVv-Tb-ERt" secondAttribute="trailing" id="bfL-lM-Eej"/>
<constraint firstAttribute="bottom" secondItem="gJQ-p8-Usv" secondAttribute="bottom" constant="5" id="hNI-GW-YOV"/>
<constraint firstItem="lVv-Tb-ERt" firstAttribute="top" secondItem="5Xa-3c-aHx" secondAttribute="top" id="vhF-U6-B8C"/>
<constraint firstItem="lVv-Tb-ERt" firstAttribute="leading" secondItem="5Xa-3c-aHx" secondAttribute="leading" id="vwx-1A-2kl"/>
<constraint firstAttribute="trailing" secondItem="gJQ-p8-Usv" secondAttribute="trailing" constant="44" id="yBn-oP-nas"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hlo-KY-MjE">
<rect key="frame" x="393" y="0.0" width="393" height="613.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hlo-KY-MjE">
<rect key="frame" x="393" y="0.0" width="393" height="579.66666666666663"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="2Yh-GL-Q2t">
<rect key="frame" x="37.666666666666686" y="30" width="317.66666666666669" height="408.33333333333331"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalCentering" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="2Yh-GL-Q2t">
<rect key="frame" x="37.666666666666686" y="30" width="317.66666666666669" height="374.66666666666669"/>
<subviews>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Similar" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IhS-Gp-baN">
<rect key="frame" x="0.0" y="-16" width="317.66666666666669" height="16"/>
......@@ -111,7 +135,7 @@
</constraints>
</imageView>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Similar" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GIs-vI-kWE">
<rect key="frame" x="0.0" y="186" width="317.66666666666669" height="16"/>
<rect key="frame" x="0.0" y="187.33333333333331" width="317.66666666666669" height="16.333333333333343"/>
<constraints>
<constraint firstAttribute="height" constant="16.329999999999998" id="9nH-oa-mxO"/>
</constraints>
......@@ -120,15 +144,15 @@
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_similar_2" translatesAutoresizingMaskIntoConstraints="NO" id="x0D-ou-xRd">
<rect key="frame" x="0.0" y="230" width="317.66666666666669" height="178.33333333333337"/>
<rect key="frame" x="0.0" y="196.33333333333331" width="317.66666666666669" height="178.33333333333331"/>
<constraints>
<constraint firstAttribute="width" secondItem="x0D-ou-xRd" secondAttribute="height" multiplier="317:178" id="J9F-Fe-BXn"/>
</constraints>
</imageView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="jsL-Yg-DRw">
<rect key="frame" x="40" y="493.33333333333337" width="313" height="115"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="jsL-Yg-DRw">
<rect key="frame" x="40" y="400.33333333333337" width="313" height="115"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Similar photos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qDj-bm-OSE">
<rect key="frame" x="73.000000000000014" y="0.0" width="167.33333333333337" height="30"/>
......@@ -156,29 +180,31 @@
<constraints>
<constraint firstAttribute="bottom" secondItem="jsL-Yg-DRw" secondAttribute="bottom" constant="5" id="43v-pu-Het"/>
<constraint firstAttribute="trailing" secondItem="jsL-Yg-DRw" secondAttribute="trailing" constant="40" id="5Ef-zt-VFy"/>
<constraint firstItem="jsL-Yg-DRw" firstAttribute="top" secondItem="2Yh-GL-Q2t" secondAttribute="bottom" constant="55" id="J8w-6L-NOv"/>
<constraint firstItem="2Yh-GL-Q2t" firstAttribute="top" secondItem="hlo-KY-MjE" secondAttribute="top" constant="30" id="YLv-9p-1VS"/>
<constraint firstItem="jsL-Yg-DRw" firstAttribute="top" relation="greaterThanOrEqual" secondItem="2Yh-GL-Q2t" secondAttribute="bottom" constant="55" id="J8w-6L-NOv"/>
<constraint firstItem="2Yh-GL-Q2t" firstAttribute="top" relation="greaterThanOrEqual" secondItem="hlo-KY-MjE" secondAttribute="top" constant="30" id="YLv-9p-1VS"/>
<constraint firstItem="jsL-Yg-DRw" firstAttribute="leading" secondItem="hlo-KY-MjE" secondAttribute="leading" constant="40" id="r4Y-Et-KLn"/>
<constraint firstItem="2Yh-GL-Q2t" firstAttribute="centerX" secondItem="hlo-KY-MjE" secondAttribute="centerX" id="wde-o8-kYH"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ees-5Q-f0P">
<rect key="frame" x="786" y="0.0" width="393" height="613.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ees-5Q-f0P">
<rect key="frame" x="786" y="0.0" width="393" height="579.66666666666663"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="4BK-NH-6jQ">
<rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" alignment="center" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="4BK-NH-6jQ">
<rect key="frame" x="30" y="5" width="333" height="374"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_sreenshot" translatesAutoresizingMaskIntoConstraints="NO" id="zkZ-Px-VS8">
<rect key="frame" x="26.333333333333371" y="0.0" width="260.33333333333331" height="374"/>
<rect key="frame" x="36.333333333333371" y="0.0" width="260.33333333333331" height="374"/>
<constraints>
<constraint firstAttribute="width" secondItem="zkZ-Px-VS8" secondAttribute="height" multiplier="262:376" id="BtW-U1-uWU"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="PHa-RC-gM7">
<rect key="frame" x="4.6666666666666288" y="488.33333333333337" width="303.66666666666669" height="115"/>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="PHa-RC-gM7">
<rect key="frame" x="44" y="400.33333333333337" width="305" height="115"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ScreenShot" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hAl-SL-XaU">
<rect key="frame" x="83.333333333333371" y="0.0" width="137" height="30"/>
<rect key="frame" x="84" y="0.0" width="137" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="xUe-iW-aUe"/>
</constraints>
......@@ -187,9 +213,9 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nv3-gd-dfh">
<rect key="frame" x="0.0" y="48" width="303.66666666666669" height="67"/>
<rect key="frame" x="0.66666666666662877" y="48" width="303.66666666666669" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="51" id="tdN-tS-1Kw"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="67" id="tdN-tS-1Kw"/>
</constraints>
<string key="text">We will group similar screenshots together so that you can view them faster! Please safely view and select the customer cut-off you want to move to the trash can.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -199,21 +225,22 @@
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4BK-NH-6jQ" firstAttribute="top" secondItem="ees-5Q-f0P" secondAttribute="top" constant="5" id="5sW-Vx-MbD"/>
<constraint firstAttribute="trailing" secondItem="4BK-NH-6jQ" secondAttribute="trailing" constant="40" id="PPh-AP-WMn"/>
<constraint firstAttribute="bottom" secondItem="4BK-NH-6jQ" secondAttribute="bottom" constant="5" id="aX2-x6-UAP"/>
<constraint firstItem="4BK-NH-6jQ" firstAttribute="leading" secondItem="ees-5Q-f0P" secondAttribute="leading" constant="40" id="sfc-4O-uuC"/>
<constraint firstAttribute="trailing" secondItem="PHa-RC-gM7" secondAttribute="trailing" constant="44" id="3Kq-ED-feS"/>
<constraint firstAttribute="bottom" secondItem="PHa-RC-gM7" secondAttribute="bottom" constant="5" id="5qF-Al-5ZT"/>
<constraint firstAttribute="trailing" secondItem="4BK-NH-6jQ" secondAttribute="trailing" constant="30" id="PPh-AP-WMn"/>
<constraint firstItem="PHa-RC-gM7" firstAttribute="leading" secondItem="ees-5Q-f0P" secondAttribute="leading" constant="44" id="qvY-i6-yOG"/>
<constraint firstItem="4BK-NH-6jQ" firstAttribute="leading" secondItem="ees-5Q-f0P" secondAttribute="leading" constant="30" id="sfc-4O-uuC"/>
<constraint firstItem="PHa-RC-gM7" firstAttribute="top" secondItem="4BK-NH-6jQ" secondAttribute="bottom" constant="55" id="v9K-aQ-Vnj"/>
<constraint firstItem="4BK-NH-6jQ" firstAttribute="top" relation="greaterThanOrEqual" secondItem="ees-5Q-f0P" secondAttribute="top" constant="5" id="z8p-pb-Du9"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yeQ-s0-3eu">
<rect key="frame" x="1179" y="0.0" width="393" height="613.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yeQ-s0-3eu">
<rect key="frame" x="1179" y="0.0" width="393" height="579.66666666666663"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="82" translatesAutoresizingMaskIntoConstraints="NO" id="Tcf-97-ZCs">
<rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" spacing="82" translatesAutoresizingMaskIntoConstraints="NO" id="Tcf-97-ZCs">
<rect key="frame" x="40" y="5" width="313" height="365.66666666666669"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_video" translatesAutoresizingMaskIntoConstraints="NO" id="qjS-Jv-Tsc">
<rect key="frame" x="0.0" y="0.0" width="313" height="365.66666666666669"/>
......@@ -221,17 +248,25 @@
<constraint firstAttribute="width" secondItem="qjS-Jv-Tsc" secondAttribute="height" multiplier="261:305" id="DHC-sQ-LFq"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="VBe-cO-HJz">
<rect key="frame" x="0.0" y="504.99999999999994" width="313" height="98.333333333333314"/>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="VBe-cO-HJz">
<rect key="frame" x="44" y="400.33333333333337" width="305" height="115"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Video" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="orc-Z4-zrH">
<rect key="frame" x="122.66666666666674" y="0.0" width="67.666666666666686" height="30"/>
<rect key="frame" x="118.66666666666674" y="0.0" width="67.666666666666686" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="FqK-Op-Kdd"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="View all of your videos. Sort them by size or date. View the video that occupies the maximum space." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="acZ-y7-R3Q">
<rect key="frame" x="13.666666666666742" y="48" width="286" height="50.333333333333343"/>
<rect key="frame" x="9.6666666666667425" y="48" width="286" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="67" id="f7o-5X-vFE"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -239,21 +274,22 @@
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="VBe-cO-HJz" firstAttribute="leading" secondItem="yeQ-s0-3eu" secondAttribute="leading" constant="44" id="110-79-Gb6"/>
<constraint firstAttribute="bottom" secondItem="VBe-cO-HJz" secondAttribute="bottom" constant="5" id="BXW-en-Txb"/>
<constraint firstAttribute="trailing" secondItem="VBe-cO-HJz" secondAttribute="trailing" constant="44" id="CGR-pY-n17"/>
<constraint firstAttribute="trailing" secondItem="Tcf-97-ZCs" secondAttribute="trailing" constant="40" id="X4R-xi-Qry"/>
<constraint firstItem="VBe-cO-HJz" firstAttribute="top" secondItem="Tcf-97-ZCs" secondAttribute="bottom" constant="55" id="YzC-kp-cgb"/>
<constraint firstItem="Tcf-97-ZCs" firstAttribute="leading" secondItem="yeQ-s0-3eu" secondAttribute="leading" constant="40" id="bc3-ng-O0m"/>
<constraint firstItem="Tcf-97-ZCs" firstAttribute="top" secondItem="yeQ-s0-3eu" secondAttribute="top" constant="5" id="lyz-C9-iRd"/>
<constraint firstAttribute="bottom" secondItem="Tcf-97-ZCs" secondAttribute="bottom" constant="5" id="ry6-lM-9Xe"/>
<constraint firstItem="Tcf-97-ZCs" firstAttribute="top" relation="greaterThanOrEqual" secondItem="yeQ-s0-3eu" secondAttribute="top" constant="5" id="lyz-C9-iRd"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XAV-qr-EhO">
<rect key="frame" x="1572" y="0.0" width="393" height="613.33333333333337"/>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XAV-qr-EhO">
<rect key="frame" x="1572" y="0.0" width="393" height="579.66666666666663"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="3FW-3K-xPh">
<rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="3FW-3K-xPh">
<rect key="frame" x="40" y="5" width="313" height="365.66666666666669"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_photos" translatesAutoresizingMaskIntoConstraints="NO" id="g9Z-rw-Wgd">
<rect key="frame" x="0.0" y="0.0" width="313" height="365.66666666666669"/>
......@@ -261,17 +297,25 @@
<constraint firstAttribute="width" secondItem="g9Z-rw-Wgd" secondAttribute="height" multiplier="261:305" id="cIq-cw-pde"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="SLW-Qi-u2E">
<rect key="frame" x="0.0" y="504.99999999999994" width="313" height="98.333333333333314"/>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="SLW-Qi-u2E">
<rect key="frame" x="44" y="400.33333333333337" width="305" height="115"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Other photos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xCw-5n-Bw1">
<rect key="frame" x="79.666666666666728" y="0.0" width="153.66666666666663" height="30"/>
<rect key="frame" x="75.666666666666728" y="0.0" width="153.66666666666663" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="qHc-tp-xaU"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="These are photos that do not belong to any category. Sort them by size or date. Delete unnecessary photos." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tdu-B0-lEf">
<rect key="frame" x="15.333333333333258" y="48" width="282.33333333333331" height="50.333333333333343"/>
<rect key="frame" x="11.333333333333258" y="48" width="282.33333333333331" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="67" id="7jD-f6-lr6"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -279,14 +323,15 @@
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="3FW-3K-xPh" firstAttribute="leading" secondItem="XAV-qr-EhO" secondAttribute="leading" constant="40" id="Q6a-QQ-yix"/>
<constraint firstAttribute="bottom" secondItem="3FW-3K-xPh" secondAttribute="bottom" constant="5" id="Xvb-vT-KF4"/>
<constraint firstAttribute="bottom" secondItem="SLW-Qi-u2E" secondAttribute="bottom" constant="5" id="VaL-zM-QCr"/>
<constraint firstItem="SLW-Qi-u2E" firstAttribute="top" secondItem="3FW-3K-xPh" secondAttribute="bottom" constant="55" id="Xvb-vT-KF4"/>
<constraint firstItem="SLW-Qi-u2E" firstAttribute="leading" secondItem="XAV-qr-EhO" secondAttribute="leading" constant="44" id="dgf-eP-1eY"/>
<constraint firstAttribute="trailing" secondItem="SLW-Qi-u2E" secondAttribute="trailing" constant="44" id="p8h-8a-Ya0"/>
<constraint firstAttribute="trailing" secondItem="3FW-3K-xPh" secondAttribute="trailing" constant="40" id="rM8-db-kJS"/>
<constraint firstItem="3FW-3K-xPh" firstAttribute="top" secondItem="XAV-qr-EhO" secondAttribute="top" constant="5" id="tRh-G7-nSn"/>
<constraint firstItem="3FW-3K-xPh" firstAttribute="top" relation="greaterThanOrEqual" secondItem="XAV-qr-EhO" secondAttribute="top" constant="5" id="tRh-G7-nSn"/>
</constraints>
</view>
</subviews>
......@@ -304,8 +349,8 @@
<outlet property="delegate" destination="-1" id="OYZ-iA-wKM"/>
</connections>
</scrollView>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="Hjf-zs-Luc">
<rect key="frame" x="160" y="762.33333333333337" width="73" height="25.666666666666629"/>
<pageControl opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="Hjf-zs-Luc">
<rect key="frame" x="160" y="728.33333333333348" width="73" height="25.666666666666629"/>
<constraints>
<constraint firstAttribute="height" constant="25.670000000000002" id="yjG-ks-gAd"/>
</constraints>
......
......@@ -20,23 +20,6 @@ class HomeInfoViewController:BaseViewController {
self?.seletedAllBtnClick()
}
return view
// let btn:UIButton = UIButton(type: .custom)//(frame: CGRect(x: 0, y: 0, width: 115, height: 32))
//
// btn.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
// btn.backgroundColor = UIColor.colorWithHex(hexStr: "#F2F6FC")
// btn.setImage(UIImage.init(named: "ic_check_similar"), for: .normal)
// btn.setTitle("Select All", for: .normal)
// btn.setImage(UIImage.init(named: "ic_close_similar"), for: .selected)
// btn.setTitle("Unselect all", for: .selected)
// btn.setTitleColor(UIColor.colorWithHex(hexStr: mColor), for: .normal)
// btn.setTitleColor(UIColor.colorWithHex(hexStr: black3Color), for: .selected)
// btn.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .bold)
//
// btn.layer.cornerRadius = btn.height / 2
// btn.layer.masksToBounds = true
// btn.changBtnWithStytl(btnStyle: .defalut, margin: 8)
//
// return btn
}()
lazy var tablewView:HomeInfoView = {
......@@ -418,7 +401,7 @@ class HomeInfoViewController:BaseViewController {
titleLabel.centerY = navCenterY
titleView.addSubview(titleLabel)
view.addSubview(tablewView)
view.addSubview(self.tablewView)
view.addSubview(self.defaultImageView)
self.defaultImageView.snp.makeConstraints { make in
make.width.height.equalTo(180)
......@@ -465,7 +448,7 @@ class HomeInfoViewController:BaseViewController {
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
self.tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
}
@objc func seletedAllBtnClick() {
......
......@@ -42,21 +42,21 @@ class HomeVideoDetailController :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) Video", 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)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78)
}else{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Videos", 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)
}
if self.selectedModel.count > 0 {
......@@ -183,6 +183,7 @@ class HomeVideoDetailController :BaseViewController {
make.top.centerX.width.equalToSuperview()
make.height.equalTo(statusBarHeight + 44)
})
self.videoDetailNavView?.selectAllCallBack = {[weak self] choose in
guard let self else {return}
......@@ -251,6 +252,11 @@ class HomeVideoDetailController :BaseViewController {
make.top.equalTo(self.defaultImageView.snp.bottom).offset(-30)
make.centerX.equalToSuperview()
}
collectionView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(marginLR)
make.top.equalTo(self.videoDetailNavView!.snp.bottom)
make.bottom.equalToSuperview()
}
setDefaultPage()
}
......@@ -311,11 +317,11 @@ class HomeVideoDetailController :BaseViewController {
self.videoDetailNavView?.startSelectButton.isHidden = array.count > 0 || self.resourceData.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)
// }
}
}
......
......@@ -40,7 +40,6 @@ class PhotoRemoveViewController: BaseViewController {
let formatter = DateFormatter()
lazy var navView : PhotoVideoDetailNavView = {
let view = PhotoVideoDetailNavView()
return view
......@@ -60,14 +59,17 @@ class PhotoRemoveViewController: BaseViewController {
// 创建两个按钮
private lazy var trashButton = {
let button = UIButton(frame: CGRect(x: self.view.centerX - 22 - 47, y: self.view.centerY + 509 * RScreenH() / 2 - 47 / 2, width: 47, height: 47))
let height:CGFloat = self.mediaType == .video ? 0 : 47/2.0
let button = UIButton(frame: CGRect(x: self.view.centerX - 22 - 47, y: self.view.centerY + 509 * RScreenH() / 2 - height , width: 47, height: 47))
button.setImage(UIImage(named: "Group_1171275243"), for: .normal)
button.setImage(UIImage(named: "Group_1171275242"), for: .selected)
button.addTarget(self, action: #selector(trashButtonAction), for: .touchUpInside)
return button
}()
private lazy var keepListButton = {
let button = UIButton(frame: CGRect(x: self.view.centerX + 22, y: self.view.centerY + 509 * RScreenH() / 2 - 47 / 2, width: 47, height: 47))
let height:CGFloat = self.mediaType == .video ? 0 : 47/2.0
let button = UIButton(frame: CGRect(x: self.view.centerX + 22, y: self.view.centerY + 509 * RScreenH() / 2 - height, width: 47, height: 47))
button.setImage(UIImage(named: "Group_1171275102 3"), for: .normal)
button.setImage(UIImage(named: "Group_1171275102 2"), for: .selected)
button.addTarget(self, action: #selector(keepListButtonAction), for: .touchUpInside)
......@@ -190,6 +192,7 @@ class PhotoRemoveViewController: BaseViewController {
guard let self else {return}
DispatchQueue.main.async {
self.showCurrentPageUIWhenTashDataChanged()
self.navigationController?.popViewController(animated: true)
}
}
......
......@@ -89,7 +89,7 @@ class HomeInfoView :UIView {
self.ids = ids
self.titleText = titleText
self.type = type
super.init(frame: frame)
for array in ids ?? [] {
var smodels:[ImageSeletedCollectionItem] = []
......@@ -111,13 +111,12 @@ class HomeInfoView :UIView {
models.append(smodel)
}
super.init(frame: frame)
self.ids = sortData(source: ids ?? [], type: .latest)
setupUI()
self.headerView.sortViewSubmitCallBack = {[weak self]filterModel in
self.headerView.sortViewSubmitCallBack = {[weak self] filterModel in
PhotoManager.shared.reloadTrashAndKeep()
guard let self else {return}
var dataS : [[AssetModel]] = []
......
......@@ -214,12 +214,14 @@ extension TrashSubView {
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
}
}
}else{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
}
}
......@@ -227,6 +229,7 @@ extension TrashSubView {
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
self.updateFreeTimes()
}
}
......@@ -237,6 +240,22 @@ extension TrashSubView {
}
}
// 删除成功页面
func showDeleteSuccess(array:[AssetModel]){
var tempSize = 0.0
for item in array {
tempSize = tempSize + item.assetSize
}
DispatchQueue.main.async {
let vc = DelSuccessViewController()
vc.delType = array.count > 1 ? "photos" : "photo"
vc.fileSzie = Int64(tempSize)
vc.fileCount = array.count
vc.modalPresentationStyle = .fullScreen
self.responderViewController()?.present(vc, animated: true)
}
}
@objc func tapHandle(){
self.presentTashDetailViewClickCallBack()
}
......@@ -253,6 +272,7 @@ extension TrashSubView {
self.updateFreeTimes()
}
self.clearTashDataCallBack()
self.showDeleteSuccess(array: data)
}
}
}
......
......@@ -109,7 +109,7 @@ class PMShowImgCell: UICollectionViewCell {
make.left.right.bottom.top.equalToSuperview()
}
selectBtn.snp.makeConstraints { make in
make.right.equalToSuperview()
make.right.equalToSuperview().inset(25)
make.width.height.equalTo(iconWH)
make.bottom.equalToSuperview().offset(-10)
}
......
......@@ -51,7 +51,7 @@ class PMShowVideoCell: UICollectionViewCell {
super.init(frame: frame)
self.contentView.addSubview(self.selectBtn)
selectBtn.snp.makeConstraints { make in
make.right.equalToSuperview()
make.right.equalToSuperview().inset(25)
make.width.height.equalTo(iconWH)
make.bottom.equalToSuperview().offset(-10)
}
......
......@@ -323,7 +323,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
PMEmailManager.shareManager.signOut {[weak self] success in
if success {
EmailFilterManager.share.signOut()
self?.tableView.reloadData()
self?.tableView.reloadRows(at: [IndexPath(row: 0, section:1)], with: .none)
}
}
}
......
......@@ -297,12 +297,14 @@ extension TrashViewController:UIScrollViewDelegate{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
}else{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
......@@ -311,6 +313,7 @@ extension TrashViewController:UIScrollViewDelegate{
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
self.updateFreeTimes()
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
}
......@@ -340,6 +343,22 @@ extension TrashViewController:UIScrollViewDelegate{
}
}
func showDeleteSuccess(array:[AssetModel]){
var tempSize = 0.0
for item in array {
tempSize = tempSize + item.assetSize
}
DispatchQueue.main.async {
let vc = DelSuccessViewController()
vc.delType = array.count > 1 ? "photos" : "photo"
vc.fileSzie = Int64(tempSize)
vc.fileCount = array.count
vc.modalPresentationStyle = .fullScreen
self.present(vc, animated: true)
}
}
func delMethod(needUpdateFreeTimes:Bool){
let info = self.getTypeByCurrentPage(pageIndex: currentPage)
let data = TrashDataManager.getCurrentMediaTypeTrashData(mediaType: info.0)
......@@ -349,6 +368,7 @@ extension TrashViewController:UIScrollViewDelegate{
self.updateFreeTimes()
}
info.1.dataSource.removeAll()
self.showDeleteSuccess(array: data)
}
}
}
......
......@@ -16,6 +16,11 @@ class PMWidgetGuideStartController: UIViewController {
self.navigationController?.isNavigationBarHidden = true
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.isNavigationBarHidden = true
}
@IBAction func StartNextAction(_ sender: Any) {
callblock()
}
......
<?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">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" 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"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -19,7 +19,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jx3-dI-rXt">
<rect key="frame" x="352" y="69" width="26" height="53"/>
<rect key="frame" x="352" y="128" width="26" height="46"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="7rF-O5-V6f"/>
</constraints>
<inset key="contentEdgeInsets" minX="10" minY="10" maxX="0.0" maxY="10"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="ic_widget_XXXXXXx"/>
......@@ -28,7 +31,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add widgets to the home screen and the lock screen" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kbM-qf-WH2">
<rect key="frame" x="36" y="142" width="321" height="43"/>
<rect key="frame" x="36" y="194" width="321" height="43"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="43" id="cTr-dF-GVf"/>
</constraints>
......@@ -37,7 +40,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jAN-Lj-ySf">
<rect key="frame" x="23" y="205" width="347" height="43"/>
<rect key="frame" x="23" y="257" width="347" height="43"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="43" id="gWB-Me-UTE"/>
</constraints>
......@@ -47,13 +50,13 @@
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_widget_guideus" translatesAutoresizingMaskIntoConstraints="NO" id="Gk6-53-p7B">
<rect key="frame" x="34" y="268" width="325" height="442"/>
<rect key="frame" x="65.666666666666657" y="320" width="261.66666666666674" height="356"/>
<constraints>
<constraint firstAttribute="width" secondItem="Gk6-53-p7B" secondAttribute="height" multiplier="25:34" id="JRq-xy-nP7"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FzB-PE-uL0">
<rect key="frame" x="16" y="740" width="361" height="58"/>
<rect key="frame" x="16" y="706" width="361" height="58"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="58" id="H0t-sX-uiu"/>
......@@ -78,7 +81,7 @@
<constraint firstItem="Gk6-53-p7B" firstAttribute="top" secondItem="jAN-Lj-ySf" secondAttribute="bottom" constant="20" id="5K8-RY-RRE"/>
<constraint firstItem="jAN-Lj-ySf" firstAttribute="top" secondItem="kbM-qf-WH2" secondAttribute="bottom" constant="20" id="5cu-aJ-ud2"/>
<constraint firstAttribute="trailing" secondItem="jAN-Lj-ySf" secondAttribute="trailing" constant="23" id="9jt-yG-2C3"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="top" secondItem="Gk6-53-p7B" secondAttribute="bottom" constant="30" id="Ibh-ZB-Pcv"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Gk6-53-p7B" secondAttribute="bottom" constant="30" id="Ibh-ZB-Pcv"/>
<constraint firstItem="kbM-qf-WH2" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="36" id="Ie5-Fi-9zn"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="FzB-PE-uL0" secondAttribute="trailing" constant="16" id="O1A-bz-tvz"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="Vpm-N7-5Mh"/>
......
......@@ -15,9 +15,14 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
case list
case emailSignOut
case emailApply
case endCompress
}
var callblock:((Int)->Void) = { idx in}
var endCompressCallback:((Int)->Void) = {idx in}
var state:EmailStateAlert = .group
@IBOutlet weak var EmailContentMessage: UILabel!
......@@ -52,7 +57,14 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
EmailContentAction1.setTitle("Yes", for: .normal)
EmailContentAction2.setTitle("Cancel", for: .normal)
break
case .endCompress:
EmailContentMessage.text = "Would you like to stop compressing?"
EmailContentAction1.setTitle("Keep Compressing", for: .normal)
EmailContentAction2.setTitle("Stop Compressing", for: .normal)
tipsLabel.text = "If you stop now you won't get the results"
break
}
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
......@@ -76,7 +88,9 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
@IBAction func delMails(_ sender: Any) {
callblock(2)
self.dismiss(animated: true)
self.dismiss(animated: true) {
self.endCompressCallback(2)
}
}
init(state:EmailStateAlert) {
......
......@@ -14,6 +14,8 @@ class EmailLoginController: BaseViewController {
case set
}
var callblock:(()->Void)?
var state:fromState = .home
override func viewDidLoad() {
......@@ -57,6 +59,9 @@ class EmailLoginController: BaseViewController {
self.navigationController?.setViewControllers(navigation ?? [], animated: true)
}
}else{
if self.callblock != nil {
self.callblock!()
}
self.navigationController?.popViewController(animated: true)
}
}
......
......@@ -113,28 +113,8 @@ extension EmailCleanListView : UITableViewDataSource,UITableViewDelegate {
if IAPManager.share.isSubscribed == false {
// 弹出内购页面
HomePayViewController.show {
// 再次判断下
if IAPManager.share.isSubscribed == false {
// 弹出提示框
let alertView = AdvTipSelectView()
alertView.selectType = .selectTypeSetAnimation
alertView.getOtherInfoByType()
self.showBlur()
self.responderViewController()?.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
self.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
callblock()
}
}
}
}else{
callblock()
}
}
}else {
callblock()
}
......
......@@ -162,23 +162,8 @@ extension EmailContentView :UITableViewDelegate,UITableViewDataSource{
if IAPManager.share.isSubscribed == false {
// 弹出内购页面
HomePayViewController.show {
// 弹出提示框
let alertView = AdvTipSelectView()
alertView.selectType = .selectTypeSetAnimation
alertView.getOtherInfoByType()
self.showBlur()
self.responderViewController()?.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
self.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
callblock()
}
}
}
}
}else {
callblock()
}
......
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