Commit a4f1a434 authored by yqz's avatar yqz

Merge branch 'yQz0507' into dev_main

* yQz0507:
  优化
parents 46247d69 aa566131
......@@ -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 = {
......
......@@ -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)
......
......@@ -117,7 +117,7 @@ class HomeInfoView :UIView {
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]] = []
......@@ -150,6 +150,7 @@ class HomeInfoView :UIView {
self.tableView.reloadSections(IndexSet(integer: 0), with: .automatic)
}
}
self.headerView.sortViewSubmitCallBack(ResourceFilterBoxModel(sortType: .latest))
}
required init?(coder: NSCoder) {
......
......@@ -109,7 +109,7 @@ class PMShowImgCell: UICollectionViewCell {
make.left.right.bottom.top.equalToSuperview()
}
selectBtn.snp.makeConstraints { make in
make.right.equalToSuperview().inset(-15)
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().inset(-15)
make.right.equalToSuperview().inset(25)
make.width.height.equalTo(iconWH)
make.bottom.equalToSuperview().offset(-10)
}
......
......@@ -319,7 +319,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)
}
}
}
......@@ -331,7 +331,9 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
let vc:EmailLoginController = EmailLoginController()
vc.state = .home
self.navigationController?.pushViewController(vc, animated: true)
self.tableView.reloadData()
vc.callblock = {[weak self] in
self?.tableView.reloadRows(at: [IndexPath(row: 0, section:1)], with: .none)
}
}
if AdvManager.shared.advTimeAfterInAPP <= 0{
if IAPManager.share.isSubscribed == false {
......
......@@ -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"/>
......
......@@ -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)
}
}
......
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