Permalink
Browse files

Transition working properly

  • Loading branch information...
1 parent 5e06831 commit 295a191285106176cfc4a71e299253e6e8d2d3e3 @dhoerl18 dhoerl18 committed Feb 25, 2012
@@ -39,8 +39,7 @@
@interface ImageScrollView : UIScrollView <UIScrollViewDelegate>
@property (nonatomic, assign) BOOL aspectFill;
-
-- (UIView *)imageView;
+@property (nonatomic, strong) UIView *imageView; // in case you want to grab the image for other purposes, and then nil it
- (void)displayTiledImage:(TiledImageBuilder *)tiledImage;
- (void)setMaxMinZoomScalesForCurrentBounds;
@@ -40,13 +40,9 @@
#import "TiledImageBuilder.h"
@implementation ImageScrollView
-{
- UIView *imageView;
-}
+@synthesize imageView;
@synthesize aspectFill;
-- (UIView *)imageView { return imageView;}
-
- (id)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame])) {
@@ -230,6 +230,7 @@ - (BOOL)jpegOutputScanLines; // return YES when done
#endif
- (uint64_t)timeStamp;
+- (uint64_t)freeDiskspace;
@end
@@ -891,7 +892,7 @@ - (void)run
if(!ret) goto eRR;
}
}
-assert(zoomLevels == 4);
+ assert(zoomLevels);
failed = !tileBuilder(&ims[zoomLevels-1], NO);
return;
@@ -944,6 +945,28 @@ - (CGImageRef)newImageForScale:(CGFloat)scale row:(int)row col:(int)col
return image;
}
+- (uint64_t)freeDiskspace
+{
+ uint64_t totalSpace = 0;
+ uint64_t totalFreeSpace = 0;
+
+ __autoreleasing NSError *error = nil;
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error: &error];
+
+ if (dictionary) {
+ NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize];
+ NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey:NSFileSystemFreeSize];
+ totalSpace = [fileSystemSizeInBytes unsignedLongLongValue];
+ totalFreeSpace = [freeFileSystemSizeInBytes unsignedLongLongValue];
+ NSLog(@"Memory Capacity of %llu MiB with %llu MiB Free memory available.", ((totalSpace/1024ll)/1024ll), ((totalFreeSpace/1024ll)/1024ll));
+ } else {
+ NSLog(@"Error Obtaining System Memory Info: Domain = %@, Code = %@", [error domain], [error code]);
+ }
+
+ return totalFreeSpace;
+}
+
@end
static size_t PhotoScrollerProviderGetBytesAtPosition (

0 comments on commit 295a191

Please sign in to comment.