Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v2.7.3

  • Loading branch information...
commit aa2ce8e949c7d0125e88f78bff373e6f876cf21d 1 parent 7aad052
Julius Oklamcak authored
5 HISTORY.md
View
@@ -1,6 +1,11 @@
## History
+2013-11-19: Version 2.7.3
+
+ - Retina and zoom levels bug fixes.
+ - PDF annotation URI handling bug fix.
+
2013-10-24: Version 2.7.2
- iOS 7 status bar handling bug fixes.
4 Reader-Info.plist
View
@@ -29,9 +29,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>2.7.2</string>
+ <string>2.7.3</string>
<key>CFBundleShortVersionString</key>
- <string>2.7.2</string>
+ <string>2.7.3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIPrerenderedIcon</key>
8 Sources/ReaderContentPage.m
View
@@ -1,6 +1,6 @@
//
// ReaderContentPage.m
-// Reader v2.6.1
+// Reader v2.7.3
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2013 Julius Oklamcak. All rights reserved.
@@ -283,7 +283,11 @@ - (id)annotationLinkTarget:(CGPDFDictionaryRef)annotationDictionary
{
const char *uri = (const char *)CGPDFStringGetBytePtr(uriString); // Destination URI string
- linkTarget = [NSURL URLWithString:[NSString stringWithCString:uri encoding:NSASCIIStringEncoding]];
+ NSString *target = [NSString stringWithCString:uri encoding:NSUTF8StringEncoding]; // NSString - UTF8
+
+ linkTarget = [NSURL URLWithString:[target stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+
+ if (linkTarget == nil) NSLog(@"%s Bad URI '%@'", __FUNCTION__, target);
}
}
}
9 Sources/ReaderContentTile.m
View
@@ -1,6 +1,6 @@
//
// ReaderContentTile.m
-// Reader v2.6.0
+// Reader v2.7.3
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2013 Julius Oklamcak. All rights reserved.
@@ -29,8 +29,7 @@ @implementation ReaderContentTile
#pragma mark Constants
-#define LEVELS_OF_DETAIL 4
-#define LEVELS_OF_DETAIL_BIAS 3
+#define LEVELS_OF_DETAIL 16
#pragma mark ReaderContentTile class methods
@@ -47,12 +46,12 @@ - (id)init
{
self.levelsOfDetail = LEVELS_OF_DETAIL; // Zoom levels
+ self.levelsOfDetailBias = (LEVELS_OF_DETAIL - 1); // Bias
+
UIScreen *mainScreen = [UIScreen mainScreen]; // Main screen
CGFloat screenScale = [mainScreen scale]; // Main screen scale
- self.levelsOfDetailBias = (screenScale > 1.0f) ? 1 : LEVELS_OF_DETAIL_BIAS;
-
CGRect screenBounds = [mainScreen bounds]; // Main screen bounds
CGFloat w_pixels = (screenBounds.size.width * screenScale);
4 Sources/ReaderContentView.h
View
@@ -1,6 +1,6 @@
//
// ReaderContentView.h
-// Reader v2.7.1
+// Reader v2.7.3
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2013 Julius Oklamcak. All rights reserved.
@@ -39,7 +39,7 @@
@end
-@interface ReaderContentView : UIScrollView <UIScrollViewDelegate>
+@interface ReaderContentView : UIScrollView
@property (nonatomic, weak, readwrite) id <ReaderContentViewDelegate> message;
19 Sources/ReaderContentView.m
View
@@ -1,6 +1,6 @@
//
// ReaderContentView.m
-// Reader v2.6.1
+// Reader v2.7.3
//
// Created by Julius Oklamcak on 2011-07-01.
// Copyright © 2011-2013 Julius Oklamcak. All rights reserved.
@@ -30,6 +30,10 @@
#import <QuartzCore/QuartzCore.h>
+@interface ReaderContentView () <UIScrollViewDelegate>
+
+@end
+
@implementation ReaderContentView
{
ReaderContentPage *theContentView;
@@ -37,13 +41,12 @@ @implementation ReaderContentView
ReaderContentThumb *theThumbView;
UIView *theContainerView;
-
- CGFloat zoomAmount;
}
#pragma mark Constants
-#define ZOOM_LEVELS 4
+#define ZOOM_FACTOR 2.0f
+#define ZOOM_MAXIMUM 16.0f
#if (READER_SHOW_SHADOWS == TRUE) // Option
#define CONTENT_INSET 4.0f
@@ -81,9 +84,7 @@ - (void)updateMinimumMaximumZoom
self.minimumZoomScale = zoomScale; // Set the minimum and maximum zoom scales
- self.maximumZoomScale = (zoomScale * ZOOM_LEVELS); // Max number of zoom levels
-
- zoomAmount = ((self.maximumZoomScale - self.minimumZoomScale) / ZOOM_LEVELS);
+ self.maximumZoomScale = (zoomScale * ZOOM_MAXIMUM); // Max number of zoom levels
}
- (id)initWithFrame:(CGRect)frame fileURL:(NSURL *)fileURL page:(NSUInteger)page password:(NSString *)phrase
@@ -236,7 +237,7 @@ - (void)zoomIncrement
if (zoomScale < self.maximumZoomScale)
{
- zoomScale += zoomAmount; // += value
+ zoomScale *= ZOOM_FACTOR; // Zoom in
if (zoomScale > self.maximumZoomScale)
{
@@ -253,7 +254,7 @@ - (void)zoomDecrement
if (zoomScale > self.minimumZoomScale)
{
- zoomScale -= zoomAmount; // -= value
+ zoomScale /= ZOOM_FACTOR; // Zoom out
if (zoomScale < self.minimumZoomScale)
{
Please sign in to comment.
Something went wrong with that request. Please try again.