Commit 4abddffe authored by CZ1004's avatar CZ1004

【优化】去掉首次进入首页充电动画,没有设置的情况下

parent 7e28f310
......@@ -212,11 +212,6 @@ class HomeViewController:BaseViewController {
}
})
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// 总数据 文件数量和文件大小
PhotoAndVideoMananger.mananger.fetchAllFile {[weak self] index, FileSize in
......@@ -234,6 +229,10 @@ class HomeViewController:BaseViewController {
self.homeView?.setTitle()
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// 可能是删除数据,重新获取下
PhotoDataManager.manager.loadFromFileSystem(resultModel: {[weak self] model in
......@@ -278,16 +277,13 @@ class HomeViewController:BaseViewController {
if BatteryMonitorManager.shared.getBatteryIsCharging() {
// 从字典里面取 如果有
var tempModel : ChargeDataModel?
if UserDefaults.standard.object(forKey: "chargePicInfo") == nil {
tempModel = loadVideoItems().first
}else{
if UserDefaults.standard.object(forKey: "chargePicInfo") != nil {
let flag : String = UserDefaults.standard.object(forKey: "chargePicInfo") as! String
tempModel = loadVideoItems()[Int(flag)!]
}
let vc:ChargeInfoViewController = ChargeInfoViewController(model:tempModel, type: ChargeInfoViewController.ChargeInfoType.charge)
self.navigationController?.pushViewController(vc, animated: false)
}
}else {
if HomePayModel.share.isNoAd == false {
HomePayViewController.show {}
......
......@@ -40,7 +40,7 @@ class HomeCollectionViewHeader : UICollectionReusableView {
private var tipLabel:UILabel = {
private lazy var tipLabel:UILabel = {
let label = UILabel()
label.numberOfLines = 0 // 支持多行
label.translatesAutoresizingMaskIntoConstraints = false
......@@ -70,11 +70,12 @@ class HomeCollectionViewHeader : UICollectionReusableView {
}
// 文本
self.addSubview(tipLabel)
self.addSubview(self.tipLabel)
self.tipLabel.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.equalToSuperview().offset(32)
make.height.equalTo(31)
make.width.equalTo(300)
}
self.addSubview(self.subTiplabel)
......@@ -134,11 +135,6 @@ class HomeCollectionViewHeader : UICollectionReusableView {
// 将 attributedText 赋值给 UILabel
self.tipLabel.attributedText = attributedText
}
}
......@@ -316,4 +316,6 @@ extension HomeView:WaterfallMutiSectionDelegate,UICollectionViewDataSource,UICol
}
return CGSize.zero
}
}
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