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