- Posts: 36
- Thank you received: 1
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
Thumbnail touch not sensitive
IP: 192.168.0.71
8 years 5 months ago - 8 years 5 months ago #12953
by manwon
Thumbnail touch not sensitive was created by manwon
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.
Video
How can I improve it?
Thanks.
Last edit: 8 years 5 months ago by manwon.
IP: 192.168.0.71
8 years 5 months ago #12957
by emanuele
Replied by emanuele on topic Thumbnail touch not sensitive
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:
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:
Code:
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];
}
}
IP: 192.168.0.71
8 years 5 months ago #12958
by manwon
Replied by manwon on topic Thumbnail touch not sensitive
Hello, I don't understand why set the timestamp condition. And what is dx and dy.
Thanks.
Thanks.
IP: 192.168.0.71
8 years 5 months ago #12961
by emanuele
Replied by emanuele on topic Thumbnail touch not sensitive
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.
dx and dy are finger movements gap from touchesBegan and touchesEnded events.
Time to create page: 0.546 seconds