Commit 8bd08628 authored by yqz's avatar yqz

优化

parent 545b78fb
...@@ -9,14 +9,15 @@ import WidgetKit ...@@ -9,14 +9,15 @@ import WidgetKit
import SwiftUI import SwiftUI
let kind: String = "LockSreen" let kind: String = "com.app.phonemanager.lockSreenWidget"
let kind1: String = "LockSreen1" let kind1: String = "com.app.phonemanager.lockSreenWidgetBattery"
@main @main
struct LockSreenBundle: WidgetBundle { struct LockSreenBundle: WidgetBundle {
var body: some Widget { var body: some Widget {
LockStorageSreen(type: lockSreenType(isStorage: true, kind: kind, displayName: "Storage", description: "Monitor your storage space")) LockStorageSreen(type: lockSreenType(isStorage: true, kind: kind, displayName: "Storage", description: "Monitor your storage space"))
LockStorageSreen(type: lockSreenType(kind: kind1, displayName: "Battery", description: "Monitor your battery")) LockBattSreen(type: lockSreenType(kind: kind1, displayName: "Battery", description: "Monitor your battery"))
// LockStorageSreen(type: lockSreenType(kind: kind1, displayName: "Battery", description: "Monitor your battery"))
LockBothSreen() LockBothSreen()
} }
} }
...@@ -24,7 +25,26 @@ struct LockSreenBundle: WidgetBundle { ...@@ -24,7 +25,26 @@ struct LockSreenBundle: WidgetBundle {
struct LockStorageSreen: Widget { struct LockStorageSreen: Widget {
var type:lockSreenType = lockSreenType() var type:lockSreenType = lockSreenType()
var body: some WidgetConfiguration { var body: some WidgetConfiguration {
StaticConfiguration(kind: type.kind, provider: LockSreenProvider()) { entry in StaticConfiguration(kind: kind, provider: LockSreenProvider()) { entry in
if #available(iOS 17.0, *) {
LockSreenEntryView(type: type, entry: entry)
.containerBackground(.fill.tertiary, for: .widget)
} else {
LockSreenEntryView(type: type, entry: entry)
.padding()
.background(Color.clear)
}
}
.configurationDisplayName(type.displayName)
.description(type.description)
.supportedFamilies([.accessoryCircular,.accessoryRectangular])
}
}
struct LockBattSreen: Widget {
var type:lockSreenType = lockSreenType()
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind1, provider: LockSreenProvider()) { entry in
if #available(iOS 17.0, *) { if #available(iOS 17.0, *) {
LockSreenEntryView(type: type, entry: entry) LockSreenEntryView(type: type, entry: entry)
.containerBackground(.fill.tertiary, for: .widget) .containerBackground(.fill.tertiary, for: .widget)
...@@ -41,7 +61,7 @@ struct LockStorageSreen: Widget { ...@@ -41,7 +61,7 @@ struct LockStorageSreen: Widget {
} }
struct LockBothSreen: Widget { struct LockBothSreen: Widget {
let kind: String = "LockSreenBoth" let kind: String = "com.app.phonemanager.lockSreenWidgetBoth"
var body: some WidgetConfiguration { var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: LockSreenProvider()) { entry in StaticConfiguration(kind: kind, provider: LockSreenProvider()) { entry in
if #available(iOS 17.0, *) { if #available(iOS 17.0, *) {
......
...@@ -10,17 +10,17 @@ import SwiftUI ...@@ -10,17 +10,17 @@ import SwiftUI
struct LockSreenProvider: TimelineProvider { struct LockSreenProvider: TimelineProvider {
func placeholder(in context: Context) -> LockSreenEntry { func placeholder(in context: Context) -> LockSreenEntry {
LockSreenEntry(date: .now, widgets: 0, widgetBattery: 0, widgetStorage: 0, widgetAllSpace: 0, widgetUseSpace: 0, batteryState: "Off", isCharging: false) return LockSreenEntry(date: .now, widgets: 0, widgetBattery: 1, widgetStorage: 1, widgetAllSpace: 1, widgetUseSpace: 1, batteryState: "Off", isCharging: false)
} }
func getSnapshot(in context: Context, completion: @escaping (LockSreenEntry) -> ()) { func getSnapshot(in context: Context, completion: @escaping (LockSreenEntry) -> ()) {
let entry = LockSreenEntry(date: .now, widgets: 0, widgetBattery: 0, widgetStorage: 0, widgetAllSpace: 0, widgetUseSpace: 0, batteryState: "Off", isCharging: false) let entry = LockSreenEntry(date: .now, widgets: 1, widgetBattery: 1, widgetStorage: 1, widgetAllSpace: 1, widgetUseSpace: 1, batteryState: "Off", isCharging: false)
completion(entry) completion(entry)
} }
func getTimeline(in context: Context, completion: @escaping (Timeline<LockSreenEntry>) -> ()) { func getTimeline(in context: Context, completion: @escaping (Timeline<LockSreenEntry>) -> ()) {
let entry = loadSharedData() let entry = loadSharedData()
let timeline = Timeline(entries: [entry], policy: .after(Date().addingTimeInterval(60))) let timeline = Timeline(entries: [entry], policy: .after(Date().addingTimeInterval(100)))
completion(timeline) completion(timeline)
} }
...@@ -29,18 +29,19 @@ struct LockSreenProvider: TimelineProvider { ...@@ -29,18 +29,19 @@ struct LockSreenProvider: TimelineProvider {
let data:Data = sharedDefaults.object(forKey: "widgetSharedData") as? Data, let data:Data = sharedDefaults.object(forKey: "widgetSharedData") as? Data,
let decodedData = try? JSONDecoder().decode(WidgetData.self, from: data) let decodedData = try? JSONDecoder().decode(WidgetData.self, from: data)
else { else {
return LockSreenEntry(date: Date(), widgets: 0, widgetBattery: 0, widgetStorage: 0 ,widgetAllSpace: 0 ,widgetUseSpace: 0 ,batteryState: "Off" , isCharging: false) return LockSreenEntry(date: Date(), widgets: 0, widgetBattery: 0, widgetStorage: 0 ,widgetAllSpace: 1 ,widgetUseSpace: 0 ,batteryState: "Off" , isCharging: false)
} }
return LockSreenEntry(date: Date(), widgets: decodedData.widget, widgetBattery: decodedData.battery, widgetStorage: decodedData.widgetStorage,widgetAllSpace: decodedData.AllSpace,widgetUseSpace: decodedData.UseSpace ,batteryState: decodedData.batteryState ,isCharging: decodedData.isCharging) return LockSreenEntry(date: Date(), widgets: decodedData.widget, widgetBattery: decodedData.battery, widgetStorage: decodedData.widgetStorage,widgetAllSpace: decodedData.AllSpace,widgetUseSpace: decodedData.UseSpace ,batteryState: decodedData.batteryState ,isCharging: decodedData.isCharging)
} }
} }
struct WidgetData: Codable { struct WidgetData: Codable {
var userId: String var userId: String
var widget: Int var widget: Int
var battery: Int var battery: Int
var widgetStorage: Int var widgetStorage :Int
var AllSpace: Int var AllSpace: Int
var UseSpace: Int var UseSpace: Int
let batteryState: String let batteryState: String
......
...@@ -39,11 +39,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -39,11 +39,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// window?.rootViewController = current // window?.rootViewController = current
// window?.makeKeyAndVisible() // window?.makeKeyAndVisible()
// } // }
// 小组件数据 同步
let battery = WidgetPublicModel.battery() let battery = WidgetPublicModel.battery()
let storage = WidgetPublicModel.UseDiskSpace() * 100 let storage = WidgetPublicModel.UseDiskSpace() * 100
widgetAppgourp.share.PushWidgetData(battery: Int(battery), storage: Int(storage)) widgetAppgourp.share.PushWidgetData(battery: Int(battery), storage: Int(storage))
// 获取内购价格 // 获取内购价格
IAPManager.share.fetchProducts { p in IAPManager.share.fetchProducts { p in
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group_1171275227@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group_1171275227@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group_1171275228@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group_1171275228@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{ {
"images" : [ "images" : [
{ {
"filename" : "ic_list_setting.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "ic_list_setting@2x.png", "filename" : "Frame@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "ic_list_setting@3x.png", "filename" : "Frame@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -31,43 +31,46 @@ ...@@ -31,43 +31,46 @@
<rect key="frame" x="0.0" y="0.0" width="393" height="613.33333333333337"/> <rect key="frame" x="0.0" y="0.0" width="393" height="613.33333333333337"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="ngA-9i-uKc"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="ngA-9i-uKc">
<rect key="frame" x="40" y="41.333333333333314" width="313" height="530.66666666666674"/> <rect key="frame" x="45" y="5" width="303" height="603.33333333333337"/>
<subviews> <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"> <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="313" height="19.333333333333332"/> <rect key="frame" x="0.0" y="0.0" width="303" height="19.333333333333332"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="H33-nl-3al"> <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="37.333333333333314" width="313" height="152.66666666666666"/> <rect key="frame" x="0.0" y="57.999999999999986" width="303" height="147.66666666666663"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="H33-nl-3al" secondAttribute="height" multiplier="281:137" id="yld-7C-nEV"/> <constraint firstAttribute="width" secondItem="H33-nl-3al" secondAttribute="height" multiplier="281:137" id="yld-7C-nEV"/>
</constraints> </constraints>
</imageView> </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"> <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="207.99999999999997" width="313" height="19.333333333333343"/> <rect key="frame" x="0.0" y="244" width="303" height="19.333333333333314"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_2" translatesAutoresizingMaskIntoConstraints="NO" id="fbi-32-E9s"> <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="245.33333333333331" width="313" height="152.33333333333331"/> <rect key="frame" x="0.0" y="302" width="303" height="147.66666666666663"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="fbi-32-E9s" secondAttribute="height" multiplier="281:137" id="ge1-Q5-cNm"/> <constraint firstAttribute="width" secondItem="fbi-32-E9s" secondAttribute="height" multiplier="281:137" id="ge1-Q5-cNm"/>
</constraints> </constraints>
</imageView> </imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="gJQ-p8-Usv"> <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="415.66666666666663" width="313" height="115"/> <rect key="frame" x="0.0" y="488.33333333333337" width="303" height="115"/>
<subviews> <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"> <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="94.333333333333343" y="0.0" width="124.66666666666666" height="30"/> <rect key="frame" x="89.333333333333343" y="0.0" width="124.66666666666666" height="30"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </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"> <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="2.3333333333333428" y="48" width="308.33333333333326" height="67"/> <rect key="frame" x="14.333333333333343" y="48" width="274.66666666666663" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" 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> <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"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
...@@ -80,92 +83,108 @@ ...@@ -80,92 +83,108 @@
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="ngA-9i-uKc" firstAttribute="centerY" secondItem="5Xa-3c-aHx" secondAttribute="centerY" id="7Jh-TE-Owr"/> <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="40" id="8ED-4c-WNC"/> <constraint firstItem="ngA-9i-uKc" firstAttribute="leading" secondItem="5Xa-3c-aHx" secondAttribute="leading" constant="45" id="8ED-4c-WNC"/>
<constraint firstAttribute="trailing" secondItem="ngA-9i-uKc" secondAttribute="trailing" constant="40" id="meh-Mt-0K2"/> <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"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hlo-KY-MjE"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hlo-KY-MjE">
<rect key="frame" x="393" y="0.0" width="393" height="613.33333333333337"/> <rect key="frame" x="393" y="0.0" width="393" height="613.33333333333337"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="2Yh-GL-Q2t"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="2Yh-GL-Q2t">
<rect key="frame" x="40" y="24" width="313" height="565.33333333333337"/> <rect key="frame" x="38" y="5" width="317" height="433.33333333333331"/>
<subviews> <subviews>
<label 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"> <label 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="0.0" width="313" height="19.333333333333332"/> <rect key="frame" x="0.0" y="0.0" width="317" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_similar_1" translatesAutoresizingMaskIntoConstraints="NO" id="kvj-jW-PoF"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_similar_1" translatesAutoresizingMaskIntoConstraints="NO" id="kvj-jW-PoF">
<rect key="frame" x="0.0" y="34.333333333333343" width="313" height="175.66666666666666"/> <rect key="frame" x="0.0" y="31" width="317" height="178"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="kvj-jW-PoF" secondAttribute="height" multiplier="317:178" id="IaD-TY-qFl"/> <constraint firstAttribute="width" secondItem="kvj-jW-PoF" secondAttribute="height" multiplier="317:178" id="IaD-TY-qFl"/>
</constraints> </constraints>
</imageView> </imageView>
<label 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"> <label 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="225" width="313" height="19.333333333333343"/> <rect key="frame" x="0.0" y="224" width="317" height="16.333333333333343"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_similar_2" translatesAutoresizingMaskIntoConstraints="NO" id="x0D-ou-xRd"> <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="259.33333333333331" width="313" height="176"/> <rect key="frame" x="0.0" y="255.33333333333331" width="317" height="178"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="x0D-ou-xRd" secondAttribute="height" multiplier="317:178" id="J9F-Fe-BXn"/> <constraint firstAttribute="width" secondItem="x0D-ou-xRd" secondAttribute="height" multiplier="317:178" id="J9F-Fe-BXn"/>
</constraints> </constraints>
</imageView> </imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="jsL-Yg-DRw"> </subviews>
<rect key="frame" x="0.0" y="450.33333333333337" width="313" height="115"/> </stackView>
<subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="jsL-Yg-DRw">
<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="40" y="493.33333333333337" width="313" height="115"/>
<rect key="frame" x="73.000000000000014" y="0.0" width="167.33333333333337" height="30"/> <subviews>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> <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">
<color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/> <rect key="frame" x="73.000000000000014" y="0.0" width="167.33333333333337" height="30"/>
<nil key="highlightedColor"/> <constraints>
</label> <constraint firstAttribute="height" constant="30" id="2ps-Nz-bpO"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RUE-zC-XhU"> </constraints>
<rect key="frame" x="5" y="48" width="303" height="67"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<string key="text">We will group similar photos together and provide recommendations for the best photos. Please safely view and select the photos you want to move to the trash can.</string> <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <nil key="highlightedColor"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> </label>
<nil key="highlightedColor"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RUE-zC-XhU">
</label> <rect key="frame" x="5" y="48" width="303" height="67"/>
</subviews> <constraints>
</stackView> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="67" id="hgQ-pi-NxW"/>
</constraints>
<string key="text">We will group similar photos together and provide recommendations for the best photos. Please safely view and select the photos you want to move to the trash can.</string>
<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"/>
</label>
</subviews> </subviews>
</stackView> </stackView>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="2Yh-GL-Q2t" secondAttribute="trailing" constant="40" id="4Pl-zY-orU"/> <constraint firstAttribute="bottom" secondItem="jsL-Yg-DRw" secondAttribute="bottom" constant="5" id="43v-pu-Het"/>
<constraint firstItem="2Yh-GL-Q2t" firstAttribute="centerY" secondItem="hlo-KY-MjE" secondAttribute="centerY" id="JRL-Y6-MBU"/> <constraint firstAttribute="trailing" secondItem="jsL-Yg-DRw" secondAttribute="trailing" constant="40" id="5Ef-zt-VFy"/>
<constraint firstItem="2Yh-GL-Q2t" firstAttribute="leading" secondItem="hlo-KY-MjE" secondAttribute="leading" constant="40" id="yn8-PT-z7E"/> <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="5" 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> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ees-5Q-f0P"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ees-5Q-f0P">
<rect key="frame" x="786" y="0.0" width="393" height="613.33333333333337"/> <rect key="frame" x="786" y="0.0" width="393" height="613.33333333333337"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="4BK-NH-6jQ"> <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="-3" width="313" height="619.33333333333337"/> <rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_sreenshot" translatesAutoresizingMaskIntoConstraints="NO" id="zkZ-Px-VS8"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_sreenshot" translatesAutoresizingMaskIntoConstraints="NO" id="zkZ-Px-VS8">
<rect key="frame" x="0.0" y="0.0" width="313" height="449.33333333333331"/> <rect key="frame" x="25.666666666666629" y="0.0" width="262" height="376"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="zkZ-Px-VS8" secondAttribute="height" multiplier="262:376" id="BtW-U1-uWU"/> <constraint firstAttribute="width" secondItem="zkZ-Px-VS8" secondAttribute="height" multiplier="262:376" id="BtW-U1-uWU"/>
</constraints> </constraints>
</imageView> </imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="PHa-RC-gM7"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="PHa-RC-gM7">
<rect key="frame" x="0.0" y="504.33333333333337" width="313" height="115"/> <rect key="frame" x="4.6666666666666288" y="488.33333333333337" width="303.66666666666669" height="115"/>
<subviews> <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"> <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="88" y="0.0" width="137" height="30"/> <rect key="frame" x="83.333333333333371" y="0.0" width="137" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="xUe-iW-aUe"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </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"> <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="4.6666666666666288" y="48" width="303.66666666666669" height="67"/> <rect key="frame" x="0.0" y="48" width="303.66666666666669" height="67"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="51" 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> <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"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
...@@ -178,8 +197,9 @@ ...@@ -178,8 +197,9 @@
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="4BK-NH-6jQ" firstAttribute="centerY" secondItem="ees-5Q-f0P" secondAttribute="centerY" id="7B1-dU-YwN"/> <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="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 firstItem="4BK-NH-6jQ" firstAttribute="leading" secondItem="ees-5Q-f0P" secondAttribute="leading" constant="40" id="sfc-4O-uuC"/>
</constraints> </constraints>
</view> </view>
...@@ -187,7 +207,7 @@ ...@@ -187,7 +207,7 @@
<rect key="frame" x="1179" y="0.0" width="393" height="613.33333333333337"/> <rect key="frame" x="1179" y="0.0" width="393" height="613.33333333333337"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="82" translatesAutoresizingMaskIntoConstraints="NO" id="Tcf-97-ZCs"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="82" translatesAutoresizingMaskIntoConstraints="NO" id="Tcf-97-ZCs">
<rect key="frame" x="40" y="33.666666666666629" width="313" height="546"/> <rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_video" translatesAutoresizingMaskIntoConstraints="NO" id="qjS-Jv-Tsc"> <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"/> <rect key="frame" x="0.0" y="0.0" width="313" height="365.66666666666669"/>
...@@ -196,7 +216,7 @@ ...@@ -196,7 +216,7 @@
</constraints> </constraints>
</imageView> </imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="VBe-cO-HJz"> <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="447.66666666666674" width="313" height="98.333333333333371"/> <rect key="frame" x="0.0" y="504.99999999999994" width="313" height="98.333333333333314"/>
<subviews> <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"> <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="122.66666666666674" y="0.0" width="67.666666666666686" height="30"/>
...@@ -217,16 +237,17 @@ ...@@ -217,16 +237,17 @@
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="Tcf-97-ZCs" firstAttribute="centerY" secondItem="yeQ-s0-3eu" secondAttribute="centerY" id="X2i-bh-too"/>
<constraint firstAttribute="trailing" secondItem="Tcf-97-ZCs" secondAttribute="trailing" constant="40" id="X4R-xi-Qry"/> <constraint firstAttribute="trailing" secondItem="Tcf-97-ZCs" secondAttribute="trailing" constant="40" id="X4R-xi-Qry"/>
<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="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"/>
</constraints> </constraints>
</view> </view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XAV-qr-EhO"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XAV-qr-EhO">
<rect key="frame" x="1572" y="0.0" width="393" height="613.33333333333337"/> <rect key="frame" x="1572" y="0.0" width="393" height="613.33333333333337"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="82" translatesAutoresizingMaskIntoConstraints="NO" id="3FW-3K-xPh"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="55" translatesAutoresizingMaskIntoConstraints="NO" id="3FW-3K-xPh">
<rect key="frame" x="40" y="33.666666666666629" width="313" height="546"/> <rect key="frame" x="40" y="5" width="313" height="603.33333333333337"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_photos" translatesAutoresizingMaskIntoConstraints="NO" id="g9Z-rw-Wgd"> <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"/> <rect key="frame" x="0.0" y="0.0" width="313" height="365.66666666666669"/>
...@@ -235,7 +256,7 @@ ...@@ -235,7 +256,7 @@
</constraints> </constraints>
</imageView> </imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="SLW-Qi-u2E"> <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="447.66666666666674" width="313" height="98.333333333333371"/> <rect key="frame" x="0.0" y="504.99999999999994" width="313" height="98.333333333333314"/>
<subviews> <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"> <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="79.666666666666728" y="0.0" width="153.66666666666663" height="30"/>
...@@ -257,8 +278,9 @@ ...@@ -257,8 +278,9 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="3FW-3K-xPh" firstAttribute="leading" secondItem="XAV-qr-EhO" secondAttribute="leading" constant="40" id="Q6a-QQ-yix"/> <constraint firstItem="3FW-3K-xPh" firstAttribute="leading" secondItem="XAV-qr-EhO" secondAttribute="leading" constant="40" id="Q6a-QQ-yix"/>
<constraint firstItem="3FW-3K-xPh" firstAttribute="centerY" secondItem="XAV-qr-EhO" secondAttribute="centerY" id="Rgg-h4-E4a"/> <constraint firstAttribute="bottom" secondItem="3FW-3K-xPh" secondAttribute="bottom" constant="5" id="Xvb-vT-KF4"/>
<constraint firstAttribute="trailing" secondItem="3FW-3K-xPh" secondAttribute="trailing" constant="40" id="rM8-db-kJS"/> <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"/>
</constraints> </constraints>
</view> </view>
</subviews> </subviews>
......
//
// PMSwipHintView.swift
// PhoneManager
//
// Created by edy on 2025/5/21.
//
import UIKit
class PMSwipHintView: UIView {
class func xib() -> PMSwipHintView {
let nib = UINib(nibName: "PMSwipHintView", bundle: nil).instantiate(withOwner: nil).first as! PMSwipHintView
nib.frame = CGRectMake(0, 0, ScreenW, ScreenH)
return nib
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
UIView.animate(withDuration: AniDuration-0.2) {
self.alpha = 0
} completion: { su in
self.removeFromSuperview()
}
}
}
<?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="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="FIR-bL-suQ" customClass="PMSwipHintView" customModule="PhoneManager" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="35" translatesAutoresizingMaskIntoConstraints="NO" id="bdi-4y-If1">
<rect key="frame" x="125.66666666666667" y="286.66666666666669" width="141.66666666666663" height="279.00000000000006"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="fI1-sX-2fc">
<rect key="frame" x="0.0" y="0.0" width="141.66666666666666" height="122"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Group_1171275227" translatesAutoresizingMaskIntoConstraints="NO" id="Aof-Vb-mCI">
<rect key="frame" x="0.0" y="0.0" width="141.66666666666666" height="90"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jIo-6A-Wmj">
<rect key="frame" x="0.0" y="102" width="141.66666666666666" height="20"/>
<attributedString key="attributedText">
<fragment content="Swipe left to ">
<attributes>
<color key="NSColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<font key="NSFont" metaFont="system" size="18"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment content="delete">
<attributes>
<color key="NSColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<font key="NSFont" metaFont="system" size="18"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="VQh-MR-znh">
<rect key="frame" x="0.0" y="157" width="141.66666666666666" height="122"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Group_1171275228" translatesAutoresizingMaskIntoConstraints="NO" id="bNs-p1-kQ0">
<rect key="frame" x="0.0" y="0.0" width="141.66666666666666" height="90"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xwG-Xf-9nh">
<rect key="frame" x="0.0" y="101.99999999999994" width="141.66666666666666" height="20"/>
<attributedString key="attributedText">
<fragment content="Right swipe to ">
<attributes>
<color key="NSColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<font key="NSFont" metaFont="system" size="18"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment content="save">
<attributes>
<color key="NSColor" red="0.32156862745098036" green="0.7803921568627451" blue="0.46274509803921571" alpha="1" colorSpace="calibratedRGB"/>
<font key="NSFont" metaFont="system" size="18"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="kYu-v0-w8e"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.69815582482993188" colorSpace="custom" customColorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="bdi-4y-If1" firstAttribute="centerX" secondItem="FIR-bL-suQ" secondAttribute="centerX" id="o0G-df-lDw"/>
<constraint firstItem="bdi-4y-If1" firstAttribute="centerY" secondItem="FIR-bL-suQ" secondAttribute="centerY" id="wCr-gG-BXr"/>
</constraints>
<point key="canvasLocation" x="131" y="-13"/>
</view>
</objects>
<resources>
<image name="Group_1171275227" width="102.33333587646484" height="90"/>
<image name="Group_1171275228" width="102.33333587646484" height="90"/>
</resources>
</document>
...@@ -32,7 +32,7 @@ class VideoViewController: UIViewController { ...@@ -32,7 +32,7 @@ class VideoViewController: UIViewController {
playerViewController.player = player playerViewController.player = player
playerViewController.delegate = self playerViewController.delegate = self
playerViewController.showsPlaybackControls = true playerViewController.showsPlaybackControls = true
playerViewController.player?.isMuted = true
// 3. 添加到当前视图 // 3. 添加到当前视图
addChild(playerViewController) addChild(playerViewController)
view.addSubview(playerViewController.view) view.addSubview(playerViewController.view)
......
...@@ -261,6 +261,8 @@ class HomeViewController:BaseViewController { ...@@ -261,6 +261,8 @@ class HomeViewController:BaseViewController {
isShowCharge = true isShowCharge = true
} }
homeView?.viewModel.reloadTrashAndKeep() homeView?.viewModel.reloadTrashAndKeep()
} }
override func viewDidAppear(_ animated: Bool) { override func viewDidAppear(_ animated: Bool) {
......
...@@ -26,6 +26,16 @@ class PhotoRemoveViewController: BaseViewController { ...@@ -26,6 +26,16 @@ class PhotoRemoveViewController: BaseViewController {
} }
} }
var isHints:Bool{
set {
UserDefaults.standard.set(newValue, forKey: "swipIsShowKey")
UserDefaults.standard.synchronize()
}
get{
return UserDefaults.standard.object(forKey: "swipIsShowKey") as? Bool ?? false
}
}
private var bottomConstraint: Constraint? private var bottomConstraint: Constraint?
let formatter = DateFormatter() let formatter = DateFormatter()
...@@ -227,6 +237,12 @@ class PhotoRemoveViewController: BaseViewController { ...@@ -227,6 +237,12 @@ class PhotoRemoveViewController: BaseViewController {
self.view.addSubview(self.trashButton) self.view.addSubview(self.trashButton)
self.view.addSubview(self.keepListButton) self.view.addSubview(self.keepListButton)
if isHints == false {
isHints = true
self.view.addSubview(PMSwipHintView.xib())
}
} }
// 拿到当前类型垃圾桶数据的最后一个 // 拿到当前类型垃圾桶数据的最后一个
......
...@@ -180,6 +180,7 @@ class HomeVideoCoverCell: UICollectionViewCell { ...@@ -180,6 +180,7 @@ class HomeVideoCoverCell: UICollectionViewCell {
lazy var videoPlayer:AVPlayer = { lazy var videoPlayer:AVPlayer = {
let palyer = AVPlayer.init() let palyer = AVPlayer.init()
palyer.volume = 0 palyer.volume = 0
palyer.isMuted = true
// 设置音频会话,允许混音 // 设置音频会话,允许混音
try? AVAudioSession.sharedInstance().setCategory(.playback, options: .mixWithOthers) try? AVAudioSession.sharedInstance().setCategory(.playback, options: .mixWithOthers)
try? AVAudioSession.sharedInstance().setActive(true) try? AVAudioSession.sharedInstance().setActive(true)
......
...@@ -16,25 +16,25 @@ ...@@ -16,25 +16,25 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SyR-iC-5WC"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SyR-iC-5WC">
<rect key="frame" x="16" y="301" width="361" height="250"/> <rect key="frame" x="16" y="284.66666666666663" width="361" height="282.66666666666663"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_list_setting" translatesAutoresizingMaskIntoConstraints="NO" id="aer-UI-Hdf"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_list_setting" translatesAutoresizingMaskIntoConstraints="NO" id="aer-UI-Hdf">
<rect key="frame" x="166.66666666666666" y="22" width="28" height="28"/> <rect key="frame" x="154.33333333333334" y="20" width="52.333333333333343" height="52"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Stop retaining all photos?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ITE-9H-tkI"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Stop retaining all photos?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ITE-9H-tkI">
<rect key="frame" x="84.333333333333329" y="74" width="192.66666666666669" height="19.333333333333329"/> <rect key="frame" x="64.333333333333329" y="96" width="232.66666666666669" height="24"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/> <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The retained list will be cleared and all photos will be displayed in the next scan." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="35j-Q4-9L6"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The retained list will be cleared and all photos will be displayed in the next scan." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="35j-Q4-9L6">
<rect key="frame" x="26" y="97.333333333333314" width="309" height="28.666666666666671"/> <rect key="frame" x="26" y="124.00000000000001" width="309" height="33.666666666666671"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FLo-zT-dpO"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FLo-zT-dpO">
<rect key="frame" x="73" y="150" width="215" height="43"/> <rect key="frame" x="73" y="181.66666666666663" width="215" height="43"/>
<color key="backgroundColor" red="0.0" green="0.50980392159999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.0" green="0.50980392159999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="1O1-hE-Gz9"/> <constraint firstAttribute="height" constant="43" id="1O1-hE-Gz9"/>
...@@ -53,7 +53,11 @@ ...@@ -53,7 +53,11 @@
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="68F-oy-zob"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="68F-oy-zob">
<rect key="frame" x="157" y="205" width="47" height="29"/> <rect key="frame" x="73" y="229.66666666666669" width="215" height="43"/>
<constraints>
<constraint firstAttribute="width" constant="215" id="37L-vp-Feq"/>
<constraint firstAttribute="height" constant="43" id="c9Y-uS-7rN"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/> <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"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Cancel"> <state key="normal" title="Cancel">
...@@ -66,16 +70,16 @@ ...@@ -66,16 +70,16 @@
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="bottom" secondItem="68F-oy-zob" secondAttribute="bottom" constant="10" id="4AF-7b-M1O"/>
<constraint firstItem="ITE-9H-tkI" firstAttribute="top" secondItem="aer-UI-Hdf" secondAttribute="bottom" constant="24" id="4n6-Nx-JEk"/> <constraint firstItem="ITE-9H-tkI" firstAttribute="top" secondItem="aer-UI-Hdf" secondAttribute="bottom" constant="24" id="4n6-Nx-JEk"/>
<constraint firstItem="FLo-zT-dpO" firstAttribute="centerX" secondItem="35j-Q4-9L6" secondAttribute="centerX" id="Btb-F7-pNk"/> <constraint firstItem="FLo-zT-dpO" firstAttribute="centerX" secondItem="35j-Q4-9L6" secondAttribute="centerX" id="Btb-F7-pNk"/>
<constraint firstItem="FLo-zT-dpO" firstAttribute="top" secondItem="35j-Q4-9L6" secondAttribute="bottom" constant="24" id="D5x-HU-13q"/> <constraint firstItem="FLo-zT-dpO" firstAttribute="top" secondItem="35j-Q4-9L6" secondAttribute="bottom" constant="24" id="D5x-HU-13q"/>
<constraint firstAttribute="height" constant="250" id="ROB-W2-QK9"/>
<constraint firstAttribute="trailing" secondItem="35j-Q4-9L6" secondAttribute="trailing" constant="26" id="XKK-A0-h6s"/> <constraint firstAttribute="trailing" secondItem="35j-Q4-9L6" secondAttribute="trailing" constant="26" id="XKK-A0-h6s"/>
<constraint firstItem="68F-oy-zob" firstAttribute="centerX" secondItem="FLo-zT-dpO" secondAttribute="centerX" id="dfa-Sn-bR1"/> <constraint firstItem="68F-oy-zob" firstAttribute="centerX" secondItem="FLo-zT-dpO" secondAttribute="centerX" id="dfa-Sn-bR1"/>
<constraint firstItem="aer-UI-Hdf" firstAttribute="centerX" secondItem="SyR-iC-5WC" secondAttribute="centerX" id="gaW-p7-bEw"/> <constraint firstItem="aer-UI-Hdf" firstAttribute="centerX" secondItem="SyR-iC-5WC" secondAttribute="centerX" id="gaW-p7-bEw"/>
<constraint firstItem="68F-oy-zob" firstAttribute="top" secondItem="FLo-zT-dpO" secondAttribute="bottom" constant="12" id="iwJ-qh-Bcp"/> <constraint firstItem="68F-oy-zob" firstAttribute="top" secondItem="FLo-zT-dpO" secondAttribute="bottom" constant="5" id="iwJ-qh-Bcp"/>
<constraint firstItem="ITE-9H-tkI" firstAttribute="centerX" secondItem="aer-UI-Hdf" secondAttribute="centerX" id="pPT-En-OiR"/> <constraint firstItem="ITE-9H-tkI" firstAttribute="centerX" secondItem="aer-UI-Hdf" secondAttribute="centerX" id="pPT-En-OiR"/>
<constraint firstItem="aer-UI-Hdf" firstAttribute="top" secondItem="SyR-iC-5WC" secondAttribute="top" constant="22" id="qQG-VB-7uJ"/> <constraint firstItem="aer-UI-Hdf" firstAttribute="top" secondItem="SyR-iC-5WC" secondAttribute="top" constant="20" id="qQG-VB-7uJ"/>
<constraint firstItem="35j-Q4-9L6" firstAttribute="top" secondItem="ITE-9H-tkI" secondAttribute="bottom" constant="4" id="xdP-7n-d3I"/> <constraint firstItem="35j-Q4-9L6" firstAttribute="top" secondItem="ITE-9H-tkI" secondAttribute="bottom" constant="4" id="xdP-7n-d3I"/>
<constraint firstItem="35j-Q4-9L6" firstAttribute="leading" secondItem="SyR-iC-5WC" secondAttribute="leading" constant="26" id="yW5-v3-r3e"/> <constraint firstItem="35j-Q4-9L6" firstAttribute="leading" secondItem="SyR-iC-5WC" secondAttribute="leading" constant="26" id="yW5-v3-r3e"/>
</constraints> </constraints>
...@@ -97,7 +101,7 @@ ...@@ -97,7 +101,7 @@
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="ic_list_setting" width="28.333333969116211" height="28"/> <image name="ic_list_setting" width="52.333332061767578" height="52"/>
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
......
...@@ -37,6 +37,13 @@ class PMShowVideoCell: UICollectionViewCell { ...@@ -37,6 +37,13 @@ class PMShowVideoCell: UICollectionViewCell {
} }
} }
} }
selectBtn.snp.updateConstraints { make in
// if type == 0 {
// make.bottom.equalToSuperview().offset(-10)
// }else{
make.bottom.equalToSuperview().offset(-40)
// }
}
} }
override init(frame: CGRect) { override init(frame: CGRect) {
......
...@@ -178,15 +178,51 @@ class PMShowImgVideoController: BaseViewController { ...@@ -178,15 +178,51 @@ class PMShowImgVideoController: BaseViewController {
if let cell:PMShowImgCell = MaxCollection.cellForItem(at: IndexPath(row: currentIdx, section: 0) ) as? PMShowImgCell { if let cell:PMShowImgCell = MaxCollection.cellForItem(at: IndexPath(row: currentIdx, section: 0) ) as? PMShowImgCell {
items.append(cell.icon) items.append(cell.icon)
}else if let cell:PMShowVideoCell = MaxCollection.cellForItem(at: IndexPath(row: currentIdx, section: 0) ) as? PMShowVideoCell { }else if let cell:PMShowVideoCell = MaxCollection.cellForItem(at: IndexPath(row: currentIdx, section: 0) ) as? PMShowVideoCell {
if let nbsame:String = self.imageVideoPath[self.currentIdx] as? String {
let url = "SecretIm".document().appendingPathComponent(nbsame)
items.append(url)
}
} }
PhoneShare(items, parent: self) PhoneShare(items, parent: self)
}else{
let name = self.imageVideoPath[self.currentIdx]
deleteData(name)
} }
} }
btns.clipsToBounds = true btns.clipsToBounds = true
return btns return btns
}() }()
private func deleteData(_ name:String) -> Void {
let DelCallBlock = { [weak self] in
guard let self = self else { return }
"".delPhotoVideo([name])
Print("删除成功")
if self.imageVideoPath.count == 1 {
self.navigationController?.popViewController(animated: true)
}else{
self.imageVideoPath.remove(at: self.currentIdx)
self.MaxCollection.deleteItems(at: [IndexPath(row: self.currentIdx, section: 0)])
self.bottItems.deleteItems(at: [IndexPath(row: self.currentIdx, section: 0)])
if ((self.imageVideoPath.count) == self.currentIdx){
self.currentIdx -= 1
}
self.MaxCollection.reloadData()
self.bottItems.reloadData()
}
}
// 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)
})
// }else{
// DelCallBlock()
// }
}
private lazy var backView: UIView = { private lazy var backView: UIView = {
let v = UIView() let v = UIView()
v.backgroundColor = .white v.backgroundColor = .white
...@@ -245,22 +281,31 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa ...@@ -245,22 +281,31 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionView == bottItems { if collectionView == bottItems {
self.vibrate() if state != .secret {
if selectSet.contains(indexPath.row) { self.vibrate()
self.homeDataSource?[indexPath.row].isSeleted = false if selectSet.contains(indexPath.row) {
selectSet.remove(indexPath.row) self.homeDataSource?[indexPath.row].isSeleted = false
selectSet.remove(indexPath.row)
}else{
self.homeDataSource?[indexPath.row].isSeleted = true
selectSet.add(indexPath.row)
}
self.MaxCollection.reloadData()
collectionView.reloadData()
}else{ }else{
self.homeDataSource?[indexPath.row].isSeleted = true self.currentIdx = indexPath.row;
selectSet.add(indexPath.row) self.MaxCollection.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
} }
self.MaxCollection.reloadData()
collectionView.reloadData()
} }
} }
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if self.state == .secret { if self.state == .secret {
return imageVideoPath.count if collectionView == MaxCollection{
return imageVideoPath.count
}else{
return imageVideoPath.count + 1
}
}else { }else {
if collectionView == MaxCollection{ if collectionView == MaxCollection{
return self.homeDataSource?.count ?? 0 return self.homeDataSource?.count ?? 0
...@@ -272,80 +317,85 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa ...@@ -272,80 +317,85 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
} }
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
if state == .secret && collectionView == MaxCollection{ if state == .secret && collectionView == MaxCollection{
let showName = imageVideoPath[indexPath.row] if indexPath.row < imageVideoPath.count {
if !showName.hasSuffix(".png") { let showName = imageVideoPath[indexPath.row]
guard let zCell:PMShowVideoCell = cell as? PMShowVideoCell else { return } if !showName.hasSuffix(".png") {
zCell.innerVideoController?.playerViewController.player?.pause() guard let zCell:PMShowVideoCell = cell as? PMShowVideoCell else { return }
zCell.innerVideoController?.playerViewController.player?.pause()
}
} }
} }
} }
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if state == .secret { if state == .secret {
let showName = imageVideoPath[indexPath.row] if indexPath.row < imageVideoPath.count {
if collectionView == MaxCollection { let showName = imageVideoPath[indexPath.row]
if showName.hasSuffix(".png") { if collectionView == MaxCollection {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowImgCellID, for: indexPath) as! PMShowImgCell if showName.hasSuffix(".png") {
showName.loadPhotoOrVideo { durs, icon in let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowImgCellID, for: indexPath) as! PMShowImgCell
cell.icon = icon showName.loadPhotoOrVideo { durs, icon in
cell.icon = icon
}
if let data = self.homeDataSource {
cell.bestResultButton.isHidden = indexPath.row != 0 || data.count <= 1
}else{
cell.selectBtn.isHidden = true
cell.bestResultButton.isHidden = true
}
cell.isCurrent = selectSet.contains(indexPath.row)
cell.callblock = {[weak self] in
guard let self = self else { return }
self.vibrate()
if self.selectSet.contains(indexPath.row){
self.homeDataSource?[indexPath.row].isSeleted = false
self.selectSet.remove(indexPath.row)
}else{
self.homeDataSource?[indexPath.row].isSeleted = true
self.selectSet.add(indexPath.row)
}
cell.isCurrent = selectSet.contains(indexPath.row)
self.bottItems.reloadData()
}
return cell
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowVideoCellID, for: indexPath) as! PMShowVideoCell
cell.isCurrent = selectSet.contains(indexPath.row)
cell.playURL = showName
cell.reload()
cell.callblock = {[weak self] in
guard let self = self else { return }
self.vibrate()
if self.selectSet.contains(indexPath.row){
self.homeDataSource?[indexPath.row].isSeleted = false
self.selectSet.remove(indexPath.row)
}else{
self.homeDataSource?[indexPath.row].isSeleted = true
self.selectSet.add(indexPath.row)
}
cell.isCurrent = selectSet.contains(indexPath.row)
self.bottItems.reloadData()
}
return cell
} }
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowItemCellID, for: indexPath) as! PMShowItemCell
if let data = self.homeDataSource { if let data = self.homeDataSource {
cell.bestResultButton.isHidden = indexPath.row != 0 || data.count <= 1
}else{ }else{
cell.selectBtn.isHidden = true cell.selectBtn.isHidden = true
cell.bestResultButton.isHidden = true
} }
cell.isCurrent = selectSet.contains(indexPath.row) showName.loadPhotoOrVideo { duration, icon in
cell.callblock = {[weak self] in DispatchQueue.main.async {
guard let self = self else { return } cell.icon = icon
self.vibrate()
if self.selectSet.contains(indexPath.row){
self.homeDataSource?[indexPath.row].isSeleted = false
self.selectSet.remove(indexPath.row)
}else{
self.homeDataSource?[indexPath.row].isSeleted = true
self.selectSet.add(indexPath.row)
} }
cell.isCurrent = selectSet.contains(indexPath.row)
self.bottItems.reloadData()
} }
return cell
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowVideoCellID, for: indexPath) as! PMShowVideoCell
cell.isCurrent = selectSet.contains(indexPath.row) cell.isCurrent = selectSet.contains(indexPath.row)
cell.playURL = showName
cell.reload()
cell.callblock = {[weak self] in
guard let self = self else { return }
self.vibrate()
if self.selectSet.contains(indexPath.row){
self.homeDataSource?[indexPath.row].isSeleted = false
self.selectSet.remove(indexPath.row)
}else{
self.homeDataSource?[indexPath.row].isSeleted = true
self.selectSet.add(indexPath.row)
}
cell.isCurrent = selectSet.contains(indexPath.row)
self.bottItems.reloadData()
}
return cell return cell
} }
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: PMShowItemCellID, for: indexPath) as! PMShowItemCell
if let data = self.homeDataSource {
}else{
cell.selectBtn.isHidden = true
}
showName.loadPhotoOrVideo { duration, icon in
DispatchQueue.main.async {
cell.icon = icon
}
}
cell.isCurrent = selectSet.contains(indexPath.row)
return cell
} }
} }
......
...@@ -31,22 +31,27 @@ class SecretSetViewController: BaseViewController, UITextFieldDelegate { ...@@ -31,22 +31,27 @@ class SecretSetViewController: BaseViewController, UITextFieldDelegate {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.titleView.backBtn.setImage(UIImage(named: "ic_close_charging"), for: .normal) self.titleView.backBtn.setImage(UIImage(named: "ic_close_charging"), for: .normal)
self.titleView.model.isBackBtnShow = true self.titleView.model.isBackBtnShow = true
titleView.model.title = "Secret Library" titleView.model.title = "Secret Library"
titleView.titleLabel.textColor = .black titleView.titleLabel.textColor = .black
titleView.titleLabel.textAlignment = .left titleView.titleLabel.textAlignment = .left
setUI() setUI()
if secretType != .verify || (SettingConfiguration.share.config.faceId ?? false ) == false {
ps.becomeFirstResponder()
}else{
self.faceID()
}
collect.register(SecretSetPsCell.self, forCellWithReuseIdentifier: SecretSetPsCellID) collect.register(SecretSetPsCell.self, forCellWithReuseIdentifier: SecretSetPsCellID)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
} }
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) {
if self.secretType != .verify || (SettingConfiguration.share.config.faceId ?? false ) == false {
self.ps.becomeFirstResponder()
}else{
self.faceID()
}
}
}
func faceID() -> Void { func faceID() -> Void {
if PMFaceIDManger.request() { if PMFaceIDManger.request() {
PMFaceIDManger.authenticateWithFaceID(reason: "Unlock privacy space") {[weak self] success, error in PMFaceIDManger.authenticateWithFaceID(reason: "Unlock privacy space") {[weak self] success, error in
......
...@@ -86,6 +86,8 @@ class SecretViewController: BaseViewController { ...@@ -86,6 +86,8 @@ class SecretViewController: BaseViewController {
}else{ }else{
secretLock.setImage(UIImage(named: "ic_lock_secret"), for: .normal) secretLock.setImage(UIImage(named: "ic_lock_secret"), for: .normal)
} }
self.loadData()
self.secretCollect.reloadData()
} }
@discardableResult @discardableResult
...@@ -122,16 +124,16 @@ class SecretViewController: BaseViewController { ...@@ -122,16 +124,16 @@ class SecretViewController: BaseViewController {
self.dataSource = self.loadData() self.dataSource = self.loadData()
self.bottomm.state = .add self.bottomm.state = .add
} }
if SettingConfiguration.share.config.removeImg { // 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 PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
if selectidx == 1 { if selectidx == 1 {
DelCallBlock() DelCallBlock()
} }
alert.dismiss(animated: true) alert.dismiss(animated: true)
}) })
}else{ // }else{
DelCallBlock() // DelCallBlock()
} // }
} }
@objc private func lockTouch(_ sender:UIButton) -> Void { @objc private func lockTouch(_ sender:UIButton) -> Void {
......
...@@ -10,12 +10,6 @@ import Foundation ...@@ -10,12 +10,6 @@ import Foundation
class SettingViewController : BaseViewController , UITableViewDelegate, UITableViewDataSource{ class SettingViewController : BaseViewController , UITableViewDelegate, UITableViewDataSource{
var modelData: [SettingModel]? var modelData: [SettingModel]?
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
modelData = getSettingViewInfo()
self.tableView.reloadData()
}
lazy var tableView : UITableView = { lazy var tableView : UITableView = {
let cY = titleView.height + titleView.y let cY = titleView.height + titleView.y
...@@ -46,11 +40,9 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV ...@@ -46,11 +40,9 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
self.titleView.titleLabel.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1) self.titleView.titleLabel.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
modelData = getSettingViewInfo() modelData = getSettingViewInfo()
self.view.addSubview(tableView) self.view.addSubview(tableView)
self.tableView.reloadData()
} }
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
let model : SettingModel = modelData![section] let model : SettingModel = modelData![section]
...@@ -161,12 +153,13 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV ...@@ -161,12 +153,13 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
emailLoginSignOut() emailLoginSignOut()
break break
case settingLabels.UsePIN.rawValue: case settingLabels.UsePIN.rawValue:
vibrate()
secretspace() secretspace()
vibrate()
break break
case settingLabels.UseFaceID.rawValue: case settingLabels.UseFaceID.rawValue:
vibrate()
SetFaceID(indexPath) SetFaceID(indexPath)
vibrate()
break break
case settingLabels.ChangePIN.rawValue: case settingLabels.ChangePIN.rawValue:
changePIN() changePIN()
...@@ -247,8 +240,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV ...@@ -247,8 +240,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
// MARK: - 隐私空间PIN // MARK: - 隐私空间PIN
private func secretspace() -> Void { private func secretspace() -> Void {
let seting = SecretSetViewController()
if SettingConfiguration.share.config.secret?.count ?? 0 == 4 { if SettingConfiguration.share.config.secret?.count ?? 0 == 4 {
let seting = SecretSetViewController()
seting.secretType = .del seting.secretType = .del
seting.Callback = {[weak self] success in seting.Callback = {[weak self] success in
guard let self = self else { return } guard let self = self else { return }
...@@ -259,7 +252,6 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV ...@@ -259,7 +252,6 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
} }
self.navigationController?.pushViewController(seting, animated: true) self.navigationController?.pushViewController(seting, animated: true)
}else{ }else{
let seting = SecretSetViewController()
seting.secretType = .create seting.secretType = .create
seting.Callback = {[weak self] success in seting.Callback = {[weak self] success in
guard let self = self else { return } guard let self = self else { return }
...@@ -295,12 +287,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV ...@@ -295,12 +287,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
private func changePIN() -> Void { private func changePIN() -> Void {
let seting = SecretSetViewController() let seting = SecretSetViewController()
seting.secretType = .change seting.secretType = .change
seting.Callback = {[weak self] success in seting.Callback = { success in
guard let self = self else { return }
if success {
// self.modelData = getSettingViewInfo()
// self.tableView.reloadData()
}
} }
self.navigationController?.pushViewController(seting, animated: true) self.navigationController?.pushViewController(seting, animated: true)
} }
......
...@@ -27,31 +27,31 @@ ...@@ -27,31 +27,31 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="5sP-3G-R5V"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="5sP-3G-R5V">
<rect key="frame" x="41" y="185" width="346" height="137.66666666666663"/> <rect key="frame" x="41" y="150" width="346" height="137.66666666666663"/>
</imageView> </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="XMa-dY-JFG"> <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="XMa-dY-JFG">
<rect key="frame" x="40" y="147" width="97" height="20"/> <rect key="frame" x="40" y="112" width="97" height="20"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="LIQ-mA-CKi"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="LIQ-mA-CKi">
<rect key="frame" x="41" y="380.66666666666669" width="346" height="137.00000000000006"/> <rect key="frame" x="41" y="345.66666666666669" width="346" height="137"/>
</imageView> </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="dRr-c6-YoB"> <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="dRr-c6-YoB">
<rect key="frame" x="40" y="342.66666666666669" width="97" height="20"/> <rect key="frame" x="40" y="307.66666666666669" width="97" height="20"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U5t-M8-fCd"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U5t-M8-fCd">
<rect key="frame" x="151.66666666666666" y="544.66666666666663" width="124.99999999999997" height="30"/> <rect key="frame" x="151.66666666666666" y="509.66666666666674" width="124.99999999999997" height="30"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </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="OOD-68-wMD"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OOD-68-wMD">
<rect key="frame" x="25" y="592.66666666666663" width="390" height="50.333333333333371"/> <rect key="frame" x="25" y="557.66666666666663" width="390" height="50.333333333333371"/>
<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> <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"/> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="5sP-3G-R5V" secondAttribute="trailing" constant="53" id="h2C-hf-maH"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="5sP-3G-R5V" secondAttribute="trailing" constant="53" id="h2C-hf-maH"/>
<constraint firstItem="OOD-68-wMD" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="25" id="jJ3-Yj-u0w"/> <constraint firstItem="OOD-68-wMD" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="25" id="jJ3-Yj-u0w"/>
<constraint firstItem="OOD-68-wMD" firstAttribute="top" secondItem="U5t-M8-fCd" secondAttribute="bottom" constant="18" id="lO2-YE-hId" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstItem="OOD-68-wMD" firstAttribute="top" secondItem="U5t-M8-fCd" secondAttribute="bottom" constant="18" id="lO2-YE-hId" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="XMa-dY-JFG" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="85" id="lQN-9H-9H5" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstItem="XMa-dY-JFG" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="50" id="lQN-9H-9H5" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="LIQ-mA-CKi" firstAttribute="trailing" secondItem="5sP-3G-R5V" secondAttribute="trailing" id="qKI-bl-RGS"/> <constraint firstItem="LIQ-mA-CKi" firstAttribute="trailing" secondItem="5sP-3G-R5V" secondAttribute="trailing" id="qKI-bl-RGS"/>
<constraint firstItem="LIQ-mA-CKi" firstAttribute="top" secondItem="dRr-c6-YoB" secondAttribute="bottom" constant="18" id="qWW-HD-yM0" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstItem="LIQ-mA-CKi" firstAttribute="top" secondItem="dRr-c6-YoB" secondAttribute="bottom" constant="18" id="qWW-HD-yM0" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="U5t-M8-fCd" firstAttribute="centerX" secondItem="LIQ-mA-CKi" secondAttribute="centerX" id="yXP-XE-VJ9"/> <constraint firstItem="U5t-M8-fCd" firstAttribute="centerX" secondItem="LIQ-mA-CKi" secondAttribute="centerX" id="yXP-XE-VJ9"/>
......
...@@ -35,7 +35,13 @@ class PMScaleImageView: UIView , UIScrollViewDelegate { ...@@ -35,7 +35,13 @@ class PMScaleImageView: UIView , UIScrollViewDelegate {
} }
self.showImg.snp.remakeConstraints({ make in self.showImg.snp.remakeConstraints({ make in
make.left.equalToSuperview().offset((self.width - size.width)/2.0 ) make.left.equalToSuperview().offset((self.width - size.width)/2.0 )
make.top.equalToSuperview().offset((self.height - size.height)/2.0 ) if size.height < self.height / 2.0 {
make.top.equalToSuperview().offset((self.height - size.height)/2.0 - 20 )
}else if self.height - size.height > 20 {
make.top.equalToSuperview().offset(10)
}else{
make.top.equalToSuperview().offset((self.height - size.height)/2.0 )
}
make.size.equalTo(size) make.size.equalTo(size)
}) })
}) })
......
...@@ -22,7 +22,7 @@ struct Provider: TimelineProvider { ...@@ -22,7 +22,7 @@ struct Provider: TimelineProvider {
func getTimeline(in context: Context, completion: @escaping (Timeline<SimpleEntry>) -> Void) { func getTimeline(in context: Context, completion: @escaping (Timeline<SimpleEntry>) -> Void) {
let entry = loadSharedData() let entry = loadSharedData()
let timeline = Timeline(entries: [entry], policy: .after(Date().addingTimeInterval(60))) let timeline = Timeline(entries: [entry], policy: .after(Date().addingTimeInterval(120)))
completion(timeline) completion(timeline)
} }
...@@ -419,58 +419,58 @@ struct BatteryWidget2: Widget { ...@@ -419,58 +419,58 @@ struct BatteryWidget2: Widget {
struct AWidgetStorageView : View { //struct AWidgetStorageView : View {
var entry: Provider.Entry // var entry: Provider.Entry
var body: some View { // var body: some View {
if #available(iOSApplicationExtension 17.0, *) { // if #available(iOSApplicationExtension 17.0, *) {
ZStack { // ZStack {
Text("\(entry.widgetBattery)") // Text("\(entry.widgetBattery)")
}.foregroundColor(Color("333333")) // }.foregroundColor(Color("333333"))
.containerBackground(for: .widget) { // .containerBackground(for: .widget) {
AccessoryWidgetBackground() // AccessoryWidgetBackground()
} // }
} else { // } else {
ZStack { // ZStack {
Text("Hello") // Text("Hello")
} // }
} // }
} // }
} //}
struct LockScreenWidgetView :View { //struct LockScreenWidgetView :View {
var entry: Provider.Entry // var entry: Provider.Entry
@Environment(\.widgetFamily) var family // @Environment(\.widgetFamily) var family
var body: some View { // var body: some View {
switch family { // switch family {
case .accessoryCircular: // case .accessoryCircular:
AWidgetStorageView(entry: entry) // AWidgetStorageView(entry: entry)
default: // default:
EmptyView() // EmptyView()
} // }
} // }
} //}
struct widgetLockSreenView: Widget { //struct widgetLockSreenView: Widget {
let kind = "com.app.lockscreen.widget" // let kind = "com.app.lockscreen.widget"
var body: some WidgetConfiguration { // var body: some WidgetConfiguration {
if #available(iOSApplicationExtension 16.0, *) { // if #available(iOSApplicationExtension 16.0, *) {
StaticConfiguration(kind: kind, provider: Provider()) { entry in // StaticConfiguration(kind: kind, provider: Provider()) { entry in
LockScreenWidgetView(entry: entry) // LockScreenWidgetView(entry: entry)
} // }
.configurationDisplayName("Storage") // .configurationDisplayName("Storage")
.description("Monitor your storage space") // .description("Monitor your storage space")
.supportedFamilies([ // .supportedFamilies([
.accessoryCircular, // .accessoryCircular,
]) // ])
} else { // } else {
StaticConfiguration(kind: kind, provider: Provider()) { entry in // StaticConfiguration(kind: kind, provider: Provider()) { entry in
LockScreenWidgetView(entry: entry) // LockScreenWidgetView(entry: entry)
} // }
.configurationDisplayName("") // .configurationDisplayName("")
.description("") // .description("")
.supportedFamilies([]) // .supportedFamilies([])
} // }
} // }
} //}
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