Permalink
Browse files

Version 2.6.1a

  • Loading branch information...
1 parent 2c75595 commit 962f8d3e4fe062f25328dc2ab79aaf8c15019ca0 @vfr committed Oct 6, 2012
Showing with 23 additions and 29 deletions.
  1. +3 −3 README.md
  2. +15 −25 Sources/ReaderContentPage.m
  3. +5 −1 Sources/ReaderMainToolbar.m
View
@@ -16,9 +16,9 @@ project template that you could start building from, or, just pull
the required files into an existing project to enable PDF
reading/viewing in your app(s).
-![iPod Page](http://i.imgur.com/wxC1B.png)
-![iPod Thumbs](http://i.imgur.com/4VNyQ.png)
-![iPad Page](http://i.imgur.com/T6nfI.png)
+![iPod Page](http://i.imgur.com/wxC1B.png)<p></p>
+![iPod Thumbs](http://i.imgur.com/4VNyQ.png)<p></p>
+![iPad Page](http://i.imgur.com/T6nfI.png)<p></p>
![iPad Thumbs](http://i.imgur.com/wxQRC.png)
After launching the sample app, tap on the left hand side of the
@@ -508,14 +508,20 @@ - (id)initWithURL:(NSURL *)fileURL page:(NSInteger)page password:(NSString *)phr
return view;
}
+- (void)removeFromSuperview
+{
+ self.layer.delegate = nil;
+
+ //self.layer.contents = nil;
+
+ [super removeFromSuperview];
+}
+
- (void)dealloc
{
- @synchronized(self) // Block any other threads
- {
- CGPDFPageRelease(_PDFPageRef), _PDFPageRef = NULL;
+ CGPDFPageRelease(_PDFPageRef), _PDFPageRef = NULL;
- CGPDFDocumentRelease(_PDFDocRef), _PDFDocRef = NULL;
- }
+ CGPDFDocumentRelease(_PDFDocRef), _PDFDocRef = NULL;
}
#if (READER_DISABLE_RETINA == TRUE) // Option
@@ -533,35 +539,19 @@ - (void)drawLayer:(CATiledLayer *)layer inContext:(CGContextRef)context
{
ReaderContentPage *readerContentPage = self; // Retain self
- CGPDFPageRef drawPDFPageRef = NULL; // Document page reference
-
- CGPDFDocumentRef drawPDFDocRef = NULL; // Document reference
-
- @synchronized(self) // Block any other threads
- {
- drawPDFDocRef = CGPDFDocumentRetain(_PDFDocRef);
-
- drawPDFPageRef = CGPDFPageRetain(_PDFPageRef);
- }
-
CGContextSetRGBFillColor(context, 1.0f, 1.0f, 1.0f, 1.0f); // White
CGContextFillRect(context, CGContextGetClipBoundingBox(context)); // Fill
//NSLog(@"%s %@", __FUNCTION__, NSStringFromCGRect(CGContextGetClipBoundingBox(context)));
- if (drawPDFPageRef != NULL) // Go ahead and render the PDF page into the context
- {
- CGContextTranslateCTM(context, 0.0f, self.bounds.size.height); CGContextScaleCTM(context, 1.0f, -1.0f);
-
- CGContextConcatCTM(context, CGPDFPageGetDrawingTransform(drawPDFPageRef, kCGPDFCropBox, self.bounds, 0, true));
+ CGContextTranslateCTM(context, 0.0f, self.bounds.size.height); CGContextScaleCTM(context, 1.0f, -1.0f);
- //CGContextSetRenderingIntent(context, kCGRenderingIntentDefault); CGContextSetInterpolationQuality(context, kCGInterpolationDefault);
+ CGContextConcatCTM(context, CGPDFPageGetDrawingTransform(_PDFPageRef, kCGPDFCropBox, self.bounds, 0, true));
- CGContextDrawPDFPage(context, drawPDFPageRef); // Render the PDF page into the context
- }
+ //CGContextSetRenderingIntent(context, kCGRenderingIntentDefault); CGContextSetInterpolationQuality(context, kCGInterpolationDefault);
- CGPDFPageRelease(drawPDFPageRef); CGPDFDocumentRelease(drawPDFDocRef); // Cleanup
+ CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context
if (readerContentPage != nil) readerContentPage = nil; // Release self
}
@@ -1,6 +1,6 @@
//
// ReaderMainToolbar.m
-// Reader v2.6.0
+// Reader v2.6.1
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2012 Julius Oklamcak. All rights reserved.
@@ -118,8 +118,12 @@ - (id)initWithFrame:(CGRect)frame document:(ReaderDocument *)object
#endif // end of READER_ENABLE_THUMBS Option
+#if (READER_BOOKMARKS == TRUE || READER_ENABLE_MAIL == TRUE || READER_ENABLE_PRINT == TRUE)
+
CGFloat rightButtonX = viewWidth; // Right button start X position
+#endif // end of READER_BOOKMARKS || READER_ENABLE_MAIL || READER_ENABLE_PRINT Options
+
#if (READER_BOOKMARKS == TRUE) // Option
rightButtonX -= (MARK_BUTTON_WIDTH + BUTTON_SPACE);

0 comments on commit 962f8d3

Please sign in to comment.