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

Pop up menu never shows up

More
9 years 3 months ago #11466 by Shades
Hello,

I would like to show up the pop up menu ( for text annotation and the copy) ,but it never appears when I select a text.

Thank you
More
9 years 3 months ago #11469 by emanuele
Replied by emanuele on topic Pop up menu never shows up
Hi,

are you trying to show the PopupMenu instance like demo project?
More
9 years 3 months ago #11470 by Shades
Replied by Shades on topic Pop up menu never shows up
Yes.
It seems like the long press function is not always working.
More
9 years 3 months ago #11473 by emanuele
Replied by emanuele on topic Pop up menu never shows up
In demo project you can set the time gap to recognize the long press, and now is set to 1 second.
For that reason it's possible that the long press is not called every time, so you can try to keep tapped for 1 second or change this time gap.

You can find the code line
Code:
else if( timeStamp - m_tstamp_tap > 1 )//long pressed
in OnNoneTouchMove method of PDFView class.
You can try to change the value from 1 to a smaller value to change the long press recognition
More
9 years 3 months ago - 9 years 3 months ago #11512 by Shades
Replied by Shades on topic Pop up menu never shows up
Hello,
Indeed in the demo project,when I set the time gap superior to 1,it works.But when I tried it on my own project,I have different values,For example, I get
dx = 272 and dy = 713,using the function blow:
Code:
else if( timeStamp - m_tstamp_tap > 1 )//long pressed { dx = point.x * m_scale - m_tx; dy = point.y * m_scale - m_ty; if( dx < 10 && dx > -10 && dy < 10 && dy > -10 ) { m_status = sta_none; if( m_delegate ) [m_delegate OnLongPressed:point.x :point.y]; } }
Last edit: 9 years 3 months ago by Shades.
More
9 years 3 months ago #11524 by stronglee
Hi,
You can have a try. Add some breakpoint to longPress gesture and popmenu init method
first , check if popmenu and delegate init is ok.
second, print some log to see in demo when gap superior to 1,then dx and dy point is? And check the point where is different in your project.

:)
Time to create page: 0.462 seconds
Powered by Kunena Forum