diff --git a/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/nextIcon@2x.png b/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/nextIcon@2x.png new file mode 100644 index 0000000..65691ab Binary files /dev/null and b/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/nextIcon@2x.png differ diff --git a/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/previousIcon@2x.png b/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/previousIcon@2x.png new file mode 100644 index 0000000..83bec99 Binary files /dev/null and b/src/KTPhotoBrowser/KTPhotoBrowser.bundle/images/previousIcon@2x.png differ diff --git a/src/KTPhotoBrowser/KTPhotoBrowserGlobal.h b/src/KTPhotoBrowser/KTPhotoBrowserGlobal.h deleted file mode 100644 index 97418cd..0000000 --- a/src/KTPhotoBrowser/KTPhotoBrowserGlobal.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// KTPhotoBrowserGlobal.h -// Sample -// -// Created by Kirby Turner on 2/11/10. -// Copyright 2010 White Peak Software Inc. All rights reserved. -// - -#import - - -/** - * Returns the main bundle path concatenated with the given relative path. - */ -NSString * KTPathForBundleResource(NSString *relativePath); - -/** - * Returns the image with the given name from the KTPhotoBrowser.bundle path. - */ -UIImage * KTLoadImageFromBundle(NSString *imageName); \ No newline at end of file diff --git a/src/KTPhotoBrowser/KTPhotoBrowserGlobal.m b/src/KTPhotoBrowser/KTPhotoBrowserGlobal.m deleted file mode 100644 index ea00b1e..0000000 --- a/src/KTPhotoBrowser/KTPhotoBrowserGlobal.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// KTPhotoBrowserGlobal.m -// Sample -// -// Created by Kirby Turner on 2/11/10. -// Copyright 2010 White Peak Software Inc. All rights reserved. -// - -#import "KTPhotoBrowserGlobal.h" - - -/////////////////////// - -NSString * KTPathForBundleResource(NSString *relativePath) { - NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; - return [resourcePath stringByAppendingPathComponent:relativePath]; -} - -/////////////////////// - -UIImage * KTLoadImageFromBundle(NSString *imageName) { - NSString *relativePath = [NSString stringWithFormat:@"KTPhotoBrowser.bundle/images/%@", imageName]; - NSString *path = KTPathForBundleResource(relativePath); - NSData *data = [NSData dataWithContentsOfFile:path]; - return [UIImage imageWithData:data]; -} \ No newline at end of file diff --git a/src/KTPhotoBrowser/KTPhotoScrollViewController.m b/src/KTPhotoBrowser/KTPhotoScrollViewController.m index 81062ac..eef8571 100644 --- a/src/KTPhotoBrowser/KTPhotoScrollViewController.m +++ b/src/KTPhotoBrowser/KTPhotoScrollViewController.m @@ -8,7 +8,6 @@ #import "KTPhotoScrollViewController.h" #import "KTPhotoBrowserDataSource.h" -#import "KTPhotoBrowserGlobal.h" #import "KTPhotoView.h" const CGFloat ktkDefaultPortraitToolbarHeight = 44; @@ -98,13 +97,13 @@ - (void)loadView [newView release]; nextButton_ = [[UIBarButtonItem alloc] - initWithImage:KTLoadImageFromBundle(@"nextIcon.png") + initWithImage:[UIImage imageNamed:@"KTPhotoBrowser.bundle/images/nextIcon.png"] style:UIBarButtonItemStylePlain target:self action:@selector(nextPhoto)]; previousButton_ = [[UIBarButtonItem alloc] - initWithImage:KTLoadImageFromBundle(@"previousIcon.png") + initWithImage:[UIImage imageNamed:@"KTPhotoBrowser.bundle/images/previousIcon.png"] style:UIBarButtonItemStylePlain target:self action:@selector(previousPhoto)];