After successfully building PSPDFKit.iOS.Model.dll and PSPDFKit.iOS.UI.dll you can add stylus support to the framework by following these steps:
- Copy
PSPDFKit.framework
andPSPDFKitUI.framework
into StylusDrivers/externals. - Copy
Extras/StylusSupport/Drivers
(you can find this folder in the dmg you downloaded from your customer portal) into StylusDrivers/externals.
- Visit our stylus support documentation for a list of supported styluses and download links for the vendor SDKs.
- After downloading the vendor SDKs (
.framework
and/or.bundle
files) you integrate them by moving them into the StylusDrivers/externals.
- Switch to the
Xamarin-iOS/StylusDrivers
folder in a terminal. - You can see all available build options by running
$ make
. - To build all drivers call
$ make alldrivers
. To build individual drivers call$ make adonit
for example. - The compiled driver Dlls will be placed in the
Xamarin-iOS/StylusDrivers
folder.
Start by adding the compiled driver Dlls into your own Xamarin.iOS project and add the following using statement:
using PSPDFKit.UI.StylusSupport;
Before creating a PSPDFViewController
, register the driver classes by setting PSPDFKitGlobal.SharedInstance.GetStylusManager ().AvailableDriverClasses
.
PSPDFKitGlobal.SharedInstance.GetStylusManager ().AvailableDriverClasses = new NSOrderedSet (
(INativeObject) new Class (typeof (PSPDFAdonitStylusDriver))
);
If you use PSPDFAnnotationToolbar
, show the stylus button by setting ShowingStylusButton
to true
.
To see this in action, take a look at our example code.