Commit abde2a8c authored by shenyong's avatar shenyong

引导页动画

parent 2cf5ae73
...@@ -6,19 +6,38 @@ ...@@ -6,19 +6,38 @@
// //
import UIKit import UIKit
import Lottie
class NewGuideOneCell: UICollectionViewCell { class NewGuideOneCell: UICollectionViewCell {
@IBOutlet weak var subtitle: UILabel! @IBOutlet weak var subtitle: UILabel!
@IBOutlet weak var htitle: UILabel! @IBOutlet weak var htitle: UILabel!
@IBOutlet weak var userL: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
setSubtitleAttr() setSubtitleAttr()
sethtitleAttr() sethtitleAttr()
addSubview(animationView)
animationView.snp.makeConstraints { make in
make.width.equalTo(375.RW())
make.height.equalTo(255.RW())
make.right.equalToSuperview()
make.top.equalTo(userL.snp.bottom).offset(35)
} }
animationView.play()
}
lazy var animationView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "animation_guide_0")
animationView.loopMode = .loop
return animationView
}()
func setSubtitleAttr(){ func setSubtitleAttr(){
// 创建富文本 // 创建富文本
let fullText = "Over 1000+ users worldwide" let fullText = "Over 1000+ users worldwide"
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="qJm-ym-n7r"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="qJm-ym-n7r">
<rect key="frame" x="37" y="312.66666666666669" width="159" height="45"/> <rect key="frame" x="37" y="284.66666666666669" width="159" height="45"/>
</imageView> </imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dp0-fO-xVX"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dp0-fO-xVX">
<rect key="frame" x="201" y="330.33333333333331" width="1" height="10"/> <rect key="frame" x="201" y="302.33333333333331" width="1" height="10"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="10" id="iOh-nB-kgO"/> <constraint firstAttribute="height" constant="10" id="iOh-nB-kgO"/>
...@@ -54,34 +54,34 @@ ...@@ -54,34 +54,34 @@
</constraints> </constraints>
</view> </view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="tPc-eM-ini"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="tPc-eM-ini">
<rect key="frame" x="207" y="312.66666666666669" width="159" height="45"/> <rect key="frame" x="207" y="284.66666666666669" width="159" height="45"/>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="50,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gkr-xl-yIC"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="50,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gkr-xl-yIC">
<rect key="frame" x="241" y="316.66666666666669" width="91" height="27"/> <rect key="frame" x="241" y="288.66666666666669" width="91" height="27"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" 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="Clean up photos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BBI-So-OYY"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clean up photos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BBI-So-OYY">
<rect key="frame" x="242.66666666666666" y="343.66666666666669" width="87.666666666666657" height="13.333333333333314"/> <rect key="frame" x="242.66666666666666" y="315.66666666666669" width="87.666666666666657" height="13.333333333333314"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" 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="1,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="btU-j2-5y8"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="btU-j2-5y8">
<rect key="frame" x="79.666666666666671" y="316.66666666666669" width="74.000000000000014" height="27"/> <rect key="frame" x="79.666666666666671" y="288.66666666666669" width="74.000000000000014" height="27"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="22"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" 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="User" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nyn-Jp-1go"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nyn-Jp-1go">
<rect key="frame" x="104" y="343.66666666666669" width="25.333333333333343" height="13.333333333333314"/> <rect key="frame" x="104" y="315.66666666666669" width="25.333333333333343" height="13.333333333333314"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/> <fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" 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="icon_guide_huadong" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-ck-CGz"> <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_huadong" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-ck-CGz">
<rect key="frame" x="28" y="392.66666666666669" width="375" height="214.00000000000006"/> <rect key="frame" x="28" y="364.66666666666669" width="375" height="214.00000000000006"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="214" id="OqW-5R-Kz3" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstAttribute="height" constant="214" id="OqW-5R-Kz3" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="375" id="WrQ-JG-AK0" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstAttribute="width" constant="375" id="WrQ-JG-AK0" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<constraint firstItem="Ofu-Vm-8RJ" firstAttribute="top" secondItem="Txd-ub-V2M" secondAttribute="bottom" constant="8" id="n7i-Ki-OaQ"/> <constraint firstItem="Ofu-Vm-8RJ" firstAttribute="top" secondItem="Txd-ub-V2M" secondAttribute="bottom" constant="8" id="n7i-Ki-OaQ"/>
<constraint firstItem="Txd-ub-V2M" firstAttribute="top" secondItem="EVM-dM-Bi7" secondAttribute="bottom" constant="60" id="pa0-0g-Sk0" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstItem="Txd-ub-V2M" firstAttribute="top" secondItem="EVM-dM-Bi7" secondAttribute="bottom" constant="60" id="pa0-0g-Sk0" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="btU-j2-5y8" firstAttribute="top" secondItem="qJm-ym-n7r" secondAttribute="top" constant="4" id="snF-F2-byq"/> <constraint firstItem="btU-j2-5y8" firstAttribute="top" secondItem="qJm-ym-n7r" secondAttribute="top" constant="4" id="snF-F2-byq"/>
<constraint firstItem="qJm-ym-n7r" firstAttribute="top" secondItem="Ofu-Vm-8RJ" secondAttribute="bottom" constant="88" id="uyA-mj-8K2" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstItem="qJm-ym-n7r" firstAttribute="top" secondItem="Ofu-Vm-8RJ" secondAttribute="bottom" constant="60" id="uyA-mj-8K2" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="Dp0-fO-xVX" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="vn8-co-5In"/> <constraint firstItem="Dp0-fO-xVX" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="vn8-co-5In"/>
<constraint firstItem="dtg-ck-CGz" firstAttribute="top" secondItem="qJm-ym-n7r" secondAttribute="bottom" constant="35" id="wzG-NF-EWD"/> <constraint firstItem="dtg-ck-CGz" firstAttribute="top" secondItem="qJm-ym-n7r" secondAttribute="bottom" constant="35" id="wzG-NF-EWD"/>
<constraint firstItem="Nyn-Jp-1go" firstAttribute="centerX" secondItem="btU-j2-5y8" secondAttribute="centerX" id="y6x-9h-nNx"/> <constraint firstItem="Nyn-Jp-1go" firstAttribute="centerX" secondItem="btU-j2-5y8" secondAttribute="centerX" id="y6x-9h-nNx"/>
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
<connections> <connections>
<outlet property="htitle" destination="Ofu-Vm-8RJ" id="YM4-rh-Ra7"/> <outlet property="htitle" destination="Ofu-Vm-8RJ" id="YM4-rh-Ra7"/>
<outlet property="subtitle" destination="Txd-ub-V2M" id="gKq-qF-heh"/> <outlet property="subtitle" destination="Txd-ub-V2M" id="gKq-qF-heh"/>
<outlet property="userL" destination="Nyn-Jp-1go" id="inq-W9-7hO"/>
</connections> </connections>
<point key="canvasLocation" x="385.49618320610688" y="259.50704225352115"/> <point key="canvasLocation" x="385.49618320610688" y="259.50704225352115"/>
</collectionViewCell> </collectionViewCell>
......
...@@ -6,12 +6,29 @@ ...@@ -6,12 +6,29 @@
// //
import UIKit import UIKit
import Lottie
class NewGuideThreeCell: UICollectionViewCell { class NewGuideThreeCell: UICollectionViewCell {
@IBOutlet weak var subT: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
// Initialization code addSubview(animationView)
animationView.snp.makeConstraints { make in
make.width.equalTo(280.RW())
make.height.equalTo(274.RW())
make.centerX.equalToSuperview().offset(-10)
make.top.equalTo(subT.snp.bottom).offset(57)
} }
animationView.play()
}
lazy var animationView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "animation_guide_2")
animationView.loopMode = .loop
return animationView
}()
} }
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="678"/> <rect key="frame" x="0.0" y="0.0" width="414" height="678"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_tongjitu" translatesAutoresizingMaskIntoConstraints="NO" id="vPU-c0-KKP"> <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_tongjitu" translatesAutoresizingMaskIntoConstraints="NO" id="vPU-c0-KKP">
<rect key="frame" x="85" y="316" width="244" height="239"/> <rect key="frame" x="85" y="316" width="244" height="239"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="239" id="4zt-cu-Hqj" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstAttribute="height" constant="239" id="4zt-cu-Hqj" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
<constraint firstItem="ZvL-Z4-1T4" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="47" id="zT2-fE-W1k"/> <constraint firstItem="ZvL-Z4-1T4" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="47" id="zT2-fE-W1k"/>
</constraints> </constraints>
<size key="customSize" width="414" height="678"/> <size key="customSize" width="414" height="678"/>
<connections>
<outlet property="subT" destination="HR3-Fr-izE" id="ztb-Xt-6Rt"/>
</connections>
<point key="canvasLocation" x="62.595419847328245" y="241.5492957746479"/> <point key="canvasLocation" x="62.595419847328245" y="241.5492957746479"/>
</collectionViewCell> </collectionViewCell>
</objects> </objects>
......
...@@ -13,6 +13,7 @@ class NewGuideTwoCell: UICollectionViewCell { ...@@ -13,6 +13,7 @@ class NewGuideTwoCell: UICollectionViewCell {
@IBOutlet weak var photoL: UILabel! @IBOutlet weak var photoL: UILabel!
var sizeL:UILabel! var sizeL:UILabel!
@IBOutlet weak var subL: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
contentView.addSubview(animationView) contentView.addSubview(animationView)
...@@ -39,9 +40,25 @@ class NewGuideTwoCell: UICollectionViewCell { ...@@ -39,9 +40,25 @@ class NewGuideTwoCell: UICollectionViewCell {
playAnimationWithDelay() playAnimationWithDelay()
addSubview(animationPhotoView)
animationPhotoView.snp.makeConstraints { make in
make.width.equalTo(357.RW())
make.height.equalTo(310.RW())
make.centerX.equalToSuperview()
make.top.equalTo(subL.snp.bottom).offset(0)
}
animationPhotoView.play()
} }
lazy var animationPhotoView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "animation_guide_1")
animationView.loopMode = .loop
return animationView
}()
lazy var animationView:LottieAnimationView = { lazy var animationView:LottieAnimationView = {
let animationView = LottieAnimationView(name: "onboardingStorageLight") let animationView = LottieAnimationView(name: "onboardingStorageLight")
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_icloud_start" translatesAutoresizingMaskIntoConstraints="NO" id="CQO-7f-Ijg"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_icloud_start" translatesAutoresizingMaskIntoConstraints="NO" id="CQO-7f-Ijg">
<rect key="frame" x="223.66666666666666" y="455.33333333333331" width="64.333333333333343" height="63.999999999999943"/> <rect key="frame" x="223.66666666666666" y="455.33333333333331" width="64.333333333333343" height="63.999999999999943"/>
</imageView> </imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_zhaopian" translatesAutoresizingMaskIntoConstraints="NO" id="hqC-23-RfL"> <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_zhaopian" translatesAutoresizingMaskIntoConstraints="NO" id="hqC-23-RfL">
<rect key="frame" x="24.666666666666657" y="110.33333333333331" width="357" height="365"/> <rect key="frame" x="24.666666666666657" y="110.33333333333331" width="357" height="365"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="365" id="7gF-YC-st8" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/> <constraint firstAttribute="height" constant="365" id="7gF-YC-st8" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
<size key="customSize" width="330" height="731"/> <size key="customSize" width="330" height="731"/>
<connections> <connections>
<outlet property="photoL" destination="FB0-xV-7Fl" id="9dX-pb-iYV"/> <outlet property="photoL" destination="FB0-xV-7Fl" id="9dX-pb-iYV"/>
<outlet property="subL" destination="zTf-gE-tij" id="ao7-5z-jU1"/>
</connections> </connections>
<point key="canvasLocation" x="358.77862595419845" y="269.36619718309862"/> <point key="canvasLocation" x="358.77862595419845" y="269.36619718309862"/>
</collectionViewCell> </collectionViewCell>
......
...@@ -9,7 +9,6 @@ import UIKit ...@@ -9,7 +9,6 @@ import UIKit
import SnapKit import SnapKit
import Lottie import Lottie
import StoreKit import StoreKit
import SwiftyGif
class HomePayView:UIView { class HomePayView:UIView {
...@@ -99,16 +98,16 @@ class HomePayView:UIView { ...@@ -99,16 +98,16 @@ class HomePayView:UIView {
}() }()
// lazy var animationView:LottieAnimationView = { lazy var animationView:LottieAnimationView = {
//
// let animationView = LottieAnimationView(name: "onboardingStorageLight") let animationView = LottieAnimationView(name: "iapAnimation")
// animationView.loopMode = .loop
// animationView.animationSpeed = -1.0 // animationView.animationSpeed = -1.0
// animationView.layer.cornerRadius = 8 // animationView.layer.cornerRadius = 8
// animationView.contentMode = .scaleAspectFill // animationView.contentMode = .scaleAspectFill
// animationView.clipsToBounds = true // animationView.clipsToBounds = true
// return animationView return animationView
// }() }()
var callBack:callBack<Any> = {text in} var callBack:callBack<Any> = {text in}
...@@ -220,15 +219,15 @@ class HomePayView:UIView { ...@@ -220,15 +219,15 @@ class HomePayView:UIView {
// //
// icloudLabel?.sizeToFit() // icloudLabel?.sizeToFit()
// //
// self.addSubview(animationView) self.addSubview(animationView)
//
// playAnimationWithDelay() playAnimationWithDelay()
// animationView.snp.makeConstraints { make in animationView.snp.makeConstraints { make in
// make.top.equalTo(icloudImage!.snp.bottom).offset(24) make.centerX.equalToSuperview()
// make.centerX.equalToSuperview() make.top.equalTo(titleLabel2!.snp.bottom).offset(40)
// make.width.equalTo(280) make.width.equalTo(285.RW())
// make.height.equalTo(12.RW()) make.height.equalTo(142.RW())
// } }
// //
// let analysis = UILabel() // let analysis = UILabel()
// analysis.text = "Analysis completed" // analysis.text = "Analysis completed"
...@@ -358,24 +357,24 @@ class HomePayView:UIView { ...@@ -358,24 +357,24 @@ class HomePayView:UIView {
// make.height.equalTo(142.RW()) // make.height.equalTo(142.RW())
// } // }
// } // }
let gifImageView = UIImageView() // let gifImageView = UIImageView()
gifImageView.contentMode = .scaleAspectFit // gifImageView.contentMode = .scaleAspectFit
addSubview(gifImageView) // addSubview(gifImageView)
gifImageView.snp.makeConstraints { make in // gifImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview() // make.centerX.equalToSuperview()
make.top.equalTo(titleLabel2!.snp.bottom).offset(40) // make.top.equalTo(titleLabel2!.snp.bottom).offset(40)
make.width.equalTo(285.RW()) // make.width.equalTo(285.RW())
make.height.equalTo(142.RW()) // make.height.equalTo(142.RW())
} // }
//
// 从 Bundle 加载 GIF 文件 // // 从 Bundle 加载 GIF 文件
guard let gifImage = try? UIImage(gifName: "iap.gif") else { // guard let gifImage = try? UIImage(gifName: "iap.gif") else {
print("Failed to load GIF") // print("Failed to load GIF")
return // return
} // }
//
gifImageView.setGifImage(gifImage, loopCount: -1) // gifImageView.setGifImage(gifImage, loopCount: -1)
gifImageView.startAnimatingGif() // gifImageView.startAnimatingGif()
// gifImageView.startAnimatingGif() // gifImageView.startAnimatingGif()
// // 设置 GIF 到 ImageView 并开始播放 // // 设置 GIF 到 ImageView 并开始播放
...@@ -387,8 +386,9 @@ class HomePayView:UIView { ...@@ -387,8 +386,9 @@ class HomePayView:UIView {
} }
// func playAnimationWithDelay() { func playAnimationWithDelay() {
// // 播放动画 // 播放动画
animationView.play()
// animationView.play(fromProgress: 0.4, toProgress: 1, loopMode: .playOnce) {[weak self] finished in // animationView.play(fromProgress: 0.4, toProgress: 1, loopMode: .playOnce) {[weak self] finished in
// if finished { // if finished {
// // 动画播放完成后,延迟 2 秒再重新播放 // // 动画播放完成后,延迟 2 秒再重新播放
...@@ -397,7 +397,7 @@ class HomePayView:UIView { ...@@ -397,7 +397,7 @@ class HomePayView:UIView {
// } // }
// } // }
// } // }
// } }
lazy var privavye_Label: UILabel = { lazy var privavye_Label: UILabel = {
let priva = UILabel() let priva = UILabel()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# Uncomment the next line to define a global platform for your project # Uncomment the next line to define a global platform for your project
platform :ios, '14.0' platform :ios, '14.0'
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' #source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
target 'PhoneManager' do target 'PhoneManager' do
...@@ -16,7 +16,6 @@ target 'PhoneManager' do ...@@ -16,7 +16,6 @@ target 'PhoneManager' do
pod 'OpenCV' pod 'OpenCV'
pod 'SVProgressHUD' pod 'SVProgressHUD'
pod 'Google-Mobile-Ads-SDK' pod 'Google-Mobile-Ads-SDK'
pod 'SwiftyGif'
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
......
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