Commit 1457487d authored by yqz's avatar yqz

优化

parent eb4c60de
......@@ -216,13 +216,18 @@ class ChargeInfoViewController:BaseViewController {
let chargeGuideFinished = UserDefaults.standard.object(forKey: "ChargeGuideFinished")
if chargeGuideFinished == nil {
let vc : ChargeGuideStartController = ChargeGuideStartController()
vc.modalPresentationStyle = .fullScreen
self.present(vc, animated: true)
vc.callback = {[weak self] text in
guard let self else {return}
let vc : ChargeGuideController = ChargeGuideController()
self.navigationController?.pushViewController(vc, animated: true)
}
let navigation = UINavigationController(rootViewController: vc)
navigation.modalPresentationStyle = .fullScreen
self.present(navigation, animated: true)
// let vc : ChargeGuideStartController = ChargeGuideStartController()
// vc.modalPresentationStyle = .fullScreen
// self.present(vc, animated: true)
// vc.callback = {[weak self] text in
// guard let self else {return}
// let vc : ChargeGuideController = ChargeGuideController()
// self.navigationController?.pushViewController(vc, animated: true)
// }
UserDefaults.standard.set("ChargeGuideFinished", forKey: "ChargeGuideFinished")
}else{
self.navigationController?.popViewController(animated: true)
......
......@@ -60,7 +60,6 @@ class ChargeViewController:BaseViewController {
// 跳转充电引导
@objc func guideClick(){
let vc : ChargeGuideStartController = ChargeGuideStartController()
let navigation = UINavigationController(rootViewController: vc)
navigation.modalPresentationStyle = .fullScreen
......
......@@ -41,6 +41,7 @@ class ChargeVideoPlayingView: UIView {
}
self.player = AVPlayer(url: url)
self.player?.volume = 0
self.player?.isMuted = true
self.playerLayer = AVPlayerLayer(player: self.player)
self.playerLayer?.frame = self.bounds
......
......@@ -43,6 +43,7 @@ class PreVideoController : BaseViewController {
DispatchQueue.main.async {
self.player = AVPlayer(url: avAsset.url)
self.player?.volume = 0
self.player?.isMuted = true
self.playerLayer = AVPlayerLayer(player: self.player)
self.playerLayer?.frame = CGRect(x: 0, y: self.titleView.height, width: self.view.width, height: self.view.height - self.titleView.height)
......
......@@ -60,7 +60,7 @@ extension GuideTipsType{
case .duplicates:
return "2 Duplicates"
case .similar:
return "2 Similar"
return ""
case .video:
return ""
case .photo:
......
......@@ -18,6 +18,7 @@ class TipsDuplicatesSimilarController: UIViewController {
@IBOutlet weak var mainTitle: UILabel!
@IBOutlet weak var subTitle: UILabel!
@IBOutlet weak var duplicate: UILabel!
@IBOutlet weak var bottomC: ScreenHeightRatioConstraint!
var type:GuideTipsType = .duplicates
......@@ -32,6 +33,7 @@ class TipsDuplicatesSimilarController: UIViewController {
mainTitle.text = type.title
subTitle.text = type.text
duplicate.isHidden = (type == .similar)
bottomC.constant = kSafeAreaInsets.bottom == 0 ? 30 : 0
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
......@@ -12,6 +12,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TipsDuplicatesSimilarController" customModule="PhoneManager" customModuleProvider="target">
<connections>
<outlet property="bottomC" destination="dX6-cv-Gto" id="3Ws-Iq-33S"/>
<outlet property="duplicate" destination="dRr-c6-YoB" id="dXr-aE-Wlc"/>
<outlet property="iconOne" destination="5sP-3G-R5V" id="ypq-LB-87o"/>
<outlet property="iconTwo" destination="LIQ-mA-CKi" id="Uzy-Sr-7tG"/>
<outlet property="lineText" destination="XMa-dY-JFG" id="WBd-Yf-wR9"/>
......@@ -27,38 +28,38 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<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="150" width="346" height="137.66666666666663"/>
<rect key="frame" x="41" y="212" width="346" height="137.66666666666663"/>
</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">
<rect key="frame" x="40" y="112" width="97" height="20"/>
<rect key="frame" x="40" y="174" width="97" height="20"/>
<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"/>
<nil key="highlightedColor"/>
</label>
<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="345.66666666666669" width="346" height="137"/>
<rect key="frame" x="41" y="407.66666666666669" width="346" height="137.00000000000006"/>
</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">
<rect key="frame" x="40" y="307.66666666666669" width="97" height="20"/>
<rect key="frame" x="40" y="369.66666666666669" width="97" height="20"/>
<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"/>
<nil key="highlightedColor"/>
</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">
<rect key="frame" x="151.66666666666666" y="509.66666666666674" width="124.99999999999997" height="30"/>
<rect key="frame" x="151.66666666666666" y="571.66666666666663" width="124.99999999999997" height="30"/>
<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"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OOD-68-wMD">
<rect key="frame" x="25" y="557.66666666666663" width="390" height="50.333333333333371"/>
<rect key="frame" x="25" y="619.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>
<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"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XPg-Ph-1k0">
<rect key="frame" x="15" y="870" width="410" height="46"/>
<rect key="frame" x="15" y="836" width="410" height="46"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="DDB-jE-Azu"/>
......
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