How to know that if the only visible area of a .png is touched in Xcode

后端 未结 4 1096
死守一世寂寞
死守一世寂寞 2020-11-30 14:44

I have imported a .png image into UIImageView in Xcode and what I want to make is when the image is touched, it will be hidden.

But my problem is that

4条回答
  •  感情败类
    2020-11-30 14:51

    I have taken the liberty of updating 'Danny S's' answer to Swift 5 and removed extraneous code, bug fixed and added some additional clarity to the UX.

    Here's the code:

    https://github.com/ZoeESummers/SOXShapedTapView-Updated.git

提交回复
热议问题