Commit 5d4da860 authored by lujunye's avatar lujunye

l;i;lj;lh;h;

parent a35fa39b
...@@ -10,6 +10,7 @@ import UIKit ...@@ -10,6 +10,7 @@ import UIKit
protocol DZSH_UPLOAD_IMG_CELL_Delegate { protocol DZSH_UPLOAD_IMG_CELL_Delegate {
func DZSH_UPLOAD_IMG_CELL_Btn_Action(select:Int,cell:DZSH_UPLOAD_IMG_CELL) func DZSH_UPLOAD_IMG_CELL_Btn_Action(select:Int,cell:DZSH_UPLOAD_IMG_CELL)
func DZSH_UPLOAD_IMG_CELL_Input(str:String,cell:DZSH_UPLOAD_IMG_CELL) func DZSH_UPLOAD_IMG_CELL_Input(str:String,cell:DZSH_UPLOAD_IMG_CELL)
func DZSH_UPLOAD_IMG_CELL_SelectImg(cell:DZSH_UPLOAD_IMG_CELL)
} }
class DZSH_UPLOAD_IMG_CELL: UITableViewCell { class DZSH_UPLOAD_IMG_CELL: UITableViewCell {
@IBAction func btn_click(_ sender: UIButton) { @IBAction func btn_click(_ sender: UIButton) {
...@@ -29,8 +30,13 @@ class DZSH_UPLOAD_IMG_CELL: UITableViewCell { ...@@ -29,8 +30,13 @@ class DZSH_UPLOAD_IMG_CELL: UITableViewCell {
super.awakeFromNib() super.awakeFromNib()
self.selectionStyle = .none self.selectionStyle = .none
input_tf.addTarget(self, action: #selector(textChange(tf:)), for: .allEditingEvents) input_tf.addTarget(self, action: #selector(textChange(tf:)), for: .allEditingEvents)
let tap = UITapGestureRecognizer(target: self, action: #selector(tapAction))
img_view.addGestureRecognizer(tap)
// Initialization code // Initialization code
} }
@objc func tapAction(){
delegate?.DZSH_UPLOAD_IMG_CELL_SelectImg(cell: self)
}
@objc func textChange(tf:UITextField){ @objc func textChange(tf:UITextField){
delegate?.DZSH_UPLOAD_IMG_CELL_Input(str: tf.text!, cell: self) delegate?.DZSH_UPLOAD_IMG_CELL_Input(str: tf.text!, cell: self)
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shangchuantupian" translatesAutoresizingMaskIntoConstraints="NO" id="8TI-5w-kaC"> <imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shangchuantupian" translatesAutoresizingMaskIntoConstraints="NO" id="8TI-5w-kaC">
<rect key="frame" x="132.5" y="85.5" width="110" height="110"/> <rect key="frame" x="132.5" y="85.5" width="110" height="110"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="110" id="Rk4-Ab-dYv"/> <constraint firstAttribute="height" constant="110" id="Rk4-Ab-dYv"/>
......
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
// //
import UIKit import UIKit
protocol DZSH_Upload_Cer_Cell_Delegate {
func DZSH_Upload_Cer_Cell_UpLoadImg(cell:DZSH_Upload_Cer_Cell)
}
class DZSH_Upload_Cer_Cell: UITableViewCell { class DZSH_Upload_Cer_Cell: UITableViewCell {
var delegate:DZSH_Upload_Cer_Cell_Delegate?
@IBOutlet weak var img_view: UIImageView! @IBOutlet weak var img_view: UIImageView!
@IBOutlet weak var nameLbl: UILabel! @IBOutlet weak var nameLbl: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
...@@ -17,6 +19,12 @@ class DZSH_Upload_Cer_Cell: UITableViewCell { ...@@ -17,6 +19,12 @@ class DZSH_Upload_Cer_Cell: UITableViewCell {
self.selectionStyle = .none self.selectionStyle = .none
// Initialization code // Initialization code
let tap = UITapGestureRecognizer(target: self, action: #selector(tapAction))
img_view.addGestureRecognizer(tap)
// Initialization code
}
@objc func tapAction(){
delegate?.DZSH_Upload_Cer_Cell_UpLoadImg(cell: self)
} }
override func setSelected(_ selected: Bool, animated: Bool) { override func setSelected(_ selected: Bool, animated: Bool) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="upload_1" translatesAutoresizingMaskIntoConstraints="NO" id="HUt-8u-7iR"> <imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="upload_1" translatesAutoresizingMaskIntoConstraints="NO" id="HUt-8u-7iR">
<rect key="frame" x="75" y="43.5" width="225" height="125"/> <rect key="frame" x="75" y="43.5" width="225" height="125"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="225" id="azg-mK-lWG"/> <constraint firstAttribute="width" constant="225" id="azg-mK-lWG"/>
......
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