Commit 0dbae644 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:
  // 重命名View
parents 1018f8eb b362cfe1
......@@ -201,6 +201,8 @@
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
04A6715C2B9FE9EA00C1FB91 /* YHUploadContentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */; };
04A6715E2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */; };
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */; };
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */; };
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */; };
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
......@@ -534,6 +536,8 @@
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
04A6715B2B9FE9EA00C1FB91 /* YHUploadContentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUploadContentVC.swift; sourceTree = "<group>"; };
04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileRenameInputView.swift; sourceTree = "<group>"; };
04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEditSheetView.swift; sourceTree = "<group>"; };
04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTwoOptionAlertView.swift; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
......@@ -1121,10 +1125,10 @@
045EEE3D2B9F171A0022A143 /* V */ = {
isa = PBXGroup;
children = (
045EEE412B9F171A0022A143 /* PickerView */,
045EEE3E2B9F171A0022A143 /* YHFormItemAddCell.swift */,
045EEE3F2B9F171A0022A143 /* YHFormItemOnlyDoubleChoiceCell.swift */,
045EEE402B9F171A0022A143 /* YHFormItemTitleCell.swift */,
045EEE412B9F171A0022A143 /* PickerView */,
045EEE462B9F171A0022A143 /* YHFormItemInputTextCell.swift */,
045EEE472B9F171A0022A143 /* YHSaveAndSubmitView.swift */,
045EEE482B9F171A0022A143 /* YHFormItemEnterDetailCell.swift */,
......@@ -1320,6 +1324,8 @@
isa = PBXGroup;
children = (
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */,
04A671612BA058DE00C1FB91 /* YHCertificateEditSheetView.swift */,
04A6715F2BA0280800C1FB91 /* YHFileRenameInputView.swift */,
04A6715D2B9FFCA700C1FB91 /* YHCertificateInfoCell.swift */,
);
path = V;
......@@ -2081,6 +2087,7 @@
045EEEAE2B9F171A0022A143 /* YHWorkHighlightsTableViewCell.swift in Sources */,
045EEF062B9F171A0022A143 /* YHFormItemQuestionsCell.swift in Sources */,
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */,
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
......@@ -2162,6 +2169,7 @@
045EEECB2B9F171A0022A143 /* YHScoreResultBaseModel.swift in Sources */,
045EEEA62B9F171A0022A143 /* YHCompanySelectViewController.swift in Sources */,
045EEEA92B9F171A0022A143 /* YHWorkExperienceListViewController.swift in Sources */,
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */,
A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */,
045EEE882B9F171A0022A143 /* YHPreviewAcademicAndProfessionalQualificationViewController.swift in Sources */,
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
......
......@@ -7,10 +7,29 @@
//
import UIKit
import IQKeyboardManagerSwift
class YHUploadContentVC: YHBaseViewController {
var items:[String] = ["1", "2", "2", "2", "2", "2", "2", "2"]
var renameInputView: YHFileRenameInputView = {
let view = YHFileRenameInputView.inputView(defalutText:"adfasfsf", editBlock: {
text in
print("\(text)")
})
return view
}()
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
let tap = UITapGestureRecognizer(target: self, action: #selector(dismissed))
view.addGestureRecognizer(tap)
view.isHidden = true
return view
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
......@@ -25,7 +44,6 @@ class YHUploadContentVC: YHBaseViewController {
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHCertificateInfoCell.self, forCellReuseIdentifier: YHCertificateInfoCell.cellReuseIdentifier)
let size = headView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize)
let rect = CGRect(x: 0, y: 0, width: 0, height: size.height)
headView.frame = rect
......@@ -93,16 +111,29 @@ class YHUploadContentVC: YHBaseViewController {
super.viewDidLoad()
self.view.backgroundColor = .white
self.gk_navTitle = "上传内容"
addKeyBoardNotify()
createUI()
}
deinit {
removeNotify()
}
func createUI() {
view.addSubview(tableView)
view.addSubview(blackMaskView)
view.addSubview(renameInputView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalTo(view)
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
}
renameInputView.snp.makeConstraints { make in
make.left.right.equalTo(view)
make.height.equalTo(YHFileRenameInputView.height)
make.bottom.equalToSuperview().offset(YHFileRenameInputView.height)
}
}
}
......@@ -179,5 +210,63 @@ extension YHUploadContentVC: UITableViewDelegate, UITableViewDataSource {
return view
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if true {
let items = [YHCertificateEditItem(type:.rename, title:"重命名"),
YHCertificateEditItem(type:.preview, title:"预览"),
YHCertificateEditItem(type:.delete, title:"删除"),
YHCertificateEditItem(type:.cancel, title:"取消")]
YHCertificateEditSheetView.sheetView(items:items) {
[weak self] editType in
guard let self = self else { return }
print("editType:\(editType.rawValue)")
if editType == .rename {
IQKeyboardManager.shared.enable = false
renameInputView.textField.becomeFirstResponder()
}
}.show()
return
}
}
@objc func dismissed() {
renameInputView.textField.resignFirstResponder()
}
}
extension YHUploadContentVC {
func addKeyBoardNotify() {
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification), name: UIResponder.keyboardWillHideNotification, object: nil)
}
func removeNotify() {
NotificationCenter.default.removeObserver(self)
}
@objc func handleKeyboardNotification(_ notification: Notification) {
if let userInfo = notification.userInfo {
guard let keyboardFrame = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as AnyObject).cgRectValue else {return }
let isKeyboardShow = notification.name == UIResponder.keyboardWillShowNotification
self.blackMaskView.isHidden = !isKeyboardShow
let bottomMargin = (isKeyboardShow ? -keyboardFrame.height : YHFileRenameInputView.height)
if !isKeyboardShow {
IQKeyboardManager.shared.enable = true
}
self.renameInputView.snp.updateConstraints { make in
make.bottom.equalToSuperview().offset(bottomMargin)
}
self.view.setNeedsLayout()
self.view.layoutIfNeeded()
}
}
}
//
// YHCertificateActionSheetView.swift
// galaxy
//
// Created by edy on 2024/3/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
/*
【Usage】
let items = [YHCertificateEditItem(type:.rename, title:"重命名"),
YHCertificateEditItem(type:.preview, title:"预览"),
YHCertificateEditItem(type:.delete, title:"删除"),
YHCertificateEditItem(type:.cancel, title:"取消")]
YHCertificateEditSheetView.sheetView(items:items) {
[weak self] editType in
guard let self = self else { return }
print("editType:\(editType.rawValue)")
}.show()
*/
import UIKit
enum YHCertificateEditType:Int {
case rename = 1
case preview = 2
case delete = 3
case cancel = 4
}
class YHCertificateEditItem {
var type: YHCertificateEditType
var title: String
init(type:YHCertificateEditType, title: String) {
self.type = type
self.title = title
}
}
class YHCertificateEditItemView: UIView {
let item: YHCertificateEditItem
lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize:14)
return label
}()
init(item: YHCertificateEditItem) {
self.item = item
super.init(frame:CGRect(x: 0, y: 0, width: KScreenWidth, height: 52.0))
self.tag = item.type.rawValue
self.createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(topLine)
self.titleLabel.text = item.title
if self.item.type == .delete {
titleLabel.textColor = .failColor
} else if self.item.type == .cancel {
titleLabel.textColor = UIColor(hexString:"#909090")
} else {
titleLabel.textColor = .mainTextColor
}
titleLabel.snp.makeConstraints { make in
make.height.equalTo(20)
make.left.right.equalToSuperview()
make.centerY.equalToSuperview()
}
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(24)
make.right.equalToSuperview().offset(-24)
make.top.equalToSuperview()
make.height.equalTo(0.5)
}
}
}
class YHCertificateEditSheetView: UIView {
var items:[YHCertificateEditItem]
var action:((YHCertificateEditType)->())?
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
view.addGestureRecognizer(tap)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "请选择操作"
return label
}()
lazy var closeBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named:"my_cer_sheet_close"), for: .normal)
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
init(items:[YHCertificateEditItem]) {
self.items = items
super.init(frame:UIScreen.main.bounds)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
static func sheetView(items:[YHCertificateEditItem], action:((YHCertificateEditType)->())?) -> YHCertificateEditSheetView {
let view = YHCertificateEditSheetView(items:items)
view.action = action
return view
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(closeBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteContentView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(52.0 + CGFloat(items.count) * 52.0 + k_Height_safeAreaInsetsBottom())
}
titleLabel.snp.makeConstraints { make in
make.height.equalTo(52)
make.left.right.top.equalToSuperview()
}
closeBtn.snp.makeConstraints { make in
make.centerY.equalTo(titleLabel)
make.right.equalToSuperview().offset(-20)
make.width.height.equalTo(24)
}
for (index, item) in items.enumerated() {
let itemView = YHCertificateEditItemView(item:item)
whiteContentView.addSubview(itemView)
let tap = UITapGestureRecognizer(target:self, action:#selector(action(_:)))
itemView.addGestureRecognizer(tap)
itemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(52.0)
make.top.equalTo(titleLabel.snp.bottom).offset(index * 52)
}
}
}
}
extension YHCertificateEditSheetView {
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func action(_ sender:UITapGestureRecognizer) {
if let targetView = sender.view {
let tag = targetView.tag
if let type = YHCertificateEditType(rawValue:tag), let action = action {
action(type)
dismiss()
}
}
}
}
......@@ -18,7 +18,7 @@
import UIKit
enum YHCertificateActionType: Int {
enum YHCertificateUploadType: Int {
case sample = 1
case camera = 2
......@@ -28,10 +28,10 @@ enum YHCertificateActionType: Int {
}
class YHCertificateUploadItem {
var type: YHCertificateActionType
var type: YHCertificateUploadType
var title: String
var subtitle: String
init(type:YHCertificateActionType, title: String, subtitle: String = "") {
init(type:YHCertificateUploadType, title: String, subtitle: String = "") {
self.type = type
self.title = title
self.subtitle = subtitle
......@@ -181,7 +181,7 @@ class YHCertificateUploadSheetView: UIView {
static let sheetView = YHCertificateUploadSheetView(frame:UIScreen.main.bounds)
var action:((YHCertificateActionType)->())?
var action:((YHCertificateUploadType)->())?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
......@@ -253,7 +253,7 @@ class YHCertificateUploadSheetView: UIView {
lazy var templateView: YHCertificateSampleTemplateView = {
let view = YHCertificateSampleTemplateView(frame:CGRectZero)
view.tag = YHCertificateActionType.sample.rawValue
view.tag = YHCertificateUploadType.sample.rawValue
let tap = UITapGestureRecognizer(target:self, action:#selector(action(_:)))
view.addGestureRecognizer(tap)
return view
......@@ -331,7 +331,7 @@ class YHCertificateUploadSheetView: UIView {
extension YHCertificateUploadSheetView {
func show(_ action:((YHCertificateActionType)->())?) {
func show(_ action:((YHCertificateUploadType)->())?) {
self.action = action
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
......@@ -344,7 +344,7 @@ extension YHCertificateUploadSheetView {
if let targetView = sender.view {
let tag = targetView.tag
if let type = YHCertificateActionType(rawValue:tag), let action = action {
if let type = YHCertificateUploadType(rawValue:tag), let action = action {
action(type)
}
}
......
//
// YHFileRenameInputView.swift
// galaxy
//
// Created by edy on 2024/3/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
/*
【Usage】
let view = YHFileRenameInputView.inputView(defalutText:"adfasfsf", editBlock: {
text in
print("\(text)")
})
*/
import UIKit
class YHFileRenameInputView: UIView {
static let height = 217.0
var editBlock:((String?)->())?
lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
view.addGestureRecognizer(tap)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "请选择上传方式"
return label
}()
lazy var closeBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named:"my_cer_sheet_close"), for: .normal)
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return btn
}()
lazy var topLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
lazy var inputContentView: UIView = {
let view = UIView()
view.backgroundColor = .contentBkgColor
view.layer.cornerRadius = 6.0
view.clipsToBounds = true
return view
}()
lazy var textField:UITextField = {
let textField = UITextField()
textField.backgroundColor = .clear
textField.placeholder = "请输入文件名称"
textField.font = UIFont.PFSC_M(ofSize: 16)
textField.tintColor = UIColor.brandMainColor
textField.textColor = UIColor.mainTextColor
// textField.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
// textField.addTarget(self, action: #selector(textFieldEditEnd(textField:)), for: .editingDidEnd)
return textField
}()
lazy var cancelBtn:UIButton = {
let btn = UIButton()
btn.setTitle("取消", for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor.mainTextColor, for: .normal)
btn.backgroundColor = .contentBkgColor
btn.layer.cornerRadius = 6.0
btn.addTarget(self, action: #selector(didClickCancelBtn), for: .touchUpInside)
return btn
}()
lazy var confirmBtn:UIButton = {
let btn = UIButton()
btn.setTitle("确定".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 6.0
btn.addTarget(self, action: #selector(didClickConfirmBtn), for: .touchUpInside)
return btn
}()
override init(frame: CGRect) {
super.init(frame:frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
static func inputView(defalutText:String?, editBlock:((String?)->())?)-> YHFileRenameInputView {
let view = YHFileRenameInputView(frame:CGRect(x: 0, y: 0, width:KScreenWidth, height:Self.height))
view.textField.text = defalutText
view.editBlock = editBlock
return view
}
func createUI() {
self.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(closeBtn)
whiteContentView.addSubview(topLine)
whiteContentView.addSubview(inputContentView)
inputContentView.addSubview(textField)
whiteContentView.addSubview(cancelBtn)
whiteContentView.addSubview(confirmBtn)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(16.0, 16.0));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.snp.makeConstraints { make in
make.left.right.top.bottom.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(52.0)
}
closeBtn.snp.makeConstraints { make in
make.width.height.equalTo(24.0)
make.right.equalToSuperview().offset(-20)
make.centerY.equalTo(titleLabel)
}
topLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalTo(titleLabel.snp.bottom)
make.height.equalTo(1)
}
inputContentView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalTo(topLine.snp.bottom).offset(20)
make.height.equalTo(48)
}
textField.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(20)
make.centerY.equalToSuperview()
}
cancelBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalTo(whiteContentView.snp.centerX).offset(-6)
make.top.equalTo(inputContentView.snp.bottom).offset(30)
make.height.equalTo(45)
}
confirmBtn.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-16)
make.left.equalTo(whiteContentView.snp.centerX).offset(6)
make.top.equalTo(cancelBtn)
make.height.equalTo(45)
}
}
}
extension YHFileRenameInputView {
@objc func dismiss() {
self.textField.resignFirstResponder()
UIApplication.shared.yhKeyWindow()?.endEditing(true)
}
@objc func didClickCancelBtn() {
dismiss()
}
@objc func didClickConfirmBtn() {
dismiss()
if let editBlock = editBlock {
editBlock(textField.text)
}
}
}
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