1. Swift / Говнокод #24591

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 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)
    	}

    Когда-то я это написал Оо

    Запостил: def, 06 Августа 2018

    Комментарии (19) RSS

    Добавить комментарий