Advertisement
Guest User

Untitled

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