修复及新增:

1,修正空间拍摄,图片视频过滤页面的图片的空间文本隐藏及显示;
2,增加空间拍摄,图片视图过滤页面的视频时长的文本显示
This commit is contained in:
bluesea 2024-03-06 18:31:38 +08:00
parent 1aac7eff5f
commit 89e93446ab
5 changed files with 51 additions and 8 deletions

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Frame.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -90,12 +90,7 @@ class CCSpaceAlbumFliterPopView: UIView {
lazy var filtersButton: UIButton = { lazy var filtersButton: UIButton = {
let button = UIButton.init() let button = UIButton.init()
button.backgroundColor = .green button.setImage(UIImage(named: "photomoreBtn"), for: .normal)
button.setImage(UIImage(named: "filters_button"), for: .normal)
// button.setTitle("", for: .normal)
// button.setTitleColor(KMain_Color, for: .normal)
// button.titleLabel?.font = KFont_Medium(16)
// button.contentHorizontalAlignment = .center
button.addTarget(self, action: #selector(filtersButtonAction), for: .touchUpInside) button.addTarget(self, action: #selector(filtersButtonAction), for: .touchUpInside)
return button return button
@ -455,6 +450,8 @@ extension CCSpaceAlbumFliterPopView:UICollectionViewDataSource, UICollectionView
// cell.frameCountLabel.text = "" // cell.frameCountLabel.text = ""
// }else{ // }else{
cell.frameCountLabel.text = "空间" cell.frameCountLabel.text = "空间"
cell.frameCountLabel.isHidden = false
cell.timeLabel.isHidden = true
// } // }
@ -463,7 +460,10 @@ extension CCSpaceAlbumFliterPopView:UICollectionViewDataSource, UICollectionView
let time:Double = Double(model.itemAsset!.duration) let time:Double = Double(model.itemAsset!.duration)
let timeStr:String = self.transToHourMinSec(second:Int(time)) let timeStr:String = self.transToHourMinSec(second:Int(time))
cell.frameCountLabel.text = timeStr // cell.frameCountLabel.text = timeStr
cell.frameCountLabel.isHidden = true
cell.timeLabel.isHidden = false
cell.timeLabel.text = timeStr
} }
@ -550,6 +550,18 @@ class CCSpaceAlbumFliterCollectionCell: UICollectionViewCell {
return label return label
}() }()
let timeLabel: UILabel = {
let label = UILabel()
label.textColor = .white
label.backgroundColor = UIColor(hexString: "#383739")
label.textAlignment = .center
label.font = UIFont.boldSystemFont(ofSize: 12)
label.layer.cornerRadius = 8
label.adjustsFontSizeToFitWidth = true
label.layer.masksToBounds = true
return label
}()
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
setupViews() setupViews()
@ -563,9 +575,12 @@ class CCSpaceAlbumFliterCollectionCell: UICollectionViewCell {
private func setupViews() { private func setupViews() {
addSubview(imageView) addSubview(imageView)
addSubview(frameCountLabel) addSubview(frameCountLabel)
addSubview(timeLabel);
imageView.translatesAutoresizingMaskIntoConstraints = false imageView.translatesAutoresizingMaskIntoConstraints = false
frameCountLabel.translatesAutoresizingMaskIntoConstraints = false frameCountLabel.translatesAutoresizingMaskIntoConstraints = false
timeLabel.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([ NSLayoutConstraint.activate([
imageView.topAnchor.constraint(equalTo: topAnchor), imageView.topAnchor.constraint(equalTo: topAnchor),
@ -576,7 +591,12 @@ class CCSpaceAlbumFliterCollectionCell: UICollectionViewCell {
frameCountLabel.topAnchor.constraint(equalTo: topAnchor, constant: 8), frameCountLabel.topAnchor.constraint(equalTo: topAnchor, constant: 8),
frameCountLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 8), frameCountLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 8),
frameCountLabel.widthAnchor.constraint(equalToConstant: 40), frameCountLabel.widthAnchor.constraint(equalToConstant: 40),
frameCountLabel.heightAnchor.constraint(equalToConstant: 20) frameCountLabel.heightAnchor.constraint(equalToConstant: 20),
timeLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -8),
timeLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -8),
timeLabel.widthAnchor.constraint(equalToConstant: 40),
timeLabel.heightAnchor.constraint(equalToConstant: 20)
]) ])
} }
} }