Skip to content

Commit

Permalink
Version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vfr committed Apr 14, 2011
1 parent 40ff0c8 commit 6326bdc
Show file tree
Hide file tree
Showing 24 changed files with 398 additions and 315 deletions.
3 changes: 2 additions & 1 deletion Classes/PDFTiledLayer.h
Expand Up @@ -3,7 +3,7 @@
// Reader
//
// Created by Julius Oklamcak on 2010-09-01.
// Copyright © 2010 Julius Oklamcak. All rights reserved.
// Copyright © 2010-2011 Julius Oklamcak. All rights reserved.
//
// This work is being made available under a Creative Commons Attribution license:
// «http://creativecommons.org/licenses/by/3.0/»
Expand All @@ -17,6 +17,7 @@

@interface PDFTiledLayer : CATiledLayer
{
@private // Instance variables
}

@end
21 changes: 10 additions & 11 deletions Classes/PDFTiledLayer.m
Expand Up @@ -3,7 +3,7 @@
// Reader
//
// Created by Julius Oklamcak on 2010-09-01.
// Copyright © 2010 Julius Oklamcak. All rights reserved.
// Copyright © 2010-2011 Julius Oklamcak. All rights reserved.
//
// This work is being made available under a Creative Commons Attribution license:
// «http://creativecommons.org/licenses/by/3.0/»
Expand All @@ -16,29 +16,30 @@

@implementation PDFTiledLayer

#pragma mark Properties

//@synthesize ...;

#pragma mark Constants

#define ZOOM_LEVELS 5

#pragma mark PDFTiledLayer Class methods
#pragma mark Properties

//@synthesize ;

#pragma mark PDFTiledLayer class methods

+ (CFTimeInterval)fadeDuration
{
return 0.0;
return 0.0; // No fading wanted
}

#pragma mark PDFTiledLayer Instance methods
#pragma mark PDFTiledLayer instance methods

- (id)init
{
if ((self = [super init]))
{
self.levelsOfDetail = ZOOM_LEVELS;
self.levelsOfDetailBias = ZOOM_LEVELS-1;

self.levelsOfDetailBias = (ZOOM_LEVELS - 1);

CGFloat screenScale; // Points to pixels

Expand All @@ -59,8 +60,6 @@ - (id)init
CGFloat sizeOfTiles = (max < 512.0f) ? 512.0f : 1024.0f;

self.tileSize = CGSizeMake(sizeOfTiles, sizeOfTiles);

self.needsDisplayOnBoundsChange = YES;
}

return self;
Expand Down
21 changes: 12 additions & 9 deletions Classes/PDFViewTiled.h
Expand Up @@ -3,7 +3,7 @@
// Reader
//
// Created by Julius Oklamcak on 2010-09-01.
// Copyright © 2010 Julius Oklamcak. All rights reserved.
// Copyright © 2010-2011 Julius Oklamcak. All rights reserved.
//
// This work is being made available under a Creative Commons Attribution license:
// «http://creativecommons.org/licenses/by/3.0/»
Expand All @@ -20,23 +20,26 @@

NSURL *_fileURL;
NSString *_password;

NSInteger _pageCount;
NSInteger _currentPage;

CGPDFDocumentRef _PDFDocRef;
CGPDFPageRef _PDFPageRef;
}

@property (nonatomic, readonly) NSInteger page;
@property (nonatomic, readonly) NSInteger pages;
@property (nonatomic, assign, readonly) NSInteger pageCount;
@property (nonatomic, assign, readonly) NSInteger currentPage;

- (id)initWithURL:(NSURL *)fileURL onPage:(NSInteger)onPage password:(NSString *)password frame:(CGRect)frame;
- (id)initWithURL:(NSURL *)fileURL page:(NSInteger)page password:(NSString *)password frame:(CGRect)frame;

- (BOOL)changeFileURL:(NSURL *)fileURL onPage:(NSInteger)onPage password:(NSString *)password;
- (BOOL)changeFileURL:(NSURL *)fileURL page:(NSInteger)page password:(NSString *)password;

- (void)gotoPage:(NSInteger)newPage;
- (void)gotoPage:(NSInteger)page;

- (CGSize)currentPageSize;

- (void)decrementPage;
- (void)incrementPage;

- (void)willRotate;
- (void)didRotate;

@end

0 comments on commit 6326bdc

Please sign in to comment.