iOS Question Simplest way to get X Y of touch event on ImageView on iOS

Discussion in 'iOS Questions' started by pierpa, Sep 9, 2019.

  1. pierpa

    pierpa Member Licensed User

    Hello,

    I have a simple app with a simple ImageView control.

    On touch (click) event I want to get the X and Y of the touch/click event.

    Beside this target, I also have an XML file that has poly regions of this ImageView, maybe there is also a library to get directly the touchd/clicked zone.

    What is the simplest way to get the touched zone of my ImageMap?

    Thanks a lot
     
  2. Brandsum

    Brandsum Active Member Licensed User

    use gesture recogniser
     
  3. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Guess, transparent panel over imageview is more simple way to receive Touch (Action As Int, X As Float, Y As Float).
     
    pierpa and Jack Cole like this.
  4. pierpa

    pierpa Member Licensed User

    Thanks a lot @Semen Matusovskiy

    I just noticed this feature in designer.

    Thank you @Brandsum , I prefer this solution because doesn't need libraries.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice