Advertisement
Guest User

Untitled

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