Browse files

Don't use note size define

  • Loading branch information...
1 parent eef0a1b commit 898c7f30272d8349b1d06a74eb5cfceeb8125601 @steipete steipete committed Mar 4, 2014
View
2 Examples/PSPDFCatalog/Annotations/PSCAnnotationsExample.m
@@ -172,7 +172,7 @@ - (UIViewController *)invokeWithDelegate:(id<PSCExampleRunnerDelegate>)delegate
for (int i=0; i<5; i++) {
PSPDFNoteAnnotation *noteAnnotation = [PSPDFNoteAnnotation new];
// width/height will be ignored for note annotations.
- noteAnnotation.boundingBox = (CGRect){CGPointMake(100.f, 50.f + i*maxHeight/5), PSPDFNoteAnnotationViewFixedSize};
+ noteAnnotation.boundingBox = CGRectMake(100.f, 50.f + i*maxHeight/5, 32.f, 32.f);
noteAnnotation.contents = [NSString stringWithFormat:@"Note %d", 5-i]; // notes are added bottom-up
[annotations addObject:noteAnnotation];
}
View
2 Examples/PSPDFCatalog/Annotations/PSCCreateNoteFromTextSelectionExample.m
@@ -44,7 +44,7 @@ - (NSArray *)pdfViewController:(PSPDFViewController *)pdfController shouldShowMe
if (selectedText.length > 0) {
PSPDFMenuItem *createNoteMenu = [[PSPDFMenuItem alloc] initWithTitle:@"Create Note" block:^{
PSPDFNoteAnnotation *noteAnnotation = [PSPDFNoteAnnotation new];
- noteAnnotation.boundingBox = (CGRect){CGPointMake(CGRectGetMaxX(textRect), textRect.origin.y), PSPDFNoteAnnotationViewFixedSize};
+ noteAnnotation.boundingBox = CGRectMake(CGRectGetMaxX(textRect), textRect.origin.y, 32.f, 32.f);
noteAnnotation.contents = selectedText;
[pageView.document addAnnotations:@[noteAnnotation]];
[pageView.selectionView discardSelection]; // clear text

0 comments on commit 898c7f3

Please sign in to comment.