user3675754
user3675754

Reputation: 61

Xcode UIButton appear and disappear TitleLabel Value (button.titleLabel.hidden YES NO)

I have a one UIButton with a value, when you start the app, the TitleLabel of the button has been Hidden “call” (button.titleLabel.hidden=YES).

I have connected the button with a one IBAction (TouchDown) for when the user press the button appear the value / “call” (button.titleLabel.hidden=NO) and disappear with one NSTimer in 3 seconds after call (button.titleLabel.hidden=YES)

If you press one time the button is work good, (appear and disappear) but when you press without release the button and you move outside area and return inside area of the button the Value of Title appear again. Not work (button.titleLabel.hidden=YES)

I tested with another IBAction (Drag enter, Drag exit) in parallel to force the (button.titleLabel.hidden=YES) but the Value of the Title appear. Also take out the Timer but not working…

Please could you help me.

Thanks Edit.

Upvotes: 1

Views: 525

Answers (1)

Abhishek Bedi
Abhishek Bedi

Reputation: 5451

you must have created the button via Storyboard/XIB. Please check the sent events by right-clicking the button and set it to touch down. This should resolve the problem. :)

Upvotes: 1

Related Questions