Commit 0b8a4cce authored by yqz's avatar yqz

ui 调整

parent 9779b105
{
"images" : [
{
"filename" : "ic_charging_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_charging_home_pre@2x.png",
"filename" : "ic_charging_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_charging_home_pre@3x.png",
"filename" : "ic_charging_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_cmpress_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_cmpress_home_pre@2x.png",
"filename" : "ic_cmpress_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_cmpress_home_pre@3x.png",
"filename" : "ic_cmpress_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_contacts_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_contacts_home_pre@2x.png",
"filename" : "ic_contacts_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_contacts_home_pre@3x.png",
"filename" : "ic_contacts_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_email_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_email_home_pre@2x.png",
"filename" : "ic_email_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_email_home_pre@3x.png",
"filename" : "ic_email_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_secret_home_pre.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_secret_home_pre@2x.png",
"filename" : "ic_secret_home_pre_2.0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_secret_home_pre@3x.png",
"filename" : "ic_secret_home_pre_2.0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -7,7 +7,7 @@
import Foundation
class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigationControllerDelegate {
class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigationControllerDelegate, UIGestureRecognizerDelegate {
......@@ -66,9 +66,10 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
self.view.addSubview(self.guideScrollView)
self.view.addSubview(self.closeButton)
self.view.addSubview(self.pageControl)
navigationController?.delegate = self
titleView.model.isBackBtnShow = false
navigationController?.isNavigationBarHidden = true
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
navigationController?.interactivePopGestureRecognizer?.delegate = self;
self.closeButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-15)
make.top.equalToSuperview().offset(statusBarHeight + 15)
......@@ -130,9 +131,10 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
}
self.guideScrollView.addSubview(endView)
}
@objc func closeCurrentPage(){
self.navigationController?.popViewController(animated: true)
let vc = self.navigationController?.viewControllers.first
vc?.dismiss(animated: true)
}
@objc func jumpButtonAction(_ ges:UIGestureRecognizer){
......
......@@ -75,7 +75,7 @@ class ChargeGuideStartController : BaseViewController {
self.view.addSubview(self.detailTipTitleLabel)
self.view.addSubview(self.chargeView)
self.navigationController?.isNavigationBarHidden = true
self.backView.snp.makeConstraints { make in
make.left.right.bottom.top.equalToSuperview()
......@@ -116,11 +116,13 @@ class ChargeGuideStartController : BaseViewController {
}
@objc func closeCurrentPage(){
self.dismiss(animated: true)
self.navigationController?.dismiss(animated: true)
}
@objc func getStart(){
callback("getStart")
self.dismiss(animated: false)
@objc func getStart() {
let vc : ChargeGuideController = ChargeGuideController()
self.navigationController?.pushViewController(vc, animated: true)
// callback("getStart")
// self.dismiss(animated: false)
}
}
......@@ -62,12 +62,13 @@ class ChargeViewController:BaseViewController {
let vc : ChargeGuideStartController = ChargeGuideStartController()
vc.modalPresentationStyle = .fullScreen
self.present(vc, animated: true)
let navigation = UINavigationController(rootViewController: vc)
navigation.modalPresentationStyle = .fullScreen
self.present(navigation, animated: true)
vc.callback = {[weak self] text in
guard let self else {return}
let vc : ChargeGuideController = ChargeGuideController()
self.navigationController?.pushViewController(vc, animated: true)
// let vc : ChargeGuideController = ChargeGuideController()
// self.navigationController?.pushViewController(vc, animated: true)
}
}
......
......@@ -101,7 +101,9 @@ class ChargeGuideEndView : UIView{
}
}
@objc func closeCurrentPage(){
self.responderViewController()?.navigationController?.popViewController(animated: true)
let vc = self.responderViewController()?.navigationController?.viewControllers.first
vc?.dismiss(animated: true)
// self.responderViewController()?.navigationController?.popViewController(animated: true)
}
required init?(coder: NSCoder) {
......
......@@ -38,7 +38,7 @@ class CustomDupHeaderView : UITableViewHeaderFooterView {
if self.selectStatus {
selectLabel.text = "Select All"
}else{
selectLabel.text = "Unselect all"
selectLabel.text = "Deselect all"
}
let tap = UITapGestureRecognizer()
......@@ -78,7 +78,7 @@ extension CustomDupHeaderView {
@objc func cellSelectTap(){
if self.selectStatus {
self.subLabel.text = "Unselect all"
self.subLabel.text = "Deselect all"
}else {
self.subLabel.text = "Select All"
}
......
......@@ -86,7 +86,7 @@ class SelectAllButton : UIView {
private func updateText() {
imageView.image = isSelected ? UIImage(named: "ic_close_similar") : UIImage(named: "ic_check_similar")
label.textColor = isSelected ? UIColor(red: 0.4, green: 0.4, blue: 0.4, alpha: 1) : UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
label.text = isSelected ? "Unselect all" : "Select All"
label.text = isSelected ? "Deselect all" : "Select All"
// // 强制布局更新以适应新文本
// UIView.animate(withDuration: 0.1) {
......
......@@ -201,7 +201,7 @@ extension ContactDupNormalView : UITableViewDelegate,UITableViewDataSource{
if let tempData = self.selectData[String(section)] {
if tempData.count == self.dataSourceModel[section].count{
// 改变UI
view.subLabel.text = "Unselect all"
view.subLabel.text = "Deselect all"
}else {
view.subLabel.text = "Select All"
}
......
......@@ -49,21 +49,21 @@ class HomePhotosDetailViewController : 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) Photo", 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)
}else{
self.deleteButtonView.deleteButton.setTitle("Delete \(self.selectedModel.count) Photos", 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)
}
......@@ -200,6 +200,12 @@ class HomePhotosDetailViewController : BaseViewController {
self.deleteViewBottomConstraint = make.bottom.equalToSuperview().offset(safeHeight + 78).constraint
}
collectionView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(marginLR)
make.top.equalTo(self.videoDetailNavView!.snp.bottom)
make.bottom.equalToSuperview()
}
self.view.addSubview(self.defaultImageView)
self.defaultImageView.snp.makeConstraints { make in
make.width.height.equalTo(180)
......@@ -235,11 +241,11 @@ class HomePhotosDetailViewController : BaseViewController {
self.videoDetailNavView?.startSelectButton.isHidden = array.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)
// }
self.videoDetailNavView?.startSelectButton.isHidden = (self.resourceData.count <= 0)
}
......@@ -611,6 +617,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
}
}
func referenceSizeForFooter(collectionView collection: UICollectionView, layout: WaterfallMutiSectionFlowLayout, section: Int) -> CGSize {
return CGSizeMake(ScreenW, 90)
}
func filterDataByDate(orgModels : [AssetModel], startDate:Date? ,endDate : Date?)->[AssetModel]{
var array = orgModels
if startDate != nil {
......
......@@ -16,22 +16,25 @@ class HomeDetailDeleteView: UIView {
view.setTitle("Delete", for: UIControl.State.normal)
view.setTitleColor(.white, for: .normal)
view.clipsToBounds = true
view.layer.cornerRadius = 23
view.backgroundColor = UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1)
view.layer.cornerRadius = 12
view.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold)
view.backgroundColor = UIColor.colorWithHex(hexStr: "#0082FF")//UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1)
view.setImage(UIImage(named: "pm-home-Frame-del"), for: .normal)
view.titleEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
view.addTarget(self, action: #selector(deleteButtonAction), for: .touchUpInside)
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
self.backgroundColor = .white
self.backgroundColor = .clear
self.addSubview(self.deleteButton)
self.deleteButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(15)
make.right.equalToSuperview().offset(-15)
make.height.equalTo(46)
make.left.equalToSuperview().offset(55)
make.right.equalToSuperview().offset(-55)
make.height.equalTo(45)
}
}
......
......@@ -31,13 +31,18 @@ class HomeTabbarView:UIView {
private func setupUI() {
backgroundColor = .white
self.setShadow(cornerRadius: 20)
}
override func layoutSubviews() {
super.layoutSubviews()
self.setShadow(cornerRadius: 40, sColor: UIColor.colorWithHex(hexStr: "#0082FF"), offset: CGSize(width: 0, height:-2),opacity: 0.1)
}
private func addButton() {
let cW:CGFloat = (self.width - 32) / Double(tabbarItems.count)
let cH:CGFloat = 54
let cH:CGFloat = 56
for (index,item) in tabbarItems.enumerated() {
......@@ -51,9 +56,9 @@ class HomeTabbarView:UIView {
btn.width = cW
btn.tag = 10 + index
btn.height = cH
btn.y = safeHeight == 0 ? 6 : 12
btn.y = 0//safeHeight == 0 ? 6 : 12
btn.x = 16 + Double(index) * cW
btn.changBtnWithStytl(btnStyle: .imageTop, margin: 5)
btn.changBtnWithStytl(btnStyle: .imageTop, margin: 2)
self.addSubview(btn)
}
}
......
......@@ -136,8 +136,9 @@ class HomeView:UIView {
homeTabbarView?.snp.makeConstraints({ make in
make.bottom.centerX.width.equalToSuperview()
make.height.equalTo(safeHeight + 80)
make.centerX.width.equalToSuperview()
make.height.equalTo(80-12)
make.bottom.equalToSuperview().offset(-(cWindow?.safeAreaInsets.bottom ?? 10))
})
homeTabbarView?.indexCallBack = {[weak self] index in
......@@ -173,7 +174,8 @@ class HomeView:UIView {
}
bottomView = UIView(frame: CGRect(x: 0, y: 0, width: width, height: safeHeight + 10))
bottomView?.backgroundColor = .white
bottomView?.backgroundColor = .clear
self.addSubview(bottomView!)
bottomView?.snp.makeConstraints({ make in
make.centerX.width.equalToSuperview()
......@@ -184,7 +186,7 @@ class HomeView:UIView {
collectionView.snp.makeConstraints { make in
make.top.centerX.equalToSuperview()
make.width.equalToSuperview().offset(-2 * marginLR)
make.bottom.equalToSuperview().offset( -homeTabbarView!.height - 16)
make.bottom.equalTo(homeTabbarView!.snp.top)//.offset( -homeTabbarView!.height - 16)
}
self.addSubview(self.tipLabel)
......
......@@ -58,7 +58,7 @@ class HomeInfoTableViewCell:UITableViewCell {
seletedAllBtn = UIButton()
seletedAllBtn?.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
seletedAllBtn?.setTitle("Select All", for: .normal)
seletedAllBtn?.setTitle("Unselect all", for: .selected)
seletedAllBtn?.setTitle("Deselect all", for: .selected)
seletedAllBtn?.setTitleColor(UIColor.colorWithHex(hexStr: mColor), for: .normal)
seletedAllBtn?.sizeToFit()
......
......@@ -159,15 +159,16 @@ class HomeTitleCollectionCell:UICollectionViewCell {
make.top.left.equalTo(8)
})
titleLabel.sizeToFit()
// titleLabel.sizeToFit()
fileLabel?.snp.makeConstraints({ make in
make.top.centerY.equalTo(titleLabel!)
make.top.equalTo(titleLabel!)
make.centerY.equalTo(titleLabel.snp.centerY)
make.right.equalToSuperview().offset(-34)
})
fileLabel?.sizeToFit()
// fileLabel?.sizeToFit()
collectionView?.snp.makeConstraints({ make in
make.left.equalTo(8)
......@@ -178,7 +179,7 @@ class HomeTitleCollectionCell:UICollectionViewCell {
nextImage?.snp.makeConstraints({ make in
make.centerY.equalTo(fileLabel!)
make.centerY.equalTo(titleLabel.snp.centerY)
make.right.equalToSuperview().inset(12)
make.width.height.equalTo(20)
})
......
......@@ -343,7 +343,7 @@ extension TrashContenView:UICollectionViewDelegate,UICollectionViewDataSource,UI
// 设置button的文字和样式
self.setDeleteButtonUI()
self.deleteButton?.isHidden = !(self.dataSource.count > 0)
if self.dataSource.count > 0 {
self.collectionView.reloadData()
}else {
......
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