Pop up menu never shows up - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1
  • 2

TOPIC: Pop up menu never shows up

Pop up menu never shows up 2 years 3 months ago #11466

  • Shades
  • Shades's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 37
  • Thank you received: 0
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

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

Pop up menu never shows up 2 years 3 months ago #11469

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 543
  • Karma: 21
  • Thank you received: 65
Hi,

are you trying to show the PopupMenu instance like demo project?

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

Pop up menu never shows up 2 years 3 months ago #11470

  • Shades
  • Shades's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 37
  • Thank you received: 0
Yes.
It seems like the long press function is not always working.

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

Pop up menu never shows up 2 years 3 months ago #11473

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 543
  • Karma: 21
  • Thank you received: 65
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
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

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

Pop up menu never shows up 2 years 3 months ago #11512

  • Shades
  • Shades's Avatar Topic Author
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 37
  • Thank you received: 0
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:
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];
            }
        }

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

Last edit: by Shades.

Pop up menu never shows up 2 years 3 months ago #11524

  • stronglee
  • stronglee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 92
  • Karma: 1
  • Thank you received: 2
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.

:)

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum