Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Thumbnail touch not sensitive 6 years 6 months ago #12953

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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 6 years 6 months ago #12957

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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 6 years 6 months ago #12958

  • manwon
  • manwon's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • 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 6 years 6 months ago #12961

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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