开发者

How do you display an image when the user touches it and is hidden again when they are not longer touching it?

开发者 https://www.devze.com 2023-02-20 10:42 出处:网络
I am creating an application and I am having trouble finding any information on how the attribute for the image is only displayed when the user hovers over the textbox and is hidden again when the use

I am creating an application and I am having trouble finding any information on how the attribute for the image is only displayed when the user hovers over the textbox and is hidden again when the user is no lon开发者_运维技巧ger touching it.


There are several ways of doing this. I'll give one possibility:

You can use a button and add 2 actions, one for

UIControlEventTouchDown

and one for

UIControlEventTouchUpInside | UIControlEventTouchUpOutside

in the first one you show the image and in the second one you hide the image

0

精彩评论

暂无评论...
验证码 换一张
取 消