Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if isBlue == true {
- blueView.backgroundColor = greenView.backgroundColor
- } else {
- blueView.backgroundColor = UIColor(red: 0/255.0, green: 128/255.0, blue: 255/255.0, alpha: 1)
- }
- isBlue = !isBlue
- }
- @IBAction func didBeginPanGesture(_ sender: UIPanGestureRecognizer) {
- var point = sender.location(in: view)
- blueView.center = CGPoint(x: point.x, y: point.y)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement