I have an issue with the swipe gesture recognizer in Xcode. What I want to let the code do is the following: When you swipe upwards a view with floating buttons disappears. When you swipe downwards, the floating buttons appear again. But of course, it doesn't work :D
I can change the position of the view manually in StoryBoard without messing the constraints up.
Everything is connected properly.
It doesn't give an error message either, just doesn't work.
What can I do?
I use the following code:
import UIKit
class HomeViewController: UIViewController {
@IBOutlet weak var BottomFloatersBottomLayoutGuide: NSLayoutConstraint!
@IBAction func UpSwipe(_ sender: UISwipeGestureRecognizer) {
BottomFloatersBottomLayoutGuide.constant = -400
}
@IBAction func DownSwipe(_ sender: UISwipeGestureRecognizer) {
BottomFloatersBottomLayoutGuide.constant = 0
}
}