Commit 232ca251 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  四大金刚跳转
  // 消息
parents 1e74b607 0c7e54a2
...@@ -235,6 +235,7 @@ ...@@ -235,6 +235,7 @@
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; }; 048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
048B2A442BC7901900A93BF0 /* YHHomeWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */; }; 048B2A442BC7901900A93BF0 /* YHHomeWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */; };
048B2A462BC7912400A93BF0 /* YHWebModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A452BC7912400A93BF0 /* YHWebModel.swift */; }; 048B2A462BC7912400A93BF0 /* YHWebModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A452BC7912400A93BF0 /* YHWebModel.swift */; };
048B2A482BC7CE4800A93BF0 /* YHFourKingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */; };
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; }; 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; };
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; }; 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; };
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; }; 049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; };
...@@ -676,6 +677,7 @@ ...@@ -676,6 +677,7 @@
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; }; 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewModel.swift; sourceTree = "<group>"; }; 048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewModel.swift; sourceTree = "<group>"; };
048B2A452BC7912400A93BF0 /* YHWebModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebModel.swift; sourceTree = "<group>"; }; 048B2A452BC7912400A93BF0 /* YHWebModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebModel.swift; sourceTree = "<group>"; };
048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFourKingViewController.swift; sourceTree = "<group>"; };
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; }; 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; };
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; }; 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; };
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; }; 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; };
...@@ -2210,6 +2212,7 @@ ...@@ -2210,6 +2212,7 @@
A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */, A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */,
044E1E802BC3BBC200A3B4AF /* YHSearchInfomationVC.swift */, 044E1E802BC3BBC200A3B4AF /* YHSearchInfomationVC.swift */,
A5A4FD622BC79901001EF9F7 /* YHConfigManager.swift */, A5A4FD622BC79901001EF9F7 /* YHConfigManager.swift */,
048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2609,6 +2612,7 @@ ...@@ -2609,6 +2612,7 @@
A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */, A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */, A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */, A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */,
048B2A482BC7CE4800A93BF0 /* YHFourKingViewController.swift in Sources */,
045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */, 045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */,
A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */, A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */, A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
......
//
// YHFourKingViewController.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFourKingViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var id = 3
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHFourKingViewController {
func loadData() {
homeViewModel.getHomeClassify{[weak self] success, error in
guard let self = self, let classify = self.homeViewModel.classify else { return }
for item in classify {
let model = item as YHHomeClassifyModel
if model.id == self.id {
gk_navTitle = model.name
self.sectionView.items = model.children
let classifyID = model.children.first?.id ?? 0
self.homeViewModel.getList(classifyID) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
}
}
}
}
}
func setupUI() {
gk_navBarAlpha = 1
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
self.homeViewModel.getList(model.id) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
}
}
return view
}()
view.addSubview(homeTableView)
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
}
homeTableView.delegate = self
homeTableView.dataSource = self
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHFourKingViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 48
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return sectionView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return KScreenHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.selectionStyle = .none
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
...@@ -111,17 +111,17 @@ private extension YHHomePageViewController { ...@@ -111,17 +111,17 @@ private extension YHHomePageViewController {
extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource { extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.viewModel.arrHomeNewsData.count return self.viewModel.arrHomeNewsData?.count ?? 0
} }
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell
cell.listModel = self.viewModel.arrHomeNewsData[indexPath.row] cell.listModel = self.viewModel.arrHomeNewsData?[indexPath.row]
return cell return cell
} }
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = self.viewModel.arrHomeNewsData[indexPath.row] else { return } guard let model = self.viewModel.arrHomeNewsData?[indexPath.row] else { return }
let vc = YHHomeWebViewController() let vc = YHHomeWebViewController()
vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)" vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)"
...@@ -132,7 +132,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa ...@@ -132,7 +132,7 @@ extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDa
extension YHHomePageViewController : CollectionViewWaterfallLayoutDelegate { extension YHHomePageViewController : CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize { func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = self.viewModel.arrHomeNewsData[indexPath.row] else { return CGSize.zero } guard let model = self.viewModel.arrHomeNewsData?[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell) return CGSize(width: model.img_width_cell, height: model.img_height_cell)
} }
} }
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
import UIKit import UIKit
class YHHomeListTotalModel: YHBaseModel {
var data: [YHHomeListModel] = []
var total: Int = 0
}
class YHHomeListModel: YHBaseModel { class YHHomeListModel: YHBaseModel {
var collect_count: Int = 0 var collect_count: Int = 0
var id: Int = 0 var id: Int = 0
......
...@@ -57,10 +57,19 @@ private extension YHHomeKingKongBlockView { ...@@ -57,10 +57,19 @@ private extension YHHomeKingKongBlockView {
if let tag = gestureRecognizer.view?.tag { if let tag = gestureRecognizer.view?.tag {
switch tag { switch tag {
case 0: case 0:
let vc = YHFourKingViewController()
vc.id = 3
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 身份福利") printLog("跳转 身份福利")
case 1: case 1:
let vc = YHFourKingViewController()
vc.id = 4
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 办理攻略") printLog("跳转 办理攻略")
case 2: case 2:
let vc = YHFourKingViewController()
vc.id = 5
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 客户心声") printLog("跳转 客户心声")
case 3: case 3:
printLog("跳转 香港办事") printLog("跳转 香港办事")
......
...@@ -12,7 +12,7 @@ class YHHomePageViewModel : YHBaseViewModel { ...@@ -12,7 +12,7 @@ class YHHomePageViewModel : YHBaseViewModel {
//数据源 //数据源
var configModel:YHConfigModel? var configModel:YHConfigModel?
var arrHomeNewsData: [YHHomeListModel?] = [] var arrHomeNewsData: [YHHomeListModel]?
var banners: [YHBannerModel]? var banners: [YHBannerModel]?
var classify: [YHHomeClassifyModel]? var classify: [YHHomeClassifyModel]?
...@@ -53,16 +53,16 @@ extension YHHomePageViewModel { ...@@ -53,16 +53,16 @@ extension YHHomePageViewModel {
//1. json字符串 转 对象 //1. json字符串 转 对象
if json.code == 200 { if json.code == 200 {
let dic = json.data let dic = json.data
guard let result = [YHHomeListModel].deserialize(from: dic as? [Any]) else { guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = [] self.arrHomeNewsData = []
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
for item in result { for item in result.data {
item?.calHeightParam() item.calHeightParam()
} }
self.arrHomeNewsData = result self.arrHomeNewsData = result.data
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
self.arrHomeNewsData = [] self.arrHomeNewsData = []
...@@ -131,14 +131,16 @@ extension YHHomePageViewModel { ...@@ -131,14 +131,16 @@ extension YHHomePageViewModel {
//1. json字符串 转 对象 //1. json字符串 转 对象
if json.code == 200 { if json.code == 200 {
let dic = json.data let dic = json.data
guard let result = [YHHomeListModel].deserialize(from: dic as? [Any]) else { guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
for item in result {
item?.calHeightParam() for item in result.data {
item.calHeightParam()
} }
self.arrHomeNewsData = result self.arrHomeNewsData = result.data
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
......
...@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController { ...@@ -63,7 +63,7 @@ extension YHServerHKLifeViewController {
let classifyID = model.children.first?.id ?? 0 let classifyID = model.children.first?.id ?? 0
self.homeViewModel.getList(classifyID) {[weak self] success, error in self.homeViewModel.getList(classifyID) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
} }
} }
} }
...@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController { ...@@ -80,7 +80,7 @@ extension YHServerHKLifeViewController {
guard let self = self else { return } guard let self = self else { return }
self.homeViewModel.getList(model.id) {[weak self] success, error in self.homeViewModel.getList(model.id) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
} }
} }
return view return view
......
...@@ -47,7 +47,7 @@ extension YHServiceListViewController { ...@@ -47,7 +47,7 @@ extension YHServiceListViewController {
let classifyID = model.children.first?.id ?? 0 let classifyID = model.children.first?.id ?? 0
self.homeViewModel.getList(classifyID) {[weak self] success, error in self.homeViewModel.getList(classifyID) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
} }
} }
} }
...@@ -89,7 +89,7 @@ extension YHServiceListViewController { ...@@ -89,7 +89,7 @@ extension YHServiceListViewController {
guard let self = self else { return } guard let self = self else { return }
self.homeViewModel.getList(model.id) {[weak self] success, error in self.homeViewModel.getList(model.id) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
} }
} }
return view return view
......
...@@ -14,7 +14,7 @@ class YHMsgViewController: YHBaseViewController { ...@@ -14,7 +14,7 @@ class YHMsgViewController: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 1.0 tableView.sectionHeaderHeight = 42.0
tableView.estimatedSectionFooterHeight = 1.0 tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -65,10 +65,17 @@ class YHMsgViewController: YHBaseViewController { ...@@ -65,10 +65,17 @@ class YHMsgViewController: YHBaseViewController {
make.bottom.equalToSuperview().offset(-k_Height_TabBar) make.bottom.equalToSuperview().offset(-k_Height_TabBar)
} }
} }
}
extension YHMsgViewController {
@objc func clean() { @objc func clean() {
} }
@objc func didEnableNotifyBtnClicked() {
}
} }
extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource { extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource {
...@@ -92,7 +99,7 @@ extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -92,7 +99,7 @@ extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource {
} }
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 1.0 return 42.0
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
...@@ -106,7 +113,35 @@ extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -106,7 +113,35 @@ extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView() let view = UIView()
view.backgroundColor = UIColor(hex: 0x3570DC, alpha: 0.06)
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26)
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:13)
label.text = "开启通知,及时掌握最新消息".local
view.addSubview(label)
let enableBtn = UIButton()
enableBtn.setTitle("开启".local, for: .normal)
enableBtn.setTitleColor(UIColor(hex: 0x3570DC), for: .normal)
enableBtn.titleLabel?.font = .PFSC_R(ofSize: 13)
enableBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 12, left: 20, bottom: 12, right: 20)
enableBtn.addTarget(self, action: #selector(didEnableNotifyBtnClicked), for: .touchUpInside)
view.addSubview(enableBtn)
label.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalTo(enableBtn.snp.left).offset(-20)
make.centerY.equalToSuperview()
}
enableBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 26, height: 18))
make.right.equalToSuperview().offset(-20)
make.centerY.equalToSuperview()
}
return view
} }
} }
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