Commit f5281983 authored by shenyong's avatar shenyong

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

parents 172df967 63d1c583
...@@ -340,8 +340,6 @@ ...@@ -340,8 +340,6 @@
049F146E2DDB1F64007B5A9B /* LockSreen */, 049F146E2DDB1F64007B5A9B /* LockSreen */,
); );
name = LockSreenExtension; name = LockSreenExtension;
packageProductDependencies = (
);
productName = LockSreenExtension; productName = LockSreenExtension;
productReference = 049F146B2DDB1F64007B5A9B /* LockSreenExtension.appex */; productReference = 049F146B2DDB1F64007B5A9B /* LockSreenExtension.appex */;
productType = "com.apple.product-type.app-extension"; productType = "com.apple.product-type.app-extension";
...@@ -510,10 +508,14 @@ ...@@ -510,10 +508,14 @@
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources-${CONFIGURATION}-input-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = (
);
name = "[CP] Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources-${CONFIGURATION}-output-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-resources.sh\"\n";
...@@ -527,10 +529,14 @@ ...@@ -527,10 +529,14 @@
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks-${CONFIGURATION}-input-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = (
);
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks-${CONFIGURATION}-output-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PhoneManager/Pods-PhoneManager-frameworks.sh\"\n";
......
...@@ -216,13 +216,18 @@ class ChargeInfoViewController:BaseViewController { ...@@ -216,13 +216,18 @@ class ChargeInfoViewController:BaseViewController {
let chargeGuideFinished = UserDefaults.standard.object(forKey: "ChargeGuideFinished") let chargeGuideFinished = UserDefaults.standard.object(forKey: "ChargeGuideFinished")
if chargeGuideFinished == nil { if chargeGuideFinished == nil {
let vc : ChargeGuideStartController = ChargeGuideStartController() let vc : ChargeGuideStartController = ChargeGuideStartController()
vc.modalPresentationStyle = .fullScreen let navigation = UINavigationController(rootViewController: vc)
self.present(vc, animated: true) navigation.modalPresentationStyle = .fullScreen
vc.callback = {[weak self] text in self.present(navigation, animated: true)
guard let self else {return} // let vc : ChargeGuideStartController = ChargeGuideStartController()
let vc : ChargeGuideController = ChargeGuideController() // vc.modalPresentationStyle = .fullScreen
self.navigationController?.pushViewController(vc, animated: true) // 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") UserDefaults.standard.set("ChargeGuideFinished", forKey: "ChargeGuideFinished")
}else{ }else{
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
......
...@@ -60,7 +60,6 @@ class ChargeViewController:BaseViewController { ...@@ -60,7 +60,6 @@ class ChargeViewController:BaseViewController {
// 跳转充电引导 // 跳转充电引导
@objc func guideClick(){ @objc func guideClick(){
let vc : ChargeGuideStartController = ChargeGuideStartController() let vc : ChargeGuideStartController = ChargeGuideStartController()
let navigation = UINavigationController(rootViewController: vc) let navigation = UINavigationController(rootViewController: vc)
navigation.modalPresentationStyle = .fullScreen navigation.modalPresentationStyle = .fullScreen
......
...@@ -41,6 +41,7 @@ class ChargeVideoPlayingView: UIView { ...@@ -41,6 +41,7 @@ class ChargeVideoPlayingView: UIView {
} }
self.player = AVPlayer(url: url) self.player = AVPlayer(url: url)
self.player?.volume = 0
self.player?.isMuted = true self.player?.isMuted = true
self.playerLayer = AVPlayerLayer(player: self.player) self.playerLayer = AVPlayerLayer(player: self.player)
self.playerLayer?.frame = self.bounds self.playerLayer?.frame = self.bounds
......
...@@ -21,7 +21,7 @@ class CompressController : BaseViewController { ...@@ -21,7 +21,7 @@ class CompressController : BaseViewController {
private var compressNav:CompressNavView? private var compressNav:CompressNavView?
// 排序 // 排序
var currentSort : ResouceSortType = .largest var currentSort : ResouceSortType = .latest
// 资源类型 - 相册或者视频 // 资源类型 - 相册或者视频
var currentResourceType : CompressType = .compressPhoto var currentResourceType : CompressType = .compressPhoto
......
...@@ -43,6 +43,7 @@ class PreVideoController : BaseViewController { ...@@ -43,6 +43,7 @@ class PreVideoController : BaseViewController {
DispatchQueue.main.async { DispatchQueue.main.async {
self.player = AVPlayer(url: avAsset.url) self.player = AVPlayer(url: avAsset.url)
self.player?.volume = 0
self.player?.isMuted = true self.player?.isMuted = true
self.playerLayer = AVPlayerLayer(player: self.player) 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) self.playerLayer?.frame = CGRect(x: 0, y: self.titleView.height, width: self.view.width, height: self.view.height - self.titleView.height)
......
...@@ -45,7 +45,8 @@ class CompressCustomHeaderView: UICollectionReusableView{ ...@@ -45,7 +45,8 @@ class CompressCustomHeaderView: UICollectionReusableView{
button.layer.cornerRadius = 14 button.layer.cornerRadius = 14
button.clipsToBounds = true button.clipsToBounds = true
button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000) button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold) button.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0)
button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal) button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal)
button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside) button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside)
button.isHidden = false button.isHidden = false
......
...@@ -78,7 +78,7 @@ class ContactAllView : UIView { ...@@ -78,7 +78,7 @@ class ContactAllView : UIView {
self.addSubview(self.subTitleLabel) self.addSubview(self.subTitleLabel)
self.addSubview(self.tableView) self.addSubview(self.tableView)
self.addSubview(self.deleteButton) self.addSubview(self.deleteButton)
self.backgroundColor = .clear
self.titleLabel.snp.makeConstraints { make in self.titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(15 * RScreenW()) make.left.equalToSuperview().offset(15 * RScreenW())
make.top.equalToSuperview().offset(14 * RScreenH()) make.top.equalToSuperview().offset(14 * RScreenH())
......
...@@ -17,8 +17,8 @@ class DeleteButtonView : UIView { ...@@ -17,8 +17,8 @@ class DeleteButtonView : UIView {
view.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 1) view.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
view.setTitleColor(.white, for: .normal) view.setTitleColor(.white, for: .normal)
view.clipsToBounds = true view.clipsToBounds = true
view.layer.cornerRadius = 23 view.layer.cornerRadius = 12
view.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .bold) view.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold)
view.setTitle("See Merge Preview", for: .normal) view.setTitle("See Merge Preview", for: .normal)
view.setImage(UIImage(named: "ic_hebing"), for: .normal) view.setImage(UIImage(named: "ic_hebing"), for: .normal)
...@@ -38,13 +38,13 @@ class DeleteButtonView : UIView { ...@@ -38,13 +38,13 @@ class DeleteButtonView : UIView {
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
self.backgroundColor = .white self.backgroundColor = .clear
self.addSubview(self.deleteButton) self.addSubview(self.deleteButton)
self.deleteButton.snp.makeConstraints { make in self.deleteButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(15) make.left.equalToSuperview().offset(55)
make.right.equalToSuperview().offset(-15) make.right.equalToSuperview().offset(-55)
make.height.equalTo(46) make.height.equalTo(45)
make.top.equalToSuperview().offset(16) make.top.equalToSuperview().offset(16)
} }
} }
......
...@@ -29,8 +29,12 @@ class VideoViewController: UIViewController { ...@@ -29,8 +29,12 @@ class VideoViewController: UIViewController {
// 1. 创建播放器 // 1. 创建播放器
if let url = self.url { if let url = self.url {
self.player = AVPlayer(url: url) self.player = AVPlayer(url: url)
self.player?.automaticallyWaitsToMinimizeStalling = false
self.player?.volume = 0
self.player?.isMuted = true self.player?.isMuted = true
// 2. 配置播放器控制器 // 2. 配置播放器控制器
self.playerViewController.videoGravity = .resizeAspect
self.playerViewController.player = self.player self.playerViewController.player = self.player
self.playerViewController.delegate = self self.playerViewController.delegate = self
self.playerViewController.showsPlaybackControls = true self.playerViewController.showsPlaybackControls = true
......
...@@ -37,7 +37,7 @@ class HomePhotosDetailViewController : BaseViewController { ...@@ -37,7 +37,7 @@ class HomePhotosDetailViewController : BaseViewController {
var resourceData : [AssetModel] = [] var resourceData : [AssetModel] = []
// 排序 // 排序
var currentSort : ResouceSortType = .largest var currentSort : ResouceSortType = .latest
// 当前页面选中的 // 当前页面选中的
var selectedModel : [AssetModel] = [] { var selectedModel : [AssetModel] = [] {
...@@ -169,11 +169,11 @@ class HomePhotosDetailViewController : BaseViewController { ...@@ -169,11 +169,11 @@ class HomePhotosDetailViewController : BaseViewController {
} }
self.videoDetailNavView?.startSelectCallBack = {[weak self] choose in self.videoDetailNavView?.startSelectCallBack = {[weak self] choose in
guard let self else {return} guard let self else {return}
if !choose { // if !choose {
self.selectedModel.removeAll()
}
DispatchQueue.main.async {
// }
DispatchQueue.main.async {
self.selectedModel.removeAll()
UIView.transition(with: self.collectionView, duration: 0.3, options: .transitionCrossDissolve, animations: { UIView.transition(with: self.collectionView, duration: 0.3, options: .transitionCrossDissolve, animations: {
self.collectionView.reloadData() self.collectionView.reloadData()
}, completion: nil) }, completion: nil)
......
...@@ -30,7 +30,7 @@ class HomeVideoDetailController :BaseViewController { ...@@ -30,7 +30,7 @@ class HomeVideoDetailController :BaseViewController {
var resourceData : [AssetModel] = [] var resourceData : [AssetModel] = []
// 排序 // 排序
var currentSort : ResouceSortType = .largest var currentSort : ResouceSortType = .latest
// 当前页面选中的 // 当前页面选中的
var selectedModel : [AssetModel] = [] { var selectedModel : [AssetModel] = [] {
...@@ -209,11 +209,11 @@ class HomeVideoDetailController :BaseViewController { ...@@ -209,11 +209,11 @@ class HomeVideoDetailController :BaseViewController {
self.videoDetailNavView?.startSelectCallBack = {[weak self] choose in self.videoDetailNavView?.startSelectCallBack = {[weak self] choose in
guard let self else {return} guard let self else {return}
if !choose { // if !choose {
self.selectedModel.removeAll()
}
DispatchQueue.main.async {
// }
DispatchQueue.main.async {
self.selectedModel.removeAll()
UIView.transition(with: self.collectionView, duration: 0.3, options: .transitionCrossDissolve, animations: { UIView.transition(with: self.collectionView, duration: 0.3, options: .transitionCrossDissolve, animations: {
self.collectionView.reloadData() self.collectionView.reloadData()
}, completion: nil) }, completion: nil)
......
...@@ -396,6 +396,8 @@ class PhotoRemoveViewController: BaseViewController { ...@@ -396,6 +396,8 @@ class PhotoRemoveViewController: BaseViewController {
self.view.addSubview(photoView) self.view.addSubview(photoView)
photoView.frame = CGRectMake(0, 0, self.view.width - 30, 509 * RScreenH()) photoView.frame = CGRectMake(0, 0, self.view.width - 30, 509 * RScreenH())
photoView.center = self.view.center photoView.center = self.view.center
photoView.innerVideoController?.player?.isMuted = true
photoView.innerVideoController?.player?.volume = 0
photoViews.append(photoView) photoViews.append(photoView)
} }
...@@ -531,8 +533,6 @@ class PhotoRemoveViewController: BaseViewController { ...@@ -531,8 +533,6 @@ class PhotoRemoveViewController: BaseViewController {
} }
} }
// MARK: - 视图更新逻辑 // MARK: - 视图更新逻辑
private func updateViewContents() { private func updateViewContents() {
for (index, view) in photoViews.enumerated() { for (index, view) in photoViews.enumerated() {
...@@ -621,6 +621,7 @@ class PhotoRemoveViewController: BaseViewController { ...@@ -621,6 +621,7 @@ class PhotoRemoveViewController: BaseViewController {
newView.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(handlePan))) newView.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(handlePan)))
newView.alpha = 0 newView.alpha = 0
view.addSubview(newView) view.addSubview(newView)
photoViews.append(newView) photoViews.append(newView)
// 更新索引并加载新内容 // 更新索引并加载新内容
......
...@@ -545,11 +545,12 @@ class HomeInfoTitleView:UIView { ...@@ -545,11 +545,12 @@ class HomeInfoTitleView:UIView {
lazy var filterButton : UIButton = { lazy var filterButton : UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "Frame 1"), for: .normal) button.setImage(UIImage(named: "Frame 1"), for: .normal)
button.setTitle("largest", for: .normal) button.setTitle("latest", for: .normal)
button.layer.cornerRadius = 14 button.layer.cornerRadius = 14
button.clipsToBounds = true button.clipsToBounds = true
button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000) button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold) button.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0)
button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal) button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal)
button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside) button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside)
button.isHidden = true button.isHidden = true
......
...@@ -26,11 +26,12 @@ class HomePhotosDetailCustomHeaderView : UICollectionReusableView { ...@@ -26,11 +26,12 @@ class HomePhotosDetailCustomHeaderView : UICollectionReusableView {
lazy var filterButton : UIButton = { lazy var filterButton : UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "Frame 1"), for: .normal) button.setImage(UIImage(named: "Frame 1"), for: .normal)
button.setTitle("largest", for: .normal) button.setTitle("latest", for: .normal)
button.layer.cornerRadius = 14 button.layer.cornerRadius = 14
button.clipsToBounds = true button.clipsToBounds = true
button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000) button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold) button.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0)
button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal) button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal)
button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside) button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside)
button.isHidden = false button.isHidden = false
......
...@@ -56,7 +56,7 @@ class HomeTabbarView:UIView { ...@@ -56,7 +56,7 @@ class HomeTabbarView:UIView {
btn.width = cW btn.width = cW
btn.tag = 10 + index btn.tag = 10 + index
btn.height = cH btn.height = cH
btn.y = 0//safeHeight == 0 ? 6 : 12 btn.y = 6//safeHeight == 0 ? 6 : 12
btn.x = 16 + Double(index) * cW btn.x = 16 + Double(index) * cW
btn.changBtnWithStytl(btnStyle: .imageTop, margin: 2) btn.changBtnWithStytl(btnStyle: .imageTop, margin: 2)
self.addSubview(btn) self.addSubview(btn)
......
...@@ -24,12 +24,13 @@ class HomeVideoDetailCustomHeaderView : UICollectionReusableView { ...@@ -24,12 +24,13 @@ class HomeVideoDetailCustomHeaderView : UICollectionReusableView {
lazy var filterButton : UIButton = { lazy var filterButton : UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "Frame 1"), for: .normal) button.setImage(UIImage(named: "Frame 1"), for: .normal)
button.setTitle("largest", for: .normal) button.setTitle("latest", for: .normal)
button.layer.cornerRadius = 14 button.layer.cornerRadius = 14
button.clipsToBounds = true button.clipsToBounds = true
button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000) button.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 0.1000)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .semibold) button.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal) button.setTitleColor(UIColor(red: 0.07, green: 0.07, blue: 0.07, alpha: 1), for: .normal)
button.titleEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0)
button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside) button.addTarget(self, action: #selector(filterButtonAction), for: .touchUpInside)
button.isHidden = false button.isHidden = false
return button return button
......
...@@ -296,7 +296,7 @@ extension HomeView:WaterfallMutiSectionDelegate,UICollectionViewDataSource,UICol ...@@ -296,7 +296,7 @@ extension HomeView:WaterfallMutiSectionDelegate,UICollectionViewDataSource,UICol
let model = viewModel.headerGroup[indexPath.row] //model?.titleModelArray[indexPath.row] let model = viewModel.headerGroup[indexPath.row] //model?.titleModelArray[indexPath.row]
if model.assets.count > 0 { if model.assets.count > 0 {
return (model.assets.first?.count ?? 0) > 2 ? ((collection.width - marginLR - 20) / 2.2) + 64 : ((collection.width - 2 * marginLR - 10) / 2) + 64 return (model.assets.first?.count ?? 0) > 2 ? ((collection.width - marginLR - 20) / 2.2) + 50 : ((collection.width - 2 * marginLR - 4) / 2.0) + 50
}else{ }else{
return 40 return 40
...@@ -408,6 +408,13 @@ extension HomeView:WaterfallMutiSectionDelegate,UICollectionViewDataSource,UICol ...@@ -408,6 +408,13 @@ extension HomeView:WaterfallMutiSectionDelegate,UICollectionViewDataSource,UICol
return CGSize.zero return CGSize.zero
} }
func referenceSizeForFooter(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize {
if section == 0 {
return CGSize(width: ScreenW, height: 0)
}
return CGSize(width: ScreenW, height: 20)
}
func getOuterCollectionViewHeader() -> UICollectionReusableView? { func getOuterCollectionViewHeader() -> UICollectionReusableView? {
let indexPath = IndexPath(item: 0, section: 0) let indexPath = IndexPath(item: 0, section: 0)
return self.collectionView.supplementaryView(forElementKind: UICollectionView.elementKindSectionHeader, at: indexPath) return self.collectionView.supplementaryView(forElementKind: UICollectionView.elementKindSectionHeader, at: indexPath)
......
...@@ -26,7 +26,9 @@ class PhotosRemoveBaseView: UIView { ...@@ -26,7 +26,9 @@ class PhotosRemoveBaseView: UIView {
vc.isAutoPlay = index == 0 vc.isAutoPlay = index == 0
vc.url = url vc.url = url
self.imageView.removeFromSuperview() self.imageView.removeFromSuperview()
self.responderViewController()?.addChild(vc) self.responderViewController()?.addChild(vc)
self.addSubview(vc.view) self.addSubview(vc.view)
vc.view.snp.makeConstraints { make in vc.view.snp.makeConstraints { make in
make.left.top.bottom.right.equalToSuperview() make.left.top.bottom.right.equalToSuperview()
......
...@@ -19,7 +19,7 @@ enum ResouceSortType : String{ ...@@ -19,7 +19,7 @@ enum ResouceSortType : String{
struct ResourceFilterBoxModel { struct ResourceFilterBoxModel {
var startDate : Date? var startDate : Date?
var endDate : Date? var endDate : Date?
var sortType : ResouceSortType = .largest var sortType : ResouceSortType = .latest
init(startDate: Date? = nil, endDate: Date? = nil, sortType: ResouceSortType) { init(startDate: Date? = nil, endDate: Date? = nil, sortType: ResouceSortType) {
self.startDate = startDate self.startDate = startDate
...@@ -35,7 +35,7 @@ class ResourceFilterBoxView : UIView { ...@@ -35,7 +35,7 @@ class ResourceFilterBoxView : UIView {
var startDate : Date? var startDate : Date?
var endDate : Date? var endDate : Date?
var currentSortType: ResouceSortType = .largest var currentSortType: ResouceSortType = .latest
let tableData: [String] = ["largest", "smallest", "latest", "oldest"] let tableData: [String] = ["largest", "smallest", "latest", "oldest"]
var callBack : callBack<Any> = {sortType in} var callBack : callBack<Any> = {sortType in}
......
...@@ -123,8 +123,8 @@ class VideoDetaiNavView : UIView { ...@@ -123,8 +123,8 @@ class VideoDetaiNavView : UIView {
@objc func startSelectButtonAction(){ @objc func startSelectButtonAction(){
self.startSelectButton.isSelected = !self.startSelectButton.isSelected self.startSelectButton.isSelected = !self.startSelectButton.isSelected
self.seletedAllBtn.isHidden = !self.startSelectButton.isSelected self.seletedAllBtn.isHidden = !self.startSelectButton.isSelected
if !self.startSelectButton.isSelected{ if !self.startSelectButton.isSelected {
seletedAllBtn.isSelected = true seletedAllBtn.isSelected = false
seletedAllBtnClick() seletedAllBtnClick()
} }
backButton.isHidden = self.startSelectButton.isSelected backButton.isHidden = self.startSelectButton.isSelected
......
...@@ -47,7 +47,7 @@ class HomeTitleCollectionCell:UICollectionViewCell { ...@@ -47,7 +47,7 @@ class HomeTitleCollectionCell:UICollectionViewCell {
self.layer.masksToBounds = true self.layer.masksToBounds = true
titleLabel = UILabel() titleLabel = UILabel()
titleLabel.font = UIFont.systemFont(ofSize: 18, weight: .bold) titleLabel.font = UIFont.systemFont(ofSize: 18, weight: .semibold)
titleLabel.textColor = UIColor.colorWithHex(hexStr: black3Color) titleLabel.textColor = UIColor.colorWithHex(hexStr: black3Color)
fileLabel = UILabel() fileLabel = UILabel()
......
...@@ -25,6 +25,11 @@ class MaintaiBottomView: UIView { ...@@ -25,6 +25,11 @@ class MaintaiBottomView: UIView {
disMiss() disMiss()
} }
override func layoutSubviews() {
super.layoutSubviews()
self.setShadow(cornerRadius: 0, sColor: UIColor.colorWithHex(hexStr: "#1475B9"), offset: CGSizeMake(3, -1),opacity: 0.15)
}
func show(){ func show(){
guard isshow == false else{ guard isshow == false else{
return return
......
<?xml version="1.0" encoding="UTF-8"?> <?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"/> <device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <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="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"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
</button> </button>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="7oF-X4-Rdp"/> <viewLayoutGuide key="safeArea" id="7oF-X4-Rdp"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" red="0.94901960784313721" green="0.96470588235294119" blue="0.9882352941176471" alpha="1" colorSpace="calibratedRGB"/>
<constraints> <constraints>
<constraint firstItem="7oF-X4-Rdp" firstAttribute="trailing" secondItem="XE9-Mv-kN1" secondAttribute="trailing" constant="16" id="4te-5s-zea"/> <constraint firstItem="7oF-X4-Rdp" firstAttribute="trailing" secondItem="XE9-Mv-kN1" secondAttribute="trailing" constant="16" id="4te-5s-zea"/>
<constraint firstItem="XE9-Mv-kN1" firstAttribute="top" secondItem="CTb-Ac-3zM" secondAttribute="top" constant="20" id="Cog-R5-MKA"/> <constraint firstItem="XE9-Mv-kN1" firstAttribute="top" secondItem="CTb-Ac-3zM" secondAttribute="top" constant="20" id="Cog-R5-MKA"/>
...@@ -64,9 +63,4 @@ ...@@ -64,9 +63,4 @@
<point key="canvasLocation" x="-216.79389312977099" y="-187.32394366197184"/> <point key="canvasLocation" x="-216.79389312977099" y="-187.32394366197184"/>
</view> </view>
</objects> </objects>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document> </document>
...@@ -76,7 +76,7 @@ class PMShowImgVideoController: BaseViewController { ...@@ -76,7 +76,7 @@ class PMShowImgVideoController: BaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
self.MaxCollection.snp.makeConstraints { make in self.MaxCollection.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(20) make.left.right.equalToSuperview().inset(0)
make.top.equalTo(titleView.snp.bottom).offset(20) make.top.equalTo(titleView.snp.bottom).offset(20)
make.bottom.equalTo(bottItems.snp.top) make.bottom.equalTo(bottItems.snp.top)
// make.bottom.equalToSuperview().inset(100 + (cWindow?.safeAreaInsets.bottom ?? 0)) // make.bottom.equalToSuperview().inset(100 + (cWindow?.safeAreaInsets.bottom ?? 0))
...@@ -296,6 +296,9 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa ...@@ -296,6 +296,9 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionView == bottItems { if collectionView == bottItems {
if (indexPath.row > self.homeDataSource?.count ?? 0) {
return
}
if state != .secret { if state != .secret {
self.vibrate() self.vibrate()
if selectSet.contains(indexPath.row) { if selectSet.contains(indexPath.row) {
...@@ -305,7 +308,12 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa ...@@ -305,7 +308,12 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
self.homeDataSource?[indexPath.row].isSeleted = true self.homeDataSource?[indexPath.row].isSeleted = true
selectSet.add(indexPath.row) selectSet.add(indexPath.row)
} }
self.MaxCollection.reloadData() if let cell:PMShowImgCell = self.MaxCollection.cellForItem(at: indexPath) as? PMShowImgCell {
cell.isCurrent = selectSet.contains(indexPath.row)
}
if let cell:PMShowVideoCell = self.MaxCollection.cellForItem(at: indexPath) as? PMShowVideoCell {
cell.isCurrent = selectSet.contains(indexPath.row)
}
collectionView.reloadData() collectionView.reloadData()
}else{ }else{
self.currentIdx = indexPath.row; self.currentIdx = indexPath.row;
...@@ -481,7 +489,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa ...@@ -481,7 +489,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
self.homeDataSource?[indexPath.row].isSeleted = true self.homeDataSource?[indexPath.row].isSeleted = true
self.selectSet.add(indexPath.row) self.selectSet.add(indexPath.row)
} }
self.MaxCollection.reloadData() cell.isCurrent = selectSet.contains(indexPath.row)
// self.MaxCollection.reloadData()
self.bottItems.reloadData() self.bottItems.reloadData()
} }
return cell return cell
......
...@@ -65,10 +65,11 @@ class SecretBottomView: UIView { ...@@ -65,10 +65,11 @@ class SecretBottomView: UIView {
private lazy var but: UIButton = { private lazy var but: UIButton = {
let b = UIButton(type: .custom) let b = UIButton(type: .custom)
b.backgroundColor = .colorWithHex(hexStr: "#0082FF") b.backgroundColor = .colorWithHex(hexStr: "#0082FF")
b.layer.cornerRadius = 46/2.0 b.layer.cornerRadius = 12
b.clipsToBounds = true b.clipsToBounds = true
b.setTitle("Add New", for: .normal) b.setTitle("Add New", for: .normal)
b.setImage(UIImage(named: "ic_add_secret"), for: .normal) b.setImage(UIImage(named: "ic_add_secret"), for: .normal)
b.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold)
b.addTarget(self, action: #selector(AddNew), for: .touchUpInside) b.addTarget(self, action: #selector(AddNew), for: .touchUpInside)
return b return b
}() }()
......
...@@ -60,7 +60,7 @@ extension GuideTipsType{ ...@@ -60,7 +60,7 @@ extension GuideTipsType{
case .duplicates: case .duplicates:
return "2 Duplicates" return "2 Duplicates"
case .similar: case .similar:
return "2 Similar" return ""
case .video: case .video:
return "" return ""
case .photo: case .photo:
......
...@@ -18,6 +18,7 @@ class TipsDuplicatesSimilarController: UIViewController { ...@@ -18,6 +18,7 @@ class TipsDuplicatesSimilarController: UIViewController {
@IBOutlet weak var mainTitle: UILabel! @IBOutlet weak var mainTitle: UILabel!
@IBOutlet weak var subTitle: UILabel! @IBOutlet weak var subTitle: UILabel!
@IBOutlet weak var duplicate: UILabel!
@IBOutlet weak var bottomC: ScreenHeightRatioConstraint! @IBOutlet weak var bottomC: ScreenHeightRatioConstraint!
var type:GuideTipsType = .duplicates var type:GuideTipsType = .duplicates
...@@ -32,6 +33,7 @@ class TipsDuplicatesSimilarController: UIViewController { ...@@ -32,6 +33,7 @@ class TipsDuplicatesSimilarController: UIViewController {
mainTitle.text = type.title mainTitle.text = type.title
subTitle.text = type.text subTitle.text = type.text
duplicate.isHidden = (type == .similar)
bottomC.constant = kSafeAreaInsets.bottom == 0 ? 30 : 0 bottomC.constant = kSafeAreaInsets.bottom == 0 ? 30 : 0
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?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"/> <device id="retina6_9" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <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="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TipsDuplicatesSimilarController" customModule="PhoneManager" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="TipsDuplicatesSimilarController" customModule="PhoneManager" customModuleProvider="target">
<connections> <connections>
<outlet property="bottomC" destination="dX6-cv-Gto" id="3Ws-Iq-33S"/> <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="iconOne" destination="5sP-3G-R5V" id="ypq-LB-87o"/>
<outlet property="iconTwo" destination="LIQ-mA-CKi" id="Uzy-Sr-7tG"/> <outlet property="iconTwo" destination="LIQ-mA-CKi" id="Uzy-Sr-7tG"/>
<outlet property="lineText" destination="XMa-dY-JFG" id="WBd-Yf-wR9"/> <outlet property="lineText" destination="XMa-dY-JFG" id="WBd-Yf-wR9"/>
...@@ -27,38 +28,38 @@ ...@@ -27,38 +28,38 @@
<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="150" width="346" height="137.66666666666663"/> <rect key="frame" x="41" y="212" 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="112" width="97" height="20"/> <rect key="frame" x="40" y="174" 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="345.66666666666669" width="346" height="137"/> <rect key="frame" x="41" y="407.66666666666669" width="346" height="137.00000000000006"/>
</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="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"/> <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="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"/> <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="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> <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"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XPg-Ph-1k0"> <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"/> <color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="46" id="DDB-jE-Azu"/> <constraint firstAttribute="height" constant="46" id="DDB-jE-Azu"/>
......
...@@ -193,6 +193,7 @@ class WidgetViewController: BaseViewController { ...@@ -193,6 +193,7 @@ class WidgetViewController: BaseViewController {
page.currentPageIndicatorTintColor = .colorWithHex(hexStr: "#0082FF") page.currentPageIndicatorTintColor = .colorWithHex(hexStr: "#0082FF")
page.pageIndicatorTintColor = .colorWithHex(hexStr: "#C6CEE0") page.pageIndicatorTintColor = .colorWithHex(hexStr: "#C6CEE0")
view.addSubview(page) view.addSubview(page)
page.isHidden = true
return page return page
}() }()
......
...@@ -12,6 +12,13 @@ class EmailCleanListController: BaseViewController { ...@@ -12,6 +12,13 @@ class EmailCleanListController: BaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.backgroundColor = .white self.view.backgroundColor = .white
NotificationCenter.default.addObserver(self, selector: #selector(uupddate), name: messageUpdate, object: nil)
}
@objc func uupddate() -> Void {
DispatchQueue.main.async {
self.datasoure = PMEmailManager.shareManager.allMessage[self.indexPath?.row ?? 0].child
}
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
...@@ -35,15 +42,6 @@ class EmailCleanListController: BaseViewController { ...@@ -35,15 +42,6 @@ class EmailCleanListController: BaseViewController {
@objc func seletedAllBtnClick() { @objc func seletedAllBtnClick() {
DispatchQueue.main.async {[weak self] in DispatchQueue.main.async {[weak self] in
guard let self else {return} guard let self else {return}
// seletedAllBtn.isSelected = !seletedAllBtn.isSelected
// UIView.animate(withDuration: 0.2) {
// self.seletedAllBtn.width = self.seletedAllBtn.isSelected ? 131 : 115
// self.seletedAllBtn.x = self.titleView.width - marginLR - self.seletedAllBtn.width
// } completion: { su in
// if su {
// self.seletedAllBtn.isUserInteractionEnabled = true
// }
// }
tableView.changeSelectAll(seletedAllBtn.isSelected) tableView.changeSelectAll(seletedAllBtn.isSelected)
} }
} }
...@@ -64,8 +62,6 @@ class EmailCleanListController: BaseViewController { ...@@ -64,8 +62,6 @@ class EmailCleanListController: BaseViewController {
make.height.equalTo(32) make.height.equalTo(32)
make.centerY.equalTo(titleView.backBtn.snp.centerY) make.centerY.equalTo(titleView.backBtn.snp.centerY)
} }
// seletedAllBtn.centerY = navCenterY
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
} }
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
......
...@@ -228,14 +228,14 @@ class PMEmailManager: NSObject { ...@@ -228,14 +228,14 @@ class PMEmailManager: NSObject {
for i in 0..<5 { for i in 0..<5 {
for row in EmailFilterManager.share.SelectEmailSet[i].allObjects { for row in EmailFilterManager.share.SelectEmailSet[i].allObjects {
guard let rowInt = row as? Int else { return } guard let rowInt = row as? Int else { return }
guard let msgId = PMEmailManager.shareManager.messageFilter[i].child[rowInt].messageId else { return } guard let msgId = PMEmailManager.shareManager.allMessage[i].child[rowInt].messageId else { return }
messageID.add(msgId) messageID.add(msgId)
} }
} }
}else{ }else{
for row in EmailFilterManager.share.SelectEmailSet[indexPath].allObjects { for row in EmailFilterManager.share.SelectEmailSet[indexPath].allObjects {
guard let rowInt = row as? Int else { return } guard let rowInt = row as? Int else { return }
guard let msgId = PMEmailManager.shareManager.messageFilter[indexPath].child[rowInt].messageId else { return } guard let msgId = PMEmailManager.shareManager.allMessage[indexPath].child[rowInt].messageId else { return }
messageID.add(msgId) messageID.add(msgId)
} }
} }
...@@ -278,7 +278,8 @@ class PMEmailManager: NSObject { ...@@ -278,7 +278,8 @@ class PMEmailManager: NSObject {
}) })
EmailFilterManager.share.SelectEmailSet[all] = NSMutableSet() EmailFilterManager.share.SelectEmailSet[all] = NSMutableSet()
} }
PMEmailManager.shareManager.allMessage = PMEmailManager.shareManager.messageFilter emailSort()
// PMEmailManager.shareManager.allMessage = PMEmailManager.shareManager.messageFilter
} }
func Analysis(message:GTLRGmail_Message) -> EmailMessageModel { func Analysis(message:GTLRGmail_Message) -> EmailMessageModel {
......
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