Created
July 6, 2020 14:07
-
-
Save TarasShu/ec1aba0dc09f26c6b8c47144ea363d94 to your computer and use it in GitHub Desktop.
d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lass myViewController: UIViewController{ | |
@IBOutlet weak var viewForLayer: UIView! | |
var layer: CALayer { | |
return viewForLayer.layer | |
} | |
func setUpLayer() { | |
layer.contents = UIImage(named: "omry")?.cgImage // adress - | |
} | |
let lable = UILabel() | |
//let image = UIImage() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.backgroundColor = .systemRed | |
view.addSubview(lable) | |
lable.text = "weqqw" | |
lable.frame = CGRect(x: 0, y: 0, width: 1000, height: 100) | |
} | |
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { | |
// lable.backgroundColor = .systemGray | |
// lable.frame.origin.y += 100 | |
// lable.text = "Don't touch me " | |
setUpLayer() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment