0

Currently, I have question buttons bring up a tip view when pressed. Now what I want to do is lock the button after it's been pressed, but after you press the screen once the tip view goes away and the button gets re-enabled. I've figured out to use a tap gesture recognizer, but I don't know where exactly to connect it. I also don't know how to include the button or tip view in the function. I'm fairly new to swift, so I apologize if this is common knowledge that I should know.

olshen
  • 11
  • 2

1 Answers1

0

I'm giving you tips:

  • Add button and your tipView on your main view.

  • set hidden=true for tipView.

  • Add tap gesture and it's method on main view.

  • in Button's action method write code for unhide tipView means here you should write hidden=false for tipView

  • Now again write hidden=true in tap gesture's method that you added in your code.

This is simple tips that might be helpful for you, here you can add animation for hide/show tipView.

iPatel
  • 46,010
  • 16
  • 115
  • 137