Commit 76a77d75 authored by yqz's avatar yqz

隐私空间删除弹窗

parent 421ffc3c
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -218,12 +218,21 @@ class PMShowImgVideoController: BaseViewController { ...@@ -218,12 +218,21 @@ class PMShowImgVideoController: BaseViewController {
} }
} }
// 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 let alert = PMSecretHintsAlert()
if selectidx == 1 { self.view.showBlur()
alert.show { idx in
if idx == 1 {
DelCallBlock() DelCallBlock()
} }
self.view.hideBlur()
alert.dismiss(animated: true) alert.dismiss(animated: true)
}) }
// PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
// if selectidx == 1 {
// DelCallBlock()
// }
// alert.dismiss(animated: true)
// })
// }else{ // }else{
// DelCallBlock() // DelCallBlock()
// } // }
......
...@@ -126,12 +126,22 @@ class SecretViewController: BaseViewController { ...@@ -126,12 +126,22 @@ class SecretViewController: BaseViewController {
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
if selectidx == 1 { let alert = PMSecretHintsAlert()
self.view.showBlur()
alert.show { idx in
if idx == 1 {
DelCallBlock() DelCallBlock()
} }
self.view.hideBlur()
alert.dismiss(animated: true) alert.dismiss(animated: true)
}) }
// PMAlert(messsage:"These photos or videos will be deleted from your private space" , action: ["Cancel","Delete"] , complate: { alert, selectidx in
// if selectidx == 1 {
// DelCallBlock()
// }
// alert.dismiss(animated: true)
// })
// }else{ // }else{
// DelCallBlock() // DelCallBlock()
// } // }
......
//
// PMSecretHintsAlert.swift
// PhoneManager
//
// Created by edy on 2025/5/23.
//
import UIKit
class PMSecretHintsAlert: UIViewController {
var callblock:((Int)->Void) = { idx in}
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func deleteActions(_ sender: Any) {
callblock(1)
}
@IBAction func cancelActions(_ sender: Any) {
callblock(0)
}
func show(_ complate:@escaping((Int)->Void)) -> Void {
self.callblock = complate
self.modalPresentationStyle = .overFullScreen
UIViewController.topMostViewController()?.present(self, animated: true)
}
}
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PMSecretHintsAlert" customModule="PhoneManager" customModuleProvider="target">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4PM-DR-RyH">
<rect key="frame" x="16" y="282.66666666666669" width="361" height="287.00000000000006"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="32" translatesAutoresizingMaskIntoConstraints="NO" id="4op-wJ-tFy">
<rect key="frame" x="32" y="16" width="297" height="261"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pm-screct-remove-hint" translatesAutoresizingMaskIntoConstraints="NO" id="IGo-Uk-Mne">
<rect key="frame" x="115.33333333333334" y="0.0" width="66.333333333333343" height="66"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="These photos will be deleted from your secret space." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fXm-CK-d9V">
<rect key="frame" x="4.6666666666666572" y="98" width="288" height="43"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
<color key="textColor" red="0.066666666666666666" green="0.066666666666666666" blue="0.066666666666666666" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="GmY-zo-ECX">
<rect key="frame" x="20" y="173" width="257" height="88"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PwB-Ca-yNf">
<rect key="frame" x="0.0" y="0.0" width="257" height="44"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="2EK-2Y-DHI"/>
<constraint firstAttribute="width" constant="257" id="ivh-EF-yw9"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Delete"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="Radius">
<real key="value" value="22"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="deleteActions:" destination="-1" eventType="touchUpInside" id="qkJ-8N-7aC"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UlC-p0-NYR">
<rect key="frame" x="0.0" y="43.999999999999943" width="257" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="Kli-Cu-oKo"/>
<constraint firstAttribute="width" constant="257" id="cTL-mF-DTM"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Cancel">
<color key="titleColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections>
<action selector="cancelActions:" destination="-1" eventType="touchUpInside" id="OK6-9W-DvT"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="4op-wJ-tFy" firstAttribute="centerX" secondItem="4PM-DR-RyH" secondAttribute="centerX" id="JR1-hs-CEX"/>
<constraint firstItem="4op-wJ-tFy" firstAttribute="top" secondItem="4PM-DR-RyH" secondAttribute="top" constant="16" id="O4a-Ns-oDB"/>
<constraint firstAttribute="trailing" secondItem="4op-wJ-tFy" secondAttribute="trailing" constant="32" id="S3R-nV-Ia9"/>
<constraint firstItem="4op-wJ-tFy" firstAttribute="leading" secondItem="4PM-DR-RyH" secondAttribute="leading" constant="32" id="c8P-8c-YQA"/>
<constraint firstAttribute="bottom" secondItem="4op-wJ-tFy" secondAttribute="bottom" constant="10" id="v99-F8-sb8"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="Radius">
<real key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4PM-DR-RyH" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="4A7-HI-0xS"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="4PM-DR-RyH" secondAttribute="trailing" constant="16" id="Tuu-pd-edo"/>
<constraint firstItem="4PM-DR-RyH" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="xZz-3h-JAB"/>
</constraints>
<point key="canvasLocation" x="77" y="-12"/>
</view>
</objects>
<resources>
<image name="pm-screct-remove-hint" width="66.333335876464844" height="66"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
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