public override void DidChangeAnnotation(PSPDFAnnotation annotation, PSPDFAnnotation originalAnnotation, NSArray keyPaths, NSDictionary options) { if(annotation is IKSAnnotation) { Console.WriteLine("Custom annotation changed: " + annotation); } }
public override bool DidTapOnAnnotation(PSPDFViewController pdfController, PSPDFAnnotation annotation, System.Drawing.PointF annotationPoint, PSPDFAnnotationViewProtocol annotationView, PSPDFPageView pageView, System.Drawing.PointF viewPoint) { if(annotation is PSPDFLinkAnnotation) { var linkAnnot = (PSPDFLinkAnnotation)annotation; Console.WriteLine("Tapped a link annotation!"); var alert = new UIAlertView("TapTap", "Tapped link annotation. Target: " + linkAnnot.SiteLinkTarget, null, null, "OK"); alert.Show(); return true; } return false; }
public override bool AddAnnotations(PSPDFAnnotation[] annotations, uint page) { Console.WriteLine ("Overridden AddAnnotations()"); foreach (var annot in annotations) { Console.WriteLine( " {0}, Page: {1}, Absolute Page: {2}, Rect: {3}", annot.AnnotationType, annot.Page, annot.AbsolutePage, annot.Rects); // All added annotations are ours. ((IKSAnnotation)annot).IsCustomAnnotation = true; } this.AddAnnotationsToCache (page, annotations); return true; // TODO: Calling base here crashes with unrecognized selector. But for our case we don't want to call base anyway. //return base.AddAnnotations (annotations, page); }
public KSAnnotationElement(PSPDFAnnotation annot) : base("") { this.annot = annot; this.oImgIcon = new UIImage (); }