Jump to content


Photo

UnimImage - How does one implement Double Tap ?

UnimImage tap

  • Please log in to reply
2 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 02:39 AM

Can some one please show me how to implement Double Tap for a UnimImage - thanks.


  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 28 November 2017 - 03:27 AM

Hi,

 

Try this:

 

1. UnimImage -> ClientEvents -> UniEvents -> function afterCreate:

function afterCreate(sender)
{
    var me = sender;
    me.element.on("doubletap",
        function() {
            ajaxRequest(me, "_doubletap", []);
        }
    );
}

2.

procedure TMainmForm.UnimImage1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = '_doubletap' then
    ShowMessage('dtap');

end;

  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 04:09 AM

Thanks Farshad, but "dtap" by default on iPhone zooms in / zooms out ? Can I override this ?


  • 0

Andy






Also tagged with one or more of these keywords: UnimImage, tap

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users