Commit 47c88f21 authored by shenyong's avatar shenyong

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

# Conflicts:
#	PhoneManager/Class/Page/Settings/ViewController/SettingViewController.swift
parents b53d6043 cb73e88f
......@@ -74,12 +74,13 @@ class ChargeInfoViewController:BaseViewController {
self.view.showBlur()
self.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
self.view.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
self.setAnimation()
alertView.dismiss(animated: true) {
self.view.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
self.setAnimation()
}
}
}
}
......
......@@ -45,6 +45,9 @@ class CompressingViewController: BaseViewController {
return view
}()
let alert = EmailContentDelAlert(state: .endCompress)
var alertShow : Bool = false
lazy var animationView : LottieAnimationView = {
let animationView = LottieAnimationView(name: "iOS压缩完成")
animationView.layer.cornerRadius = 12
......@@ -93,7 +96,20 @@ class CompressingViewController: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(red: 0.95, green: 0.96, blue: 0.99, alpha: 1)
self.titleView.isHidden = true
self.titleView.callBack = { text in
// 弹框
self.view.showBlur()
self.alert.endCompressCallback = { idx in
self.view.hideBlur()
self.navigationController?.popViewController(animated: true)
}
self.alert.callblock = {idx in
self.view.hideBlur()
}
self.alert.show()
self.alertShow = true
}
setUI()
......@@ -182,15 +198,26 @@ class CompressingViewController: BaseViewController {
/// - comVideoDataSource: 压缩后的视频链接数组
fileprivate func updateNextView(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]) {
DispatchQueue.main.async {
let vc = CompressCompletedViewController()
vc.currentMediaType = self.currentMediaType
vc.comDataSource = comDataSource
vc.comVideoDataSource = comVideoDataSource
vc.model = self.model
vc.completedSize = compressAllSize
self.navigationController?.pushViewController(vc, animated: true)
if self.alertShow {
self.view.hideBlur()
self.alert.dismiss(animated: true) {
self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
}
}else {
self.jumpNextPage(compressAllSize,comDataSource,comVideoDataSource)
}
}
}
func jumpNextPage(_ compressAllSize: Double,_ comDataSource : [Data],_ comVideoDataSource : [URL]){
let vc = CompressCompletedViewController()
vc.currentMediaType = self.currentMediaType
vc.comDataSource = comDataSource
vc.comVideoDataSource = comVideoDataSource
vc.model = self.model
vc.completedSize = compressAllSize
self.navigationController?.pushViewController(vc, animated: true)
}
// MARK: 设置UI
......
......@@ -20,23 +20,6 @@ class HomeInfoViewController:BaseViewController {
self?.seletedAllBtnClick()
}
return view
// let btn:UIButton = UIButton(type: .custom)//(frame: CGRect(x: 0, y: 0, width: 115, height: 32))
//
// btn.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
// btn.backgroundColor = UIColor.colorWithHex(hexStr: "#F2F6FC")
// btn.setImage(UIImage.init(named: "ic_check_similar"), for: .normal)
// btn.setTitle("Select All", for: .normal)
// btn.setImage(UIImage.init(named: "ic_close_similar"), for: .selected)
// btn.setTitle("Unselect all", for: .selected)
// btn.setTitleColor(UIColor.colorWithHex(hexStr: mColor), for: .normal)
// btn.setTitleColor(UIColor.colorWithHex(hexStr: black3Color), for: .selected)
// btn.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .bold)
//
// btn.layer.cornerRadius = btn.height / 2
// btn.layer.masksToBounds = true
// btn.changBtnWithStytl(btnStyle: .defalut, margin: 8)
//
// return btn
}()
lazy var tablewView:HomeInfoView = {
......@@ -418,7 +401,7 @@ class HomeInfoViewController:BaseViewController {
titleLabel.centerY = navCenterY
titleView.addSubview(titleLabel)
view.addSubview(tablewView)
view.addSubview(self.tablewView)
view.addSubview(self.defaultImageView)
self.defaultImageView.snp.makeConstraints { make in
make.width.height.equalTo(180)
......@@ -465,7 +448,7 @@ class HomeInfoViewController:BaseViewController {
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
self.tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
}
@objc func seletedAllBtnClick() {
......
......@@ -42,21 +42,21 @@ class HomeVideoDetailController :BaseViewController {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: safeHeight + 78)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
} else if self.selectedModel.count == 1{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Video", for: .normal)
UIView.animate(withDuration: 0.1) {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: 0)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78)
}else{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Videos", for: .normal)
UIView.animate(withDuration: 0.1) {
// 更新约束
self.deleteViewBottomConstraint?.update(offset: 0)
}
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
}
if self.selectedModel.count > 0 {
......@@ -183,6 +183,7 @@ class HomeVideoDetailController :BaseViewController {
make.top.centerX.width.equalToSuperview()
make.height.equalTo(statusBarHeight + 44)
})
self.videoDetailNavView?.selectAllCallBack = {[weak self] choose in
guard let self else {return}
......@@ -251,6 +252,11 @@ class HomeVideoDetailController :BaseViewController {
make.top.equalTo(self.defaultImageView.snp.bottom).offset(-30)
make.centerX.equalToSuperview()
}
collectionView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(marginLR)
make.top.equalTo(self.videoDetailNavView!.snp.bottom)
make.bottom.equalToSuperview()
}
setDefaultPage()
}
......@@ -311,11 +317,11 @@ class HomeVideoDetailController :BaseViewController {
self.videoDetailNavView?.startSelectButton.isHidden = array.count > 0 || self.resourceData.count <= 0
// 改变collection的位置
if array.count > 0 {
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
}else{
self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
}
// if array.count > 0 {
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height - 78 - safeHeight)
// }else{
// self.collectionView.frame = CGRect(x: marginLR, y: self.videoDetailNavView!.height, width: self.view.width - 2 * marginLR, height: self.view.height - self.videoDetailNavView!.height)
// }
}
}
......
......@@ -40,7 +40,6 @@ class PhotoRemoveViewController: BaseViewController {
let formatter = DateFormatter()
lazy var navView : PhotoVideoDetailNavView = {
let view = PhotoVideoDetailNavView()
return view
......@@ -60,14 +59,17 @@ class PhotoRemoveViewController: BaseViewController {
// 创建两个按钮
private lazy var trashButton = {
let button = UIButton(frame: CGRect(x: self.view.centerX - 22 - 47, y: self.view.centerY + 509 * RScreenH() / 2 - 47 / 2, width: 47, height: 47))
let height:CGFloat = self.mediaType == .video ? 0 : 47/2.0
let button = UIButton(frame: CGRect(x: self.view.centerX - 22 - 47, y: self.view.centerY + 509 * RScreenH() / 2 - height , width: 47, height: 47))
button.setImage(UIImage(named: "Group_1171275243"), for: .normal)
button.setImage(UIImage(named: "Group_1171275242"), for: .selected)
button.addTarget(self, action: #selector(trashButtonAction), for: .touchUpInside)
return button
}()
private lazy var keepListButton = {
let button = UIButton(frame: CGRect(x: self.view.centerX + 22, y: self.view.centerY + 509 * RScreenH() / 2 - 47 / 2, width: 47, height: 47))
let height:CGFloat = self.mediaType == .video ? 0 : 47/2.0
let button = UIButton(frame: CGRect(x: self.view.centerX + 22, y: self.view.centerY + 509 * RScreenH() / 2 - height, width: 47, height: 47))
button.setImage(UIImage(named: "Group_1171275102 3"), for: .normal)
button.setImage(UIImage(named: "Group_1171275102 2"), for: .selected)
button.addTarget(self, action: #selector(keepListButtonAction), for: .touchUpInside)
......@@ -190,6 +192,7 @@ class PhotoRemoveViewController: BaseViewController {
guard let self else {return}
DispatchQueue.main.async {
self.showCurrentPageUIWhenTashDataChanged()
self.navigationController?.popViewController(animated: true)
}
}
......
......@@ -89,7 +89,7 @@ class HomeInfoView :UIView {
self.ids = ids
self.titleText = titleText
self.type = type
super.init(frame: frame)
for array in ids ?? [] {
var smodels:[ImageSeletedCollectionItem] = []
......@@ -111,13 +111,12 @@ class HomeInfoView :UIView {
models.append(smodel)
}
super.init(frame: frame)
self.ids = sortData(source: ids ?? [], type: .latest)
setupUI()
self.headerView.sortViewSubmitCallBack = {[weak self]filterModel in
self.headerView.sortViewSubmitCallBack = {[weak self] filterModel in
PhotoManager.shared.reloadTrashAndKeep()
guard let self else {return}
var dataS : [[AssetModel]] = []
......
......@@ -214,12 +214,14 @@ extension TrashSubView {
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
}
}
}else{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
}
}
......@@ -227,6 +229,7 @@ extension TrashSubView {
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: self.type,data: tempArray) {
self.clearTashDataCallBack()
self.showDeleteSuccess(array: tempArray)
self.updateFreeTimes()
}
}
......@@ -237,6 +240,22 @@ extension TrashSubView {
}
}
// 删除成功页面
func showDeleteSuccess(array:[AssetModel]){
var tempSize = 0.0
for item in array {
tempSize = tempSize + item.assetSize
}
DispatchQueue.main.async {
let vc = DelSuccessViewController()
vc.delType = array.count > 1 ? "photos" : "photo"
vc.fileSzie = Int64(tempSize)
vc.fileCount = array.count
vc.modalPresentationStyle = .fullScreen
self.responderViewController()?.present(vc, animated: true)
}
}
@objc func tapHandle(){
self.presentTashDetailViewClickCallBack()
}
......@@ -253,6 +272,7 @@ extension TrashSubView {
self.updateFreeTimes()
}
self.clearTashDataCallBack()
self.showDeleteSuccess(array: data)
}
}
}
......
......@@ -109,7 +109,7 @@ class PMShowImgCell: UICollectionViewCell {
make.left.right.bottom.top.equalToSuperview()
}
selectBtn.snp.makeConstraints { make in
make.right.equalToSuperview()
make.right.equalToSuperview().inset(25)
make.width.height.equalTo(iconWH)
make.bottom.equalToSuperview().offset(-10)
}
......
......@@ -51,7 +51,7 @@ class PMShowVideoCell: UICollectionViewCell {
super.init(frame: frame)
self.contentView.addSubview(self.selectBtn)
selectBtn.snp.makeConstraints { make in
make.right.equalToSuperview()
make.right.equalToSuperview().inset(25)
make.width.height.equalTo(iconWH)
make.bottom.equalToSuperview().offset(-10)
}
......
......@@ -323,7 +323,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
PMEmailManager.shareManager.signOut {[weak self] success in
if success {
EmailFilterManager.share.signOut()
self?.tableView.reloadData()
self?.tableView.reloadRows(at: [IndexPath(row: 0, section:1)], with: .none)
}
}
}
......
......@@ -297,12 +297,14 @@ extension TrashViewController:UIScrollViewDelegate{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
}else{
let tempArray = Array(data.prefix(deleteCount))
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
......@@ -311,6 +313,7 @@ extension TrashViewController:UIScrollViewDelegate{
TrashDataManager.clearTrashData(mediaType: info.0,data: tempArray) {
self.updateFreeTimes()
info.1.dataSource.removeAll(where: {tempArray.map({$0.localIdentifier}).contains($0.localIdentifier)})
self.showDeleteSuccess(array: tempArray)
}
}
}
......@@ -340,6 +343,22 @@ extension TrashViewController:UIScrollViewDelegate{
}
}
func showDeleteSuccess(array:[AssetModel]){
var tempSize = 0.0
for item in array {
tempSize = tempSize + item.assetSize
}
DispatchQueue.main.async {
let vc = DelSuccessViewController()
vc.delType = array.count > 1 ? "photos" : "photo"
vc.fileSzie = Int64(tempSize)
vc.fileCount = array.count
vc.modalPresentationStyle = .fullScreen
self.present(vc, animated: true)
}
}
func delMethod(needUpdateFreeTimes:Bool){
let info = self.getTypeByCurrentPage(pageIndex: currentPage)
let data = TrashDataManager.getCurrentMediaTypeTrashData(mediaType: info.0)
......@@ -349,6 +368,7 @@ extension TrashViewController:UIScrollViewDelegate{
self.updateFreeTimes()
}
info.1.dataSource.removeAll()
self.showDeleteSuccess(array: data)
}
}
}
......
......@@ -16,6 +16,11 @@ class PMWidgetGuideStartController: UIViewController {
self.navigationController?.isNavigationBarHidden = true
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.isNavigationBarHidden = true
}
@IBAction func StartNextAction(_ sender: Any) {
callblock()
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -19,7 +19,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jx3-dI-rXt">
<rect key="frame" x="352" y="69" width="26" height="53"/>
<rect key="frame" x="352" y="128" width="26" height="46"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="7rF-O5-V6f"/>
</constraints>
<inset key="contentEdgeInsets" minX="10" minY="10" maxX="0.0" maxY="10"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="ic_widget_XXXXXXx"/>
......@@ -28,7 +31,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add widgets to the home screen and the lock screen" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kbM-qf-WH2">
<rect key="frame" x="36" y="142" width="321" height="43"/>
<rect key="frame" x="36" y="194" width="321" height="43"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="43" id="cTr-dF-GVf"/>
</constraints>
......@@ -37,7 +40,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jAN-Lj-ySf">
<rect key="frame" x="23" y="205" width="347" height="43"/>
<rect key="frame" x="23" y="257" width="347" height="43"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="43" id="gWB-Me-UTE"/>
</constraints>
......@@ -47,13 +50,13 @@
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_widget_guideus" translatesAutoresizingMaskIntoConstraints="NO" id="Gk6-53-p7B">
<rect key="frame" x="34" y="268" width="325" height="442"/>
<rect key="frame" x="65.666666666666657" y="320" width="261.66666666666674" height="356"/>
<constraints>
<constraint firstAttribute="width" secondItem="Gk6-53-p7B" secondAttribute="height" multiplier="25:34" id="JRq-xy-nP7"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FzB-PE-uL0">
<rect key="frame" x="16" y="740" width="361" height="58"/>
<rect key="frame" x="16" y="706" width="361" height="58"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="58" id="H0t-sX-uiu"/>
......@@ -78,7 +81,7 @@
<constraint firstItem="Gk6-53-p7B" firstAttribute="top" secondItem="jAN-Lj-ySf" secondAttribute="bottom" constant="20" id="5K8-RY-RRE"/>
<constraint firstItem="jAN-Lj-ySf" firstAttribute="top" secondItem="kbM-qf-WH2" secondAttribute="bottom" constant="20" id="5cu-aJ-ud2"/>
<constraint firstAttribute="trailing" secondItem="jAN-Lj-ySf" secondAttribute="trailing" constant="23" id="9jt-yG-2C3"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="top" secondItem="Gk6-53-p7B" secondAttribute="bottom" constant="30" id="Ibh-ZB-Pcv"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Gk6-53-p7B" secondAttribute="bottom" constant="30" id="Ibh-ZB-Pcv"/>
<constraint firstItem="kbM-qf-WH2" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="36" id="Ie5-Fi-9zn"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="FzB-PE-uL0" secondAttribute="trailing" constant="16" id="O1A-bz-tvz"/>
<constraint firstItem="FzB-PE-uL0" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="Vpm-N7-5Mh"/>
......
......@@ -15,9 +15,14 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
case list
case emailSignOut
case emailApply
case endCompress
}
var callblock:((Int)->Void) = { idx in}
var endCompressCallback:((Int)->Void) = {idx in}
var state:EmailStateAlert = .group
@IBOutlet weak var EmailContentMessage: UILabel!
......@@ -52,7 +57,14 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
EmailContentAction1.setTitle("Yes", for: .normal)
EmailContentAction2.setTitle("Cancel", for: .normal)
break
case .endCompress:
EmailContentMessage.text = "Would you like to stop compressing?"
EmailContentAction1.setTitle("Keep Compressing", for: .normal)
EmailContentAction2.setTitle("Stop Compressing", for: .normal)
tipsLabel.text = "If you stop now you won't get the results"
break
}
}
func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
......@@ -76,7 +88,9 @@ class EmailContentDelAlert: UIViewController, UIViewControllerTransitioningDeleg
@IBAction func delMails(_ sender: Any) {
callblock(2)
self.dismiss(animated: true)
self.dismiss(animated: true) {
self.endCompressCallback(2)
}
}
init(state:EmailStateAlert) {
......
......@@ -14,6 +14,8 @@ class EmailLoginController: BaseViewController {
case set
}
var callblock:(()->Void)?
var state:fromState = .home
override func viewDidLoad() {
......@@ -57,6 +59,9 @@ class EmailLoginController: BaseViewController {
self.navigationController?.setViewControllers(navigation ?? [], animated: true)
}
}else{
if self.callblock != nil {
self.callblock!()
}
self.navigationController?.popViewController(animated: true)
}
}
......
......@@ -113,27 +113,7 @@ extension EmailCleanListView : UITableViewDataSource,UITableViewDelegate {
if IAPManager.share.isSubscribed == false {
// 弹出内购页面
HomePayViewController.show {
// 再次判断下
if IAPManager.share.isSubscribed == false {
// 弹出提示框
let alertView = AdvTipSelectView()
alertView.selectType = .selectTypeSetAnimation
alertView.getOtherInfoByType()
self.showBlur()
self.responderViewController()?.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
self.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
callblock()
}
}
}
}else{
callblock()
}
callblock()
}
}else {
callblock()
......
......@@ -162,22 +162,7 @@ extension EmailContentView :UITableViewDelegate,UITableViewDataSource{
if IAPManager.share.isSubscribed == false {
// 弹出内购页面
HomePayViewController.show {
// 弹出提示框
let alertView = AdvTipSelectView()
alertView.selectType = .selectTypeSetAnimation
alertView.getOtherInfoByType()
self.showBlur()
self.responderViewController()?.present(alertView, animated: true)
alertView.selectClickCallback = {isSure in
alertView.dismiss(animated: true)
self.hideBlur()
if isSure {
self.popAdverTisement()
AdvManager.shared.finisedCallBack = {
callblock()
}
}
}
callblock()
}
}else {
callblock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment