Hit Test for non-transparency in Swift


i trying hit test on image have loaded uiimageview. image 1 object 50x50 inside of 300x300 frame. essentially, 300x300 transparent png file object in middle.

want touch or tap registered when user touches object. not actual transparent parts of image.

how can done in swift?
 

you should use hittest method , return view if touch inside "touch" area

see here
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Weird behavior on external monitor

iPhone shuts down randomly, rst vdd_under

OS Version