Commit cb6d4961 authored by yqz's avatar yqz

优化

parent 5ce1c1ce
{
"images" : [
{
"filename" : "img_phone_battery_02.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "img_phone_battery_02@2x.png",
"filename" : "Group_1171275124@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "img_phone_battery_02@3x.png",
"filename" : "Group_1171275124@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic-select-new-All-n@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic-select-new-All-n@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic-select-new-All-s@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic-select-new-All-s@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "Frame_1171276341@2x.png",
"filename" : "Frame_1171276354@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame_1171276341@3x.png",
"filename" : "Frame_1171276354@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"filename" : "ic_check_similar.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_check_similar@2x.png",
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_check_similar@3x.png",
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "Frame_1171276341@2x.png",
"filename" : "Frame_1171276354@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame_1171276341@3x.png",
"filename" : "Frame_1171276354@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -88,20 +88,23 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
if i==0 {
view.detailTipTitleLabel.isHidden = false
// 在滑动的第一个添加一个button
let jumpButton = UIButton(type: .custom)
jumpButton.setTitle("Open shortcut command", for: .normal)
jumpButton.setTitleColor(.white, for: .normal)
jumpButton.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
jumpButton.layer.cornerRadius = 25
jumpButton.clipsToBounds = true
view.addSubview(jumpButton)
jumpButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(32)
make.right.equalToSuperview().offset(-32)
make.height.equalTo(50)
make.bottom.equalToSuperview().offset(-122 * RScreenH())
}
jumpButton.addTarget(self, action: #selector(jumpButtonAction), for: .touchUpInside)
// let jumpButton = UIButton(type: .custom)
// jumpButton.setTitle("Open shortcut command", for: .normal)
// jumpButton.setTitleColor(.white, for: .normal)
// jumpButton.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
// jumpButton.layer.cornerRadius = 25
// jumpButton.clipsToBounds = true
// view.addSubview(jumpButton)
// jumpButton.snp.makeConstraints { make in
// make.left.equalToSuperview().offset(32)
// make.right.equalToSuperview().offset(-32)
// make.height.equalTo(50)
// make.bottom.equalToSuperview().offset(-122 * RScreenH())
// }
// jumpButton.addTarget(self, action: #selector(jumpButtonAction), for: .touchUpInside)
let tap = UITapGestureRecognizer(target: self, action: #selector(jumpButtonAction(_:)))
view.guideView.isUserInteractionEnabled = true
view.guideView.addGestureRecognizer(tap)
}else {
view.detailTipTitleLabel.isHidden = true
}
......@@ -132,10 +135,17 @@ class ChargeGuideController : BaseViewController,UIScrollViewDelegate,UINavigati
self.navigationController?.popViewController(animated: true)
}
@objc func jumpButtonAction(){
if let url = URL(string: "shortcuts://") {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
@objc func jumpButtonAction(_ ges:UIGestureRecognizer){
let point = ges.location(in: ges.view)
var frame = ges.view?.frame ?? CGRect()
frame.origin.y = (frame.height) - 205
frame.size.height = 100
if CGRectContainsPoint(frame, point) {
if let url = URL(string: "shortcuts://") {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
}
}
......
......@@ -80,7 +80,6 @@ class ChargeGuideNormalView : UIView{
make.centerX.equalToSuperview()
make.width.equalTo(316)
make.height.equalTo(534)
}
}
......
......@@ -12,7 +12,7 @@ import UIKit
class ContactIncompleteViewController : BaseViewController {
private var widthConstraint: Constraint?
// private var widthConstraint: Constraint?
var dataSourceModel : [ContactModel]?
......@@ -78,7 +78,7 @@ class ContactIncompleteViewController : BaseViewController {
self.selectAllButton.snp.makeConstraints { make in
make.right.equalTo(-15 * RScreenW())
make.centerY.equalTo(self.navView.backButton.snp.centerY)
widthConstraint = make.width.equalTo(115).constraint
// widthConstraint = make.width.equalTo(115).constraint
make.height.equalTo(32)
}
......@@ -86,17 +86,17 @@ class ContactIncompleteViewController : BaseViewController {
// 选择之后,更新宽度约束的常量值
if isSelected {
self.normalView.selectedContacts = self.normalView.dataSourceModel
self.widthConstraint?.update(offset: 131)
// self.widthConstraint?.update(offset: 131)
}else {
self.normalView.selectedContacts.removeAll()
self.widthConstraint?.update(offset: 115)
// self.widthConstraint?.update(offset: 115)
}
self.normalView.updateDeleteButtonStatus()
// 强制重新布局
UIView.animate(withDuration: 0.3) {
self.selectAllButton.setNeedsLayout()
self.selectAllButton.layoutIfNeeded()
}
// UIView.animate(withDuration: 0.3) {
// self.selectAllButton.setNeedsLayout()
// self.selectAllButton.layoutIfNeeded()
// }
self.normalView.tableView.reloadData()
}
self.normalView.dataClearCallBack = {
......
......@@ -74,9 +74,9 @@ class ContactsDupViewController : BaseViewController {
self.navView.addSubview(self.selectAllButton)
self.selectAllButton.snp.makeConstraints { make in
make.right.equalTo(-15 * RScreenW())
make.right.equalToSuperview().offset(-15)
make.centerY.equalTo(self.navView.backButton.snp.centerY)
widthConstraint = make.width.equalTo(115).constraint
// widthConstraint = make.width.equalTo(115).constraint
make.height.equalTo(32)
}
......@@ -88,21 +88,21 @@ class ContactsDupViewController : BaseViewController {
DispatchQueue.main.async {
// 选择之后,更新宽度约束的常量值
if isSelected {
self.widthConstraint?.update(offset: 131)
// self.widthConstraint?.update(offset: 131)
if let data = self.dataSourceModel {
for(index,item) in data.enumerated(){
self.normalView.selectData[String(index)] = item
}
}
}else {
self.widthConstraint?.update(offset: 115)
// self.widthConstraint?.update(offset: 115)
self.normalView.selectData = [:]
}
// 强制重新布局
UIView.animate(withDuration: 0.3) {
self.selectAllButton.setNeedsLayout()
self.selectAllButton.layoutIfNeeded()
}
// UIView.animate(withDuration: 0.3) {
// self.selectAllButton.setNeedsLayout()
// self.selectAllButton.layoutIfNeeded()
// }
self.normalView.tableView.reloadData()
}
}
......@@ -111,11 +111,11 @@ class ContactsDupViewController : BaseViewController {
DispatchQueue.main.async {
// 选择之后,更新宽度约束的常量值
if changed {
self.widthConstraint?.update(offset: 131)
// self.widthConstraint?.update(offset: 131)
self.selectAllButton.isSelected = true
}else {
self.widthConstraint?.update(offset: 115)
self.selectAllButton.isSelected = false
// self.selectAllButton.isSelected = false
}
}
}
......
......@@ -88,16 +88,21 @@ class SelectAllButton : UIView {
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"
// 强制布局更新以适应新文本
setNeedsLayout()
layoutIfNeeded()
// // 强制布局更新以适应新文本
// UIView.animate(withDuration: 0.1) {
// self.setNeedsLayout()
// self.layoutIfNeeded()
// }
}
@objc func selectClick(){
self.isUserInteractionEnabled = false
self.isSelected = !self.isSelected
tapCallback(self.isSelected)
DispatchQueue.main.asyncAfter(deadline: .now()+0.01) {
self.isUserInteractionEnabled = true
}
}
}
......@@ -12,25 +12,31 @@ class HomeInfoViewController:BaseViewController {
private var type:PhotsFileType?
lazy var seletedAllBtn:UIButton = {
let btn:UIButton = UIButton(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 seletedAllBtn:SelectAllButton = {
let view = SelectAllButton()
view.clipsToBounds = true
view.layer.cornerRadius = 16
view.tapCallback = {[weak self] isselect in
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 = {
......@@ -63,8 +69,8 @@ class HomeInfoViewController:BaseViewController {
guard let self else {return}
self.seletedAllBtn.isSelected = cS
self.seletedAllBtn.width = cS ? 131 : 115
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// self.seletedAllBtn.width = cS ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
}
}
}
......@@ -325,6 +331,10 @@ class HomeInfoViewController:BaseViewController {
configSelectAll()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
seletedAllBtn.isHidden = (self.ids?.count ?? 0 <= 0)
}
// 删除成功页面
func showDeleteSuccess(fileCount:Int,fileSize:Int64){
......@@ -392,10 +402,14 @@ class HomeInfoViewController:BaseViewController {
super.addViews()
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
seletedAllBtn.centerY = navCenterY
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// seletedAllBtn.centerY = navCenterY
titleView.addSubview(seletedAllBtn)
seletedAllBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-marginLR)
make.centerY.equalTo(titleView.backBtn.snp.centerY)
make.height.equalTo(32)
}
titleLabel.x = titleView.backBtn.width + titleView.backBtn.x + 10
titleLabel.centerY = navCenterY
......@@ -445,8 +459,8 @@ class HomeInfoViewController:BaseViewController {
func configSelectAll(){
seletedAllBtn.isSelected = true
self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
}
......@@ -457,9 +471,9 @@ class HomeInfoViewController:BaseViewController {
guard let self else {return}
seletedAllBtn.isSelected = !seletedAllBtn.isSelected
self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// seletedAllBtn.isSelected = !seletedAllBtn.isSelected
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
tablewView.changeALlValue(isSeleted: seletedAllBtn.isSelected)
}
......
......@@ -240,6 +240,8 @@ class HomePhotosDetailViewController : BaseViewController {
}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)
}
}
......@@ -450,6 +452,8 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "HomePhotosDetailCollectionCell", for: indexPath) as! HomePhotosDetailCollectionCell
cell.resourceIdent = self.resourceData[indexPath.row]
cell.saveSizeView.isHidden = mediaType != .Other
// 这里做缓存
cell.backImageView.image = UIImage()
self.getImageFromCache(model: self.resourceData[indexPath.row]) {[weak self] image in
......@@ -573,7 +577,8 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
header.countLabel.attributedText = header.getAttrText(fullText: "\(self.resourceData.count) Photos")
header.modelTitlelabel.text = self.mediaType?.rawValue
currentHeaderView = header
header.filterButton.isHidden = (self.resourceData.count <= 0)
header.countLabel.isHidden = (self.resourceData.count <= 0)
header.sortViewSubmitCallBack = {[weak self] filterModel in
guard let self else {return}
PhotoManager.shared.reloadTrashAndKeep()
......
......@@ -316,6 +316,7 @@ class HomeVideoDetailController :BaseViewController {
}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)
}
}
......@@ -496,6 +497,9 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
currentHeaderView = header
header.compressionTipView.reloadData()
header.sizeLabel.attributedText = header.getAttrText(fullText: "\(self.resourceData.count) Videos")
header.sizeLabel.isHidden = (self.resourceData.count <= 0)
header.filterButton.isHidden = (self.resourceData.count <= 0)
header.compressionTipView.isHidden = (PhotoManager.shared.permissionStatus != .authorized)
header.sortViewSubmitCallBack = {[weak self] filterModel in
guard let self else {return}
PhotoManager.shared.reloadTrashAndKeep()
......@@ -738,6 +742,7 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
}
}
self.addTrashView()
}
}
......
......@@ -47,7 +47,8 @@ class HomeInfoView :UIView {
let sview:HomeInfoTitleView = HomeInfoTitleView(frame: CGRect(x: 0, y: 0, width: width, height: 84))
sview.titleLabel.text = self.titleText
sview.type = self.type
sview.filterButton.isHidden = self.type != .similar && self.type != .SimilarVideos
sview.filterButton.isHidden = (self.type != .similar && self.type != .SimilarVideos || (ids?.count ?? 0 <= 0))
sview.numberLabel.isHidden = (ids?.count ?? 0 <= 0)
return sview
}()
......@@ -314,7 +315,8 @@ class HomeInfoView :UIView {
tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: deleteView.isHidden ? 12 : deleteView.height + 12 , right: 0)
self.nextRowButton.isHidden = !self.isShowNextRowButton()
headerView.filterButton.isHidden = (self.type != .similar && self.type != .SimilarVideos || (ids?.count ?? 0 <= 0))
headerView.numberLabel.isHidden = (ids?.count ?? 0 <= 0)
}
}
......
......@@ -131,7 +131,7 @@ class PhotosRemoveBaseView: UIView {
self.rightButton.alpha = 0
self.maskTempleteView.backgroundColor = UIColor(red: 0.95, green: 0.21, blue: 0.21, alpha: 0.4000)
self.addSubview(self.maskTempleteView)
self.bringSubviewToFront(self.leftButton)
}
func showRightButton() {
......@@ -140,6 +140,7 @@ class PhotosRemoveBaseView: UIView {
}else {
self.rightButton.center = imageView.center
}
self.bringSubviewToFront(self.rightButton)
UIView.animate(withDuration: 0.2) {
self.rightButton.alpha = 1
self.maskTempleteView.backgroundColor = UIColor(red: 0.26, green: 0.78, blue: 0.41, alpha: 0.4000)
......
......@@ -29,22 +29,30 @@ class VideoDetaiNavView : UIView {
return button
}()
lazy var seletedAllBtn:UIButton = {
lazy var seletedAllBtn:SelectAllButton = {
let btn:UIButton = UIButton(frame: CGRect(x: 0, y: 0, width: 115, height: 32))
btn.isSelected = false
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.changBtnWithStytl(btnStyle: .defalut, margin: 8)
btn.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
btn.layer.cornerRadius = btn.height / 2
return btn
let view = SelectAllButton()
view.clipsToBounds = true
view.layer.cornerRadius = 16
view.tapCallback = {[weak self] isselect in
self?.seletedAllBtnClick()
}
return view
// let btn:UIButton = UIButton(frame: CGRect(x: 0, y: 0, width: 115, height: 32))
// btn.isSelected = false
// 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.changBtnWithStytl(btnStyle: .defalut, margin: 8)
// btn.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
// btn.layer.cornerRadius = btn.height / 2
// return btn
}()
override init(frame: CGRect) {
......@@ -69,8 +77,15 @@ class VideoDetaiNavView : UIView {
self.addSubview(self.seletedAllBtn)
seletedAllBtn.x = marginLR
seletedAllBtn.centerY = navCenterY
// seletedAllBtn.x = marginLR
// seletedAllBtn.centerY = navCenterY
seletedAllBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(marginLR)
make.height.equalTo(32)
make.centerY.equalTo(navCenterY)
}
backButton.snp.makeConstraints { make in
make.centerY.equalTo(navCenterY)
......@@ -97,9 +112,9 @@ class VideoDetaiNavView : UIView {
DispatchQueue.main.async {[weak self] in
guard let self else {return}
seletedAllBtn.isSelected = !seletedAllBtn.isSelected
self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
seletedAllBtn.x = marginLR
// seletedAllBtn.isSelected = !seletedAllBtn.isSelected
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = marginLR
self.selectAllCallBack(seletedAllBtn.isSelected)
}
......@@ -112,6 +127,7 @@ class VideoDetaiNavView : UIView {
seletedAllBtn.isSelected = true
seletedAllBtnClick()
}
backButton.isHidden = self.startSelectButton.isSelected
self.startSelectCallBack(self.startSelectButton.isSelected)
}
}
......@@ -27,13 +27,46 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
}
}
var resourceIdent : AssetModel?
var resourceIdent : AssetModel? {
didSet {
let sizeKB : Double = Double((resourceIdent?.assetSize ?? 0) / 1000)
if sizeKB < 1000{
self.saveSizeLabel.text = String(format: "%.2f KB" ,sizeKB)
}else if sizeKB < (1000 * 1000) && sizeKB > 1000{
self.saveSizeLabel.text = String(format: "%.2f MB" ,sizeKB/1000)
}else{
self.saveSizeLabel.text = String(format: "%.2f GB" ,sizeKB/(1000 * 1000))
}
}
}
var currentOrder : Int = 0
lazy var saveSizeView: UIView = {
let view = UIView()
view.layer.masksToBounds = true
view.layer.cornerRadius = 12
view.backgroundColor = UIColor(red: 0, green: 0.51, blue: 1, alpha: 1)
return view
}()
lazy var saveSizeLabel: UILabel = {
let view = UILabel()
view.textAlignment = .left
view.textColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1)
view.font = UIFont.systemFont(ofSize: 12, weight: .semibold)
view.text = "0.0MB"
return view
}()
lazy var moreImageView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "Frame 9")
view.backgroundColor = .clear
return view
}()
lazy var backImageView: UIImageView = {
let view = UIImageView()
view.clipsToBounds = true
......@@ -91,6 +124,11 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
self.addSubview(self.selectImageView)
self.addSubview(self.extensionView)
self.addSubview(self.saveSizeView)
self.saveSizeView.addSubview(self.saveSizeLabel)
self.saveSizeView.addSubview(self.moreImageView)
self.backImageView.snp.makeConstraints { make in
make.left.right.height.width.equalToSuperview()
}
......@@ -104,6 +142,23 @@ class HomePhotosDetailCollectionCell : UICollectionViewCell {
make.bottom.right.equalToSuperview().offset(-6)
make.height.width.equalTo(18)
}
self.saveSizeView.snp.makeConstraints { make in
make.left.top.equalToSuperview().offset(6)
make.height.equalTo(24)
make.width.equalTo(100)
}
self.saveSizeLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(11)
make.centerY.equalToSuperview()
make.height.equalTo(17)
}
self.moreImageView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-10)
make.centerY.equalToSuperview()
make.height.width.equalTo(16)
}
}
required init?(coder: NSCoder) {
......
......@@ -20,10 +20,10 @@ class HomePayDueView: UIView {
override func awakeFromNib() {
super.awakeFromNib()
freeTime.layer.cornerRadius = 8
freeTime.layer.cornerRadius = 10.5
freeTime.layer.masksToBounds = true
saveL.layer.cornerRadius = 8
saveL.layer.cornerRadius = 10.5
saveL.layer.masksToBounds = true
dueDay.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
......@@ -32,9 +32,9 @@ class HomePayDueView: UIView {
priceL.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
freeTime.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
freeTime.font = UIFont.scaledSystemFont(ofSize: 12, weight: .bold)
saveL.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
saveL.font = UIFont.scaledSystemFont(ofSize: 12, weight: .bold)
freePrice.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
......@@ -73,7 +73,7 @@ class HomePayDueView: UIView {
saveL.isHidden = false
priceL.text = "\(pord1.localizedPrice)"
priceL.font = UIFont.scaledSystemFont(ofSize: 14, weight: .regular)
priceL.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
}
}
......
......@@ -66,7 +66,7 @@
<constraint firstAttribute="height" constant="21" id="HGB-v2-yhW" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="85" id="eSe-ik-cPa" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
......
......@@ -245,8 +245,8 @@ class HomePayView:UIView {
contentView2Switch?.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.centerY.equalToSuperview()
make.width.equalTo(46)
make.height.equalTo(28)
// make.width.equalTo(46)
// make.height.equalTo(28)
}
contentView2Switch?.addTarget(self, action: #selector(switchValueChanged(_:)), for: .valueChanged)
......@@ -430,12 +430,13 @@ class HomePayView:UIView {
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(subTitle.snp.bottom).offset(8.RH())
make.bottom.equalToSuperview().offset(-16)
}
tipsView.snp.makeConstraints { make in
make.top.equalTo(titleLabel2!.snp.bottom).offset(230.RH())
make.left.right.equalToSuperview().inset(12)
make.height.equalTo(110.RH())
make.left.right.equalToSuperview().inset(marginLR)
// make.height.equalTo(110.RH())
}
payDueView.snp.makeConstraints { make in
......
......@@ -162,9 +162,15 @@ class SecretViewController: BaseViewController {
secretDesc.text = "0 Photos, 0 Videos"
secretCollect.register(SecretFirstCell.self, forCellWithReuseIdentifier: SecretFirstCellID)
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
seletedAllBtn.centerY = navCenterY
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// seletedAllBtn.centerY = navCenterY
titleView.addSubview(seletedAllBtn)
seletedAllBtn.snp.makeConstraints { make in
make.right.equalToSuperview().inset(marginLR)
make.height.equalTo(32)
make.centerY.equalTo(titleView.backBtn.snp.centerY)
}
secretTL.snp.makeConstraints { make in
make.left.equalToSuperview().inset(UIEdgeInsets(top: 72.RW(), left: 15.RW(), bottom: 0, right: 0))
......@@ -281,10 +287,19 @@ class SecretViewController: BaseViewController {
let all = self.selectArray.allObjects.sorted { a, b in
guard let ia = a as? Int,
let ib = b as? Int else { return false }
return ia > ib
return ia < ib
}
if let name = self.dataSource.first {
if let idx = all.first as? Int,
let name = self.dataSource[idx] as? String {
let url = "SecretIm".document().appendingPathComponent(name)
if name.hasSuffix(".png") {
let urls = "".af() + "/SecretIm/" + name
if let icon = UIImage(contentsOfFile: urls) {
PhoneShare([icon], parent: self)
}
}else{
PhoneShare([url], parent: self)
}
}
}else{
// 删除图片的时候不弹广告和内购
......@@ -298,24 +313,31 @@ class SecretViewController: BaseViewController {
return b
}()
private lazy var seletedAllBtn:UIButton = {
let btn:UIButton = UIButton(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.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
btn.layer.cornerRadius = btn.height / 2
btn.layer.masksToBounds = true
btn.changBtnWithStytl(btnStyle: .defalut, margin: 8)
return btn
private lazy var seletedAllBtn:SelectAllButton = {
let view = SelectAllButton()
view.clipsToBounds = true
view.layer.cornerRadius = 16
view.tapCallback = {[weak self] isselect in
self?.seletedAllBtnClick()
}
return view
// let btn:UIButton = UIButton(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.addTarget(self, action: #selector(seletedAllBtnClick), for: .touchUpInside)
//
// btn.layer.cornerRadius = btn.height / 2
// btn.layer.masksToBounds = true
// btn.changBtnWithStytl(btnStyle: .defalut, margin: 8)
//
// return btn
}()
deinit {
......@@ -369,9 +391,9 @@ extension SecretViewController : UICollectionViewDelegate,UICollectionViewDataSo
@objc private func seletedAllBtnClick() {
DispatchQueue.main.async {[weak self] in
guard let self else {return}
seletedAllBtn.isSelected = !seletedAllBtn.isSelected
self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
// seletedAllBtn.isSelected = !seletedAllBtn.isSelected
// self.seletedAllBtn.width = seletedAllBtn.isSelected ? 131 : 115
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
let sets = NSMutableSet()
if seletedAllBtn.isSelected {
for i in 0..<dataSource.count {
......
......@@ -110,7 +110,7 @@ class SettingViewHeaderCell : UITableViewCell {
self.preButtonImageView.snp.makeConstraints { make in
make.width.height.equalTo(46)
make.left.equalToSuperview().offset(6)
make.left.equalToSuperview().offset(-56)
make.top.equalToSuperview()
}
......@@ -124,8 +124,23 @@ class SettingViewHeaderCell : UITableViewCell {
make.centerX.equalToSuperview()
make.top.equalTo(self.sLabel.snp.bottom).offset(20)
}
self.layoutIfNeeded()
if IAPManager.share.isSubscribed == false {
}
}
// lazy var basic: CABasicAnimation = {
// let basic = CABasicAnimation(keyPath: "position.x")
// basic.fromValue = -50
// basic.toValue = self.moreButton.width + 10
// basic.repeatCount = .infinity
// preButtonImageView.layer.add(basic, forKey: "position")
// return basic
// }()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
......
......@@ -52,6 +52,10 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
let cell : SettingViewHeaderCell = tableView.dequeueReusableCell(withIdentifier: "SettingViewHeaderCell",for: indexPath) as! SettingViewHeaderCell
if IAPManager.share.isSubscribed == false {
// cell.basic.duration = 1.5
// cell.preButtonImageView.startAnimating()
}
return cell
}else{
let model : SettingModel = modelData![indexPath.section]
......
......@@ -21,7 +21,7 @@
<rect key="frame" x="15" y="0.0" width="326" height="89"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XwR-Ch-R1t">
<rect key="frame" x="6" y="15" width="44" height="44"/>
<rect key="frame" x="6" y="15.000000000000004" width="44" height="44.333333333333343"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="waN-0f-ZFP"/>
</constraints>
......@@ -34,7 +34,7 @@
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="G" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lkh-fE-u5M">
<rect key="frame" x="50" y="17" width="40" height="40"/>
<rect key="frame" x="50" y="17.333333333333329" width="40" height="40"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="WQp-b1-7L9"/>
......@@ -50,7 +50,7 @@
</userDefinedRuntimeAttributes>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="tF1-pU-1Ak">
<rect key="frame" x="100" y="15.333333333333332" width="216" height="53.333333333333343"/>
<rect key="frame" x="100" y="15.666666666666668" width="216" height="53.333333333333329"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="aXC-da-48n">
<rect key="frame" x="0.0" y="0.0" width="216" height="19.333333333333332"/>
......@@ -73,14 +73,14 @@
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Social Media" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="49v-3u-EtJ">
<rect key="frame" x="8" y="0.0" width="93" height="19.333333333333332"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<nil key="textColor"/>
<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"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="5Cl-XH-rD8">
<rect key="frame" x="101" y="3.3333333333333339" width="115" height="13.000000000000002"/>
<rect key="frame" x="101" y="3.0000000000000018" width="115" height="12.999999999999998"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="11 Nov" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2zo-ld-bPP">
<rect key="frame" x="0.0" y="0.0" width="85" height="13"/>
......@@ -110,15 +110,15 @@
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Google Payments:您的付款处于暂停状..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Mr-iL-2qm">
<rect key="frame" x="0.0" y="21.333333333333329" width="216" height="15.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<rect key="frame" x="0.0" y="21.333333333333336" width="216" height="15.666666666666664"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Google Payments:您的付款处于暂停状..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S8d-tj-cjO">
<rect key="frame" x="0.0" y="39" width="216" height="14.333333333333336"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.70196078431372544" green="0.70196078431372544" blue="0.70196078431372544" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
......@@ -166,7 +166,7 @@
</objects>
<resources>
<image name="ic_emial_start" width="13" height="13.333333015441895"/>
<image name="ic_sel_com" width="24" height="24"/>
<image name="ic_sel_com" width="24" height="24.333333969116211"/>
<image name="ic_unsel_com_red" width="24" height="24"/>
<image name="icon_left_setting_grey" width="20" height="20"/>
</resources>
......
......@@ -22,7 +22,7 @@
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="60" id="q5h-W4-mcE"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<color key="textColor" red="0.20000001789999999" green="0.20000001789999999" blue="0.20000001789999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
......
......@@ -25,8 +25,8 @@
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="72" id="g5j-o3-20E"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="u6a-TR-UVD">
......@@ -56,12 +56,12 @@
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AcA-F1-B4u">
<rect key="frame" x="0.0" y="99" width="136" height="45"/>
<rect key="frame" x="0.0" y="99" width="151" height="45"/>
<color key="backgroundColor" red="0.94901960784313721" green="0.96470588235294119" blue="0.9882352941176471" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="Xtx-DS-XGd"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<inset key="contentEdgeInsets" minX="10" minY="10" maxX="20" maxY="10"/>
<inset key="titleEdgeInsets" minX="5" minY="0.0" maxX="-5" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......
......@@ -22,7 +22,7 @@
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="50" id="BJb-Xh-MSY"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<color key="textColor" red="0.20000001789999999" green="0.20000001789999999" blue="0.20000001789999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
......@@ -76,7 +76,7 @@
</tableViewCell>
</objects>
<resources>
<image name="ic_sel_com" width="24" height="24"/>
<image name="ic_sel_com" width="24" height="24.333333969116211"/>
<image name="ic_unsel_com_red" width="24" height="24"/>
</resources>
</document>
......@@ -35,16 +35,15 @@ class EmailCleanListController: BaseViewController {
@objc func seletedAllBtnClick() {
DispatchQueue.main.async {[weak self] in
guard let self else {return}
seletedAllBtn.isUserInteractionEnabled = false
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
}
}
// 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)
}
}
......@@ -60,15 +59,20 @@ class EmailCleanListController: BaseViewController {
make.bottom.equalToSuperview()
}
titleView.addSubview(seletedAllBtn)
seletedAllBtn.centerY = navCenterY
seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
seletedAllBtn.snp.makeConstraints { make in
make.right.equalToSuperview().inset(marginLR)
make.height.equalTo(32)
make.centerY.equalTo(titleView.backBtn.snp.centerY)
}
// seletedAllBtn.centerY = navCenterY
// seletedAllBtn.x = titleView.width - marginLR - seletedAllBtn.width
}
lazy var titleLabel: UILabel = {
let label = UILabel()
label.text = ""
label.font = UIFont.systemFont(ofSize: 20, weight: .bold)
label.textColor = .black
label.textColor = UIColor.colorWithHex(hexStr: "#333333")
label.textAlignment = .left
view.addSubview(label)
return label
......@@ -92,20 +96,27 @@ class EmailCleanListController: BaseViewController {
return tab
}()
private lazy var seletedAllBtn:UIButton = {
let btn:UIButton = UIButton(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
private lazy var seletedAllBtn:SelectAllButton = {
let view = SelectAllButton()
view.clipsToBounds = true
view.layer.cornerRadius = 16
view.tapCallback = {[weak self] isselect in
self?.seletedAllBtnClick()
}
return view
// let btn:UIButton = UIButton(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
}()
}
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