Skip to content

Commit

Permalink
Don't use note size define
Browse files Browse the repository at this point in the history
  • Loading branch information
steipete committed Mar 4, 2014
1 parent eef0a1b commit 898c7f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Examples/PSPDFCatalog/Annotations/PSCAnnotationsExample.m
Expand Up @@ -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];
}
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 898c7f3

Please sign in to comment.