I have a UIView object that is hidden from start, and then when a Round Rect Button is pressed, the UIView object appears. So that all works well.
What I want is, whenever the Round Rect Button is released, the UIView object hides itself again.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A UIButton is a subclass of UIControl and can respond to a number of Touch events.
You can specify which touch events the button instance responds to through creating IBActions in the storyboard or through code. The easiest way is through using the Storyboard.
So to achieve what you describe, you would have (at least) two IBActions – one for the ‘touch down’ event and one for the ‘touch up’ event. You should also handle other event cases like ‘touch canceled’, etc.
Kinds of events possible for control objects.