I\'m new to IOS programming, I\'m displaying a view when a button is clicked, using the following code inside the button method.
@IBAction func moreButton(_
You can use the below function some this check on the view name will not work but if you have more than one view the problem you will see that if you tap inside your second view the same action will perform. I would prefer to add tapGesture. This is the other solution.
override func touchesBegan(_ touches: Set, with event: UIEvent?) {
}