Thumbnail touch not sensitive - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Thumbnail touch not sensitive

Thumbnail touch not sensitive 1 year 1 month ago #12953

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
My apps has many pdfs. Some pdf only have image. When I open the image pdf, the thumbnail touch will be too slow. Below video link is my situation.
Video



How can I improve it?
Thanks.

Please Log in or Create an account to join the conversation.

Last edit: by manwon.

Thumbnail touch not sensitive 1 year 1 month ago #12957

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 517
  • Karma: 15
  • Thank you received: 57
Hi,

you can edit OnNoneTouchEnd method in PDFView class that recognises single tap event.
You can set the time gap and the maximum finger movement allowed to fire the single tap event:
if( timeStamp - m_tstamp_tap < 0.15 )//single tap
    {
        bool single_tap = true;
        if( dx > 5 || dx < -5 )
            single_tap = false;
        if( dy > 5 || dy < -5 )
            single_tap = false;
        if( single_tap )
        {
            [self onSingleTap:point.x :point.y];
        }
    }

Please Log in or Create an account to join the conversation.

Thumbnail touch not sensitive 1 year 1 month ago #12958

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 36
  • Thank you received: 1
Hello, I don't understand why set the timestamp condition. And what is dx and dy.
Thanks.

Please Log in or Create an account to join the conversation.

Thumbnail touch not sensitive 1 year 1 month ago #12961

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 517
  • Karma: 15
  • Thank you received: 57
the timestamp condition is the time gap allowed from touchesBegan and touchesEnded events (the duration of the finger on the screen).
dx and dy are finger movements gap from touchesBegan and touchesEnded events.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum