- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
func createCrossForRemovingImage() {
var firstCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
firstCrossView.layer.cornerRadius = 15
firstCrossView.image = UIImage(named: "Cross")
firstCrossView.tag = 200
firstCrossView.userInteractionEnabled = true
firstCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
firstCrossView.hidden = true
var secondCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
secondCrossView.layer.cornerRadius = 15
secondCrossView.image = UIImage(named: "Cross")
secondCrossView.tag = 200
secondCrossView.userInteractionEnabled = true
secondCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
secondCrossView.hidden = true
var thirdCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
thirdCrossView.layer.cornerRadius = 15
thirdCrossView.image = UIImage(named: "Cross")
thirdCrossView.tag = 200
thirdCrossView.userInteractionEnabled = true
thirdCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
thirdCrossView.hidden = true
var fourthCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
fourthCrossView.layer.cornerRadius = 15
fourthCrossView.image = UIImage(named: "Cross")
fourthCrossView.tag = 200
fourthCrossView.userInteractionEnabled = true
fourthCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
fourthCrossView.hidden = true
firstImageView.addSubview(firstCrossView)
secondImageView.addSubview(secondCrossView)
thirdImageView.addSubview(thirdCrossView)
fourthImageView.addSubview(fourthCrossView)
}