|
@@ -49,6 +49,8 @@ extension TSTitleView {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+import Shimmer
|
|
|
class TSTitleMoreView: TSTitleView {
|
|
|
|
|
|
var isAnimationArrow:Bool = false
|
|
@@ -64,21 +66,21 @@ class TSTitleMoreView: TSTitleView {
|
|
|
}
|
|
|
|
|
|
lazy var imageView:UIImageView = {
|
|
|
- let imageView = UIImageView.createImageView(imageName: "gray_right_arrow")
|
|
|
-
|
|
|
- if isAnimationArrow {
|
|
|
- imageView.animationImages = [.rightArrow0,.rightArrow1,.rightArrow2,.rightArrow3]
|
|
|
- imageView.animationDuration = 1.0
|
|
|
- imageView.startAnimating()
|
|
|
- }
|
|
|
-
|
|
|
+// let imageView = UIImageView.createImageView(imageName: "gray_right_arrow")
|
|
|
+ let imageView = UIImageView.createImageView(image:.whiteRightArrow.withRenderingMode(.alwaysTemplate))
|
|
|
+// if isAnimationArrow {
|
|
|
+// imageView.animationImages = [.rightArrow0,.rightArrow1,.rightArrow2,.rightArrow3]
|
|
|
+// imageView.animationDuration = 1.0
|
|
|
+// imageView.startAnimating()
|
|
|
+// }
|
|
|
+ imageView.tintColor = .themeColor
|
|
|
return imageView
|
|
|
}()
|
|
|
|
|
|
|
|
|
lazy var rightLabel: UILabel = {
|
|
|
let label = UILabel.createLabel(text: "See all".localized,font: .font(size: 12),textColor: .white.withAlphaComponent(isAnimationArrow ? 0.8 : 0.4))
|
|
|
-
|
|
|
+ label.textColor = .themeColor
|
|
|
return label
|
|
|
}()
|
|
|
|
|
@@ -102,11 +104,20 @@ class TSTitleMoreView: TSTitleView {
|
|
|
override func creatUI() {
|
|
|
super.creatUI()
|
|
|
|
|
|
- contentView.addSubview(moreView)
|
|
|
- moreView.snp.makeConstraints { make in
|
|
|
+ let shimmerView = FBShimmeringView()
|
|
|
+ shimmerView.contentView = moreView // 可以是 UILabel、UIView 等
|
|
|
+ shimmerView.shimmeringSpeed = 150
|
|
|
+ contentView.addSubview(shimmerView)
|
|
|
+ shimmerView.snp.makeConstraints { make in
|
|
|
make.trailing.equalTo(-6)//16
|
|
|
make.centerY.equalTo(titleLab)
|
|
|
}
|
|
|
+
|
|
|
+ moreView.snp.makeConstraints { make in
|
|
|
+ make.edges.equalToSuperview()
|
|
|
+ }
|
|
|
+
|
|
|
+ shimmerView.isShimmering = isAnimationArrow // 开启扫光效果
|
|
|
}
|
|
|
|
|
|
@objc private func clickMoreView() {
|