I'm new to PDFTRON and I have been testing it for less than a month now.
all the annotation modifications are done through UImenuItem that appear above the selected annotation.
I wanted to know if it was possible to do it another way. I want to print a toolbar containing all the modification items at the top of the screen when a annotation is selected. (Something like the freehandCreateToolbar in the sources of Tools project but with all the modification items like color, opacity, ect).
The thing is, the only hooks I found are the delegate methods of the toolManager :
annotationAdded, annotationModified and annotationRemoved.
Is there a delegate method or way to execute code when an annotation is selected, then identify it and print this toolbar if the annotation is editable ?
I want to modify the way annotation options appears when selected.
I saw that the UImenuController was created and handled by the Tools framework that I put as a dynamic library in my project.
In order to see this menu not as a UIMenuController but as buttons in a view, will I have to include the whole Tools project to mine (delete the dynamic library) and change all UImenuItem related code to UIbutton one, change the showSelectionMenu in all classes ?
Is there any guide available annotation customization ?
I don’t know if it’s the right way to do it.
Thanks
Le jeudi 20 juillet 2017 22:05:27 UTC+2, Ryan a écrit :
Yes, all of the user interface/experience code is included in the SDK. Either in the sample itself, or in the PDFViewCtrlTools project.
You can modify/extend/replace as you see fit.
Those three callbacks are one place you can use. Or you can edit/replace the control that appears normally when selecting an annotation.
Based on what you described the easiest way would be to modify/replace the existing control that appears when selecting the annotation.