Commit 92bec182 authored by CZ1004's avatar CZ1004

Merge branch 'dev_main' into dev_zhaoqian

* dev_main:
  1
  111
parents 9f7d65d9 e8a0ce1e
......@@ -70,6 +70,7 @@ class PMShowImgCell: UICollectionViewCell {
override init(frame: CGRect) {
super.init(frame: frame)
setup()
backgroundColor = .clear
clipsToBounds = true
}
......
......@@ -94,6 +94,7 @@ class PMShowImgVideoController: BaseViewController {
col.delegate = self;
col.dataSource = self;
col.showsHorizontalScrollIndicator = false
col.backgroundColor = .clear
col.isPagingEnabled = true
col.register(PMShowImgCell.self, forCellWithReuseIdentifier: PMShowImgCellID)
col.register(PMShowVideoCell.self, forCellWithReuseIdentifier: PMShowVideoCellID)
......@@ -110,6 +111,7 @@ class PMShowImgVideoController: BaseViewController {
let col = UICollectionView(frame: CGRect(), collectionViewLayout: flowlayout)
col.delegate = self;
col.dataSource = self;
col.register(PMShowItemCell.self, forCellWithReuseIdentifier: PMShowItemCellID)
col.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "UICollectionViewCell")
col.showsHorizontalScrollIndicator = false
......
......@@ -46,12 +46,10 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
self.titleView.titleLabel.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
modelData = getSettingViewInfo()
self.view.addSubview(tableView)
self.tableView.reloadData()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.tableView.reloadData()
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
......@@ -176,6 +174,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
case settingLabels.RemoveAfterImport.rawValue:
SettingConfiguration.share.config.removeImg = !SettingConfiguration.share.config.removeImg
tableView.reloadRows(at: [indexPath], with: .none)
tableView.reloadData()
vibrate()
break
case settingLabels.Widgets.rawValue:
......@@ -218,6 +217,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
case settingLabels.Vibration.rawValue:
SettingConfiguration.share.config.vibration = !(SettingConfiguration.share.config.vibration ?? false)
tableView.reloadRows(at: [indexPath], with: .none)
tableView.reloadData()
vibrate(true)
break
case settingLabels.Resumepurchase.rawValue:
......@@ -285,6 +285,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
}else{
SettingConfiguration.share.config.faceId = false
self.tableView.reloadRows(at: [indexPath], with: .none)
tableView.reloadData()
}
}
......
......@@ -208,7 +208,7 @@ class WidgetViewController: BaseViewController {
private lazy var setWidgetBtn: UIButton = {
let btn = UIButton(type: .custom)
btn.setTitle("Set Widget", for: .normal)
btn.titleLabel?.font = UIFont.systemFont(ofSize: 16)
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
btn.setTitleColor(.white, for: .normal)
btn.addTarget(self, action: #selector(setWidgetTouch), for: .touchUpInside)
view.addSubview(btn)
......
......@@ -29,6 +29,10 @@ class PMScaleImageView: UIView , UIScrollViewDelegate {
size.width = self.width
size.height = size.height * (self.width / (self.icon?.size.width ?? 1))
}
if size.height > self.height {
size.height = self.height
size.width = size.width * (self.height / (self.icon?.size.height ?? 1))
}
self.showImg.snp.remakeConstraints({ make in
make.left.equalToSuperview().offset((self.width - size.width)/2.0 )
make.top.equalToSuperview().offset((self.height - size.height)/2.0 )
......
......@@ -179,7 +179,7 @@ class HapticManager {
}
private lazy var generator: UIImpactFeedbackGenerator = {
let genter = UIImpactFeedbackGenerator(style: .heavy)
let genter = UIImpactFeedbackGenerator(style: .medium)
genter.prepare()
return genter
}()
......
......@@ -16,6 +16,9 @@ class PMFaceIDManger: NSObject {
}
class func request() -> Bool {
if isAvailable() == false {
return false
}
let context = LAContext()
return context.biometricType == .faceID
}
......
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