Skip to content

Commit

Permalink
优化图片
Browse files Browse the repository at this point in the history
  • Loading branch information
rztime committed Nov 13, 2024
1 parent 5e60b5e commit b044c63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified RZRichTextView/Assets/RZRichTextView.bundle/loaderror@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions RZRichTextView/Classes/RZAttachmentInfoLayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ open class RZAttachmentInfoLayerView: UIView, RZAttachmentInfoLayerProtocol {
guard let info = info else { return }
imageContent.isHidden = info.type == .audio
audioContent.isHidden = info.type != .audio
self.playBtn.isHidden = info.type != .video
switch info.type {
case .image, .video:
if let asset = info.asset {
Expand Down Expand Up @@ -122,7 +121,9 @@ open class RZAttachmentInfoLayerView: UIView, RZAttachmentInfoLayerProtocol {
public var imageView: UIImageView = AnimatedImageView().qcontentMode(.scaleAspectFit).qcornerRadius(3, true)
.qimage(RZRichTextViewConfigure.shared.loadingImage)
/// 播放按钮
var playBtn: UIButton = .init(type: .custom).qimage(RZRichImage.imageWith("play")).qisUserInteractionEnabled(false)
var playBtn: UIButton = .init(type: .custom)
.qimage(RZRichImage.imageWith("play")).qisUserInteractionEnabled(false)
.qisHidden(true)

/// 音频相关view
var nameLabel = UILabel().qfont(.systemFont(ofSize: 12))
Expand Down Expand Up @@ -246,5 +247,6 @@ open class RZAttachmentInfoLayerView: UIView, RZAttachmentInfoLayerProtocol {
self.imageView.snp.makeConstraints { make in
make.height.equalTo(self.imageView.snp.width).multipliedBy(size.height / size.width).priority(.high)
}
self.playBtn.isHidden = info?.type != .video
}
}

0 comments on commit b044c63

Please sign in to comment.