@@ -220,11 +220,11 @@ - (void)setAllowedMenuActions:(id)arg {
220220 }
221221}
222222
223- - (void )setScrollingEnabled : (id )args {
224- ENSURE_UI_THREAD (setScrollingEnabled , args);
223+ - (void )setScrollEnabled : (id )args {
224+ ENSURE_UI_THREAD (setScrollEnabled , args);
225225
226226 NSUInteger pageValue = [PSPDFUtils intValue: args onPosition: 0 ];
227- [_controller setScrollingEnabled : pageValue];
227+ [_controller.documentViewController setScrollEnabled : pageValue];
228228}
229229
230230- (void )scrollToPage : (id )args {
@@ -287,7 +287,7 @@ - (void)saveAnnotations:(id)args {
287287 ENSURE_UI_THREAD (saveAnnotations, args);
288288
289289 NSError *error = nil ;
290- BOOL success = [self .controller.document save : &error];
290+ BOOL success = [self .controller.document saveWithOptions: nil error : &error];
291291 if (!success && self.controller .configuration .isTextSelectionEnabled ) {
292292 PSCLog (@" Saving annotations failed: %@ " , [error localizedDescription ]);
293293 }
@@ -413,7 +413,7 @@ - (TiProxy *)eventProxy {
413413}
414414
415415// / delegate for tapping on an annotation. If you don't implement this or return false, it will be processed by default action (scroll to page, ask to open Safari)
416- - (BOOL )pdfViewController : (PSPDFViewController *)pdfController didTapOnAnnotation : (PSPDFAnnotation *)annotation annotationPoint : (CGPoint)annotationPoint annotationView : (UIView<PSPDFAnnotationViewProtocol > *)annotationView pageView : (PSPDFPageView *)pageView viewPoint : (CGPoint)viewPoint {
416+ - (BOOL )pdfViewController : (PSPDFViewController *)pdfController didTapOnAnnotation : (PSPDFAnnotation *)annotation annotationPoint : (CGPoint)annotationPoint annotationView : (UIView<PSPDFAnnotationPresenting > *)annotationView pageView : (PSPDFPageView *)pageView viewPoint : (CGPoint)viewPoint {
417417 NSParameterAssert ([pdfController isKindOfClass: [TIPSPDFViewController class ]]);
418418
419419 NSMutableDictionary *eventDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInteger: pageView.pageIndex], @" page" , nil ];
@@ -482,7 +482,7 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didChangeViewMode
482482 }
483483}
484484
485- - (UIView <PSPDFAnnotationViewProtocol > *)pdfViewController : (PSPDFViewController *)pdfController annotationView : (UIView <PSPDFAnnotationViewProtocol > *)annotationView forAnnotation : (PSPDFAnnotation *)annotation onPageView : (PSPDFPageView *)pageView {
485+ - (UIView <PSPDFAnnotationPresenting > *)pdfViewController : (PSPDFViewController *)pdfController annotationView : (UIView <PSPDFAnnotationPresenting > *)annotationView forAnnotation : (PSPDFAnnotation *)annotation onPageView : (PSPDFPageView *)pageView {
486486
487487 if (annotation.type == PSPDFAnnotationTypeLink && [annotationView isKindOfClass: [PSPDFLinkAnnotationView class ]]) {
488488 PSPDFLinkAnnotationView *linkAnnotation = (PSPDFLinkAnnotationView *)annotationView;
@@ -496,35 +496,35 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didChangeViewMode
496496 return annotationView;
497497}
498498
499- - (BOOL )pdfViewController : (PSPDFViewController *)pdfController shouldShowHUD : (BOOL )animated {
500- if ([[self eventProxy ] _hasListeners: @" shouldShowHUD " ]) {
501- [[self eventProxy ] fireEvent: @" shouldShowHUD " withObject: nil ];
499+ - (BOOL )pdfViewController : (PSPDFViewController *)pdfController shouldShowUserInterface : (BOOL )animated {
500+ if ([[self eventProxy ] _hasListeners: @" shouldShowUserInterface " ]) {
501+ [[self eventProxy ] fireEvent: @" shouldShowUserInterface " withObject: nil ];
502502 }
503- if ([[self eventProxy ] _hasListeners: @" willShowHUD " ]) {
504- [[self eventProxy ] fireEvent: @" willShowHUD " withObject: nil ];
503+ if ([[self eventProxy ] _hasListeners: @" willShowUserInterface " ]) {
504+ [[self eventProxy ] fireEvent: @" willShowUserInterface " withObject: nil ];
505505 }
506506 return YES ;
507507}
508508
509- - (void )pdfViewController : (PSPDFViewController *)pdfController didShowHUD : (BOOL )animated {
510- if ([[self eventProxy ] _hasListeners: @" didShowHUD " ]) {
511- [[self eventProxy ] fireEvent: @" didShowHUD " withObject: nil ];
509+ - (void )pdfViewController : (PSPDFViewController *)pdfController didShowUserInterface : (BOOL )animated {
510+ if ([[self eventProxy ] _hasListeners: @" didShowUserInterface " ]) {
511+ [[self eventProxy ] fireEvent: @" didShowUserInterface " withObject: nil ];
512512 }
513513}
514514
515- - (BOOL )pdfViewController : (PSPDFViewController *)pdfController shouldHideHUD : (BOOL )animated {
516- if ([[self eventProxy ] _hasListeners: @" shouldHideHUD " ]) {
517- [[self eventProxy ] fireEvent: @" shouldHideHUD " withObject: nil ];
515+ - (BOOL )pdfViewController : (PSPDFViewController *)pdfController shouldHideUserInterface : (BOOL )animated {
516+ if ([[self eventProxy ] _hasListeners: @" shouldHideUserInterface " ]) {
517+ [[self eventProxy ] fireEvent: @" shouldHideUserInterface " withObject: nil ];
518518 }
519- if ([[self eventProxy ] _hasListeners: @" willHideHUD " ]) {
520- [[self eventProxy ] fireEvent: @" willHideHUD " withObject: nil ];
519+ if ([[self eventProxy ] _hasListeners: @" willHideUserInterface " ]) {
520+ [[self eventProxy ] fireEvent: @" willHideUserInterface " withObject: nil ];
521521 }
522522 return YES ;
523523}
524524
525- - (void )pdfViewController : (PSPDFViewController *)pdfController didHideHUD : (BOOL )animated {
526- if ([[self eventProxy ] _hasListeners: @" didHideHUD " ]) {
527- [[self eventProxy ] fireEvent: @" didHideHUD " withObject: nil ];
525+ - (void )pdfViewController : (PSPDFViewController *)pdfController didHideUserInterface : (BOOL )animated {
526+ if ([[self eventProxy ] _hasListeners: @" didHideUserInterface " ]) {
527+ [[self eventProxy ] fireEvent: @" didHideUserInterface " withObject: nil ];
528528 }
529529}
530530
0 commit comments