0

I am using PSPDFKit and Xamarin iOS. I would like to have the annotation toolbar automatically show when the ViewController that subclasses PSPDFViewController is shown.

Currently I have:

public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();
            AnnotationButtonItem.FlexibleAnnotationToolbar.ShowToolbar (true, new PSPDFFlexibleToolbarFinishedHandler (((bool finished) => {
            })));
        }

Unfortunately nothing is happening. Anyone have experience getting the toolbar to automatically show?

egfconnor
  • 2,637
  • 1
  • 26
  • 44
  • Hi Peter. Our support contract ended that is why I posted this here. I've put ShowToolbar in another click event for our save button and verified that the method ShowToolbar just plain doesn't do anything. Will have to delay this feature request until we upgrade to PSPDFKit 4 then. – egfconnor Oct 10 '14 at 19:45

1 Answers1

1

You can either do:

myPSPDFViewController.AnnotationButtonItem.Action(myPSPDFViewController.AnnotationButtonItem)

Which feels a bit of a fudge. Or you can create your own PSPDFFlexibleAnnotationToolbar, set it as the toolbar on a PSPDFFlexibleAnnotationToolbarContainer, add that container to your view hierarchy and call tooolbar.Show(true, ...)

Cargowire
  • 1,488
  • 10
  • 21