Commit c5a19981 authored by pete谢兆麟's avatar pete谢兆麟

信息预览添加预览

parent 0144732f
...@@ -43,6 +43,9 @@ class YHPreviewInfoCertificatePictureItemView: UIView { ...@@ -43,6 +43,9 @@ class YHPreviewInfoCertificatePictureItemView: UIView {
lable.contentMode = .scaleAspectFit lable.contentMode = .scaleAspectFit
lable.layer.cornerRadius = kCornerRadius6 lable.layer.cornerRadius = kCornerRadius6
lable.clipsToBounds = true lable.clipsToBounds = true
lable.isUserInteractionEnabled = true
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(frontImagTapped))
lable.addGestureRecognizer(tapGesture)
return lable return lable
}() }()
...@@ -53,6 +56,9 @@ class YHPreviewInfoCertificatePictureItemView: UIView { ...@@ -53,6 +56,9 @@ class YHPreviewInfoCertificatePictureItemView: UIView {
lable.contentMode = .scaleAspectFit lable.contentMode = .scaleAspectFit
lable.layer.cornerRadius = kCornerRadius6 lable.layer.cornerRadius = kCornerRadius6
lable.clipsToBounds = true lable.clipsToBounds = true
lable.isUserInteractionEnabled = true
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(backImagTapped))
lable.addGestureRecognizer(tapGesture)
return lable return lable
}() }()
...@@ -142,6 +148,18 @@ extension YHPreviewInfoCertificatePictureItemView { ...@@ -142,6 +148,18 @@ extension YHPreviewInfoCertificatePictureItemView {
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
} }
@objc func frontImagTapped(gesture: UITapGestureRecognizer) {
let vc = YHImageViewController()
vc.imgString = dataModel?.frontUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
@objc func backImagTapped(gesture: UITapGestureRecognizer) {
let vc = YHImageViewController()
vc.imgString = dataModel?.backUrl
UIViewController.current?.navigationController?.pushViewController(vc)
}
} }
......
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