- 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
Highlight function
IP: 192.168.0.71
8 years 7 months ago #12724
by manwon
Highlight function was created by manwon
I want to implement the highlight function. I saw the Highlight function in RDPDFViewController.m. But not work.
I don't know how can I implement it.
Code:
[m_view vSelMarkup:annotUnderlineColor :0];
[popupMenu1 dismiss];
if(m_bSel)
{
m_bSel = false;
[m_view vSelEnd];
}
IP: 192.168.0.71
8 years 7 months ago #12725
by emanuele
Replied by emanuele on topic Highlight function
Hi,
what is the issue exactly?
Using demo project you can select text then tap on "HL" option to highlight.
If you need to customize this feature, you can take a look at OnLongPressed method in RDPDFViewController class (enable the text selection mode), to better understand how text selection and highlight works.
what is the issue exactly?
Using demo project you can select text then tap on "HL" option to highlight.
If you need to customize this feature, you can take a look at OnLongPressed method in RDPDFViewController class (enable the text selection mode), to better understand how text selection and highlight works.
IP: 192.168.0.71
8 years 7 months ago - 8 years 7 months ago #12726
by manwon
Replied by manwon on topic Highlight function
Sorry, I said clearly again.
I want to add the toolbar item on the toolbar including the highlight button. I want to press the highlight button to do the highlight function
I want to add the toolbar item on the toolbar including the highlight button. I want to press the highlight button to do the highlight function
Last edit: 8 years 7 months ago by manwon.
IP: 192.168.0.71
8 years 7 months ago #12729
by emanuele
Replied by emanuele on topic Highlight function
Here is a quick explanation of markup annotations:
vSelMarkup method has 2 parameters: color and type.
- Color parameter allows you to set annotation color, in this case you can set it dynamically to have different colours.
- Type parameter is used to set the annotation type:
0: Highlight
1: Underline
2: StrikeOut
3: Highlight without round corner
4: Squiggly underline.
In demo project you can choose which type of annotation apply to selected text using the choice menu.
You can modify this behaviour to satisfy your needs, for example you can call the highlight in OnSelEnd method of RDPDFViewController to skip the choice menu.
vSelMarkup method has 2 parameters: color and type.
- Color parameter allows you to set annotation color, in this case you can set it dynamically to have different colours.
- Type parameter is used to set the annotation type:
0: Highlight
1: Underline
2: StrikeOut
3: Highlight without round corner
4: Squiggly underline.
In demo project you can choose which type of annotation apply to selected text using the choice menu.
You can modify this behaviour to satisfy your needs, for example you can call the highlight in OnSelEnd method of RDPDFViewController to skip the choice menu.
IP: 192.168.0.71
8 years 7 months ago #12730
by manwon
Replied by manwon on topic Highlight function
Hello
I want to highlight more text in a time. But this function may be highlight a text in a time. How can I modify it?
I want to highlight more text in a time. But this function may be highlight a text in a time. How can I modify it?
IP: 192.168.0.71
8 years 7 months ago #12731
by emanuele
Replied by emanuele on topic Highlight function
When you call highlight method, the selection mode will end:
if(m_bSel)
{
m_bSel = false;
[m_view vSelEnd];
}
You can change this behaviour and exit from this mode only when you need it
if(m_bSel)
{
m_bSel = false;
[m_view vSelEnd];
}
You can change this behaviour and exit from this mode only when you need it
Time to create page: 0.410 seconds