Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @IBAction func changeBackColorOnTap(_ sender: Any) {
  2. var aquaColor = blueView.backgroundColor
  3.  
  4. if isBlue == true {
  5. blueView.backgroundColor = greenView.backgroundColor
  6. } else {
  7. blueView.backgroundColor = UIColor(red: 0/255.0, green: 128/255.0, blue: 255/255.0, alpha: 1)
  8. }
  9. isBlue = !isBlue
  10. }
  11.  
  12. @IBAction func didBeginPanGesture(_ sender: UIPanGestureRecognizer) {
  13. let point = sender.location(in: view)
  14. greenView.center = CGPoint(x: point.x, y: point.y)
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement