@@ -220,11 +220,11 @@ - (void)setAllowedMenuActions:(id)arg {
220
220
}
221
221
}
222
222
223
- - (void )setScrollingEnabled : (id )args {
224
- ENSURE_UI_THREAD (setScrollingEnabled , args);
223
+ - (void )setScrollEnabled : (id )args {
224
+ ENSURE_UI_THREAD (setScrollEnabled , args);
225
225
226
226
NSUInteger pageValue = [PSPDFUtils intValue: args onPosition: 0 ];
227
- [_controller setScrollingEnabled : pageValue];
227
+ [_controller.documentViewController setScrollEnabled : pageValue];
228
228
}
229
229
230
230
- (void )scrollToPage : (id )args {
@@ -287,7 +287,7 @@ - (void)saveAnnotations:(id)args {
287
287
ENSURE_UI_THREAD (saveAnnotations, args);
288
288
289
289
NSError *error = nil ;
290
- BOOL success = [self .controller.document save : &error];
290
+ BOOL success = [self .controller.document saveWithOptions: nil error : &error];
291
291
if (!success && self.controller .configuration .isTextSelectionEnabled ) {
292
292
PSCLog (@" Saving annotations failed: %@ " , [error localizedDescription ]);
293
293
}
@@ -413,7 +413,7 @@ - (TiProxy *)eventProxy {
413
413
}
414
414
415
415
// / 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 {
417
417
NSParameterAssert ([pdfController isKindOfClass: [TIPSPDFViewController class ]]);
418
418
419
419
NSMutableDictionary *eventDict = [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInteger: pageView.pageIndex], @" page" , nil ];
@@ -482,7 +482,7 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didChangeViewMode
482
482
}
483
483
}
484
484
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 {
486
486
487
487
if (annotation.type == PSPDFAnnotationTypeLink && [annotationView isKindOfClass: [PSPDFLinkAnnotationView class ]]) {
488
488
PSPDFLinkAnnotationView *linkAnnotation = (PSPDFLinkAnnotationView *)annotationView;
@@ -496,35 +496,35 @@ - (void)pdfViewController:(PSPDFViewController *)pdfController didChangeViewMode
496
496
return annotationView;
497
497
}
498
498
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 ];
502
502
}
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 ];
505
505
}
506
506
return YES ;
507
507
}
508
508
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 ];
512
512
}
513
513
}
514
514
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 ];
518
518
}
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 ];
521
521
}
522
522
return YES ;
523
523
}
524
524
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 ];
528
528
}
529
529
}
530
530
0 commit comments