diff --git a/Classes/MWPhotoBrowser.h b/Classes/MWPhotoBrowser.h index a77ecc77f..5610b7a0d 100644 --- a/Classes/MWPhotoBrowser.h +++ b/Classes/MWPhotoBrowser.h @@ -25,11 +25,8 @@ int pageIndexBeforeRotation; // Navigation & controls + UIToolbar *toolbar; NSTimer *controlVisibilityTimer; - - // Misc - UIStatusBarStyle previousStatusBarStyle; - BOOL previousToolbarVisibility; } @@ -39,6 +36,9 @@ // Photos - (UIImage *)imageAtIndex:(int)index; +// Layout +- (void)performLayout; + // Paging - (void)tilePages; - (BOOL)isDisplayingPageForIndex:(int)index; diff --git a/Classes/MWPhotoBrowser.m b/Classes/MWPhotoBrowser.m index bd6ad7c96..0ce365ba1 100644 --- a/Classes/MWPhotoBrowser.m +++ b/Classes/MWPhotoBrowser.m @@ -9,12 +9,14 @@ #import "MWPhotoBrowser.h" #import "ZoomingScrollView.h" -#define PADDING 10 +#define PADDING 10 +// Handle depreciations and supress hide warnings @interface UIApplication (DepreciationWarningSuppresion) - (void)setStatusBarHidden:(BOOL)hidden animated:(BOOL)animated; @end +// MWPhotoBrowser @implementation MWPhotoBrowser - (id)initWithPhotos:(NSArray *)photosArray { @@ -26,7 +28,6 @@ - (id)initWithPhotos:(NSArray *)photosArray { // Defaults self.wantsFullScreenLayout = YES; currentPageIndex = 0; - previousStatusBarStyle = UIStatusBarStyleDefault; } return self; @@ -55,6 +56,7 @@ - (void)viewDidUnload { [pagingScrollView release]; [visiblePages release]; [recycledPages release]; + [toolbar release]; } - (void)dealloc { @@ -62,6 +64,7 @@ - (void)dealloc { [pagingScrollView release]; [visiblePages release]; [recycledPages release]; + [toolbar release]; [super dealloc]; } @@ -91,13 +94,19 @@ - (void)viewDidLoad { recycledPages = [[NSMutableSet alloc] init]; [self tilePages]; - // Bars + // Navigation Bar + self.navigationController.navigationBar.tintColor = nil; self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; - self.navigationController.toolbar.barStyle = UIBarStyleBlackTranslucent; + + // Toolbar + toolbar = [[UIToolbar alloc] initWithFrame:[self frameForToolbarAtOrientation:self.interfaceOrientation]]; + toolbar.tintColor = nil; + toolbar.barStyle = UIBarStyleBlackTranslucent; + [self.view addSubview:toolbar]; // Toolbar Items - UIBarButtonItem *previousImage = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRewind target:self action:@selector(gotoPreviousPage)]; - UIBarButtonItem *nextImage = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFastForward target:self action:@selector(gotoNextPage)]; + UIBarButtonItem *previousImage = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"UIBarButtonItemArrowLeft.png"] style:UIBarButtonItemStylePlain target:self action:@selector(gotoPreviousPage)]; + UIBarButtonItem *nextImage = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"UIBarButtonItemArrowRight.png"] style:UIBarButtonItemStylePlain target:self action:@selector(gotoNextPage)]; UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; NSMutableArray *items = [[NSMutableArray alloc] init]; [items addObject:space]; @@ -105,7 +114,7 @@ - (void)viewDidLoad { [items addObject:space]; if (photos.count > 1) [items addObject:nextImage]; [items addObject:space]; - [self setToolbarItems:items]; + [toolbar setItems:items]; [items release]; [previousImage release], [nextImage release], [space release]; @@ -114,19 +123,16 @@ - (void)viewDidLoad { } - - (void)viewWillAppear:(BOOL)animated { // Super [super viewWillAppear:animated]; - // Set status bar style to black translucent and remember previous - previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES]; + // Layout + [self performLayout]; - // Show Toolbar - previousToolbarVisibility = self.navigationController.toolbarHidden; - self.navigationController.toolbarHidden = NO; + // Set status bar style to black translucent + [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES]; // Navigation [self updateNavigation]; @@ -143,12 +149,44 @@ - (void)viewWillDisappear:(BOOL)animated { // Cancel any hiding timers [self cancelControlHiding]; - // Reset Toolbar - self.navigationController.toolbarHidden = previousToolbarVisibility; +} + +#pragma mark - +#pragma mark Layout + +// Layout subviews +- (void)performLayout { + + // Toolbar + toolbar.frame = [self frameForToolbarAtOrientation:self.interfaceOrientation]; + + // Remember index + int indexPriorToLayout = currentPageIndex; + + // Get paging scroll view frame to determine if anything needs changing + CGRect pagingScrollViewFrame = [self frameForPagingScrollView]; + + // Frame needs changing + pagingScrollView.frame = pagingScrollViewFrame; - // Reset status bar style - [[UIApplication sharedApplication] setStatusBarStyle:previousStatusBarStyle animated:YES]; + // Recalculate contentSize based on current orientation + pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; + + // Adjust frames and configuration of each visible page + for (ZoomingScrollView *page in visiblePages) { + page.frame = [self frameForPageAtIndex:page.index]; + [page setMaxMinZoomScalesForCurrentBounds]; + page.zoomScale = page.minimumZoomScale; + } + // adjust contentOffset to preserve page location based on values collected prior to location + CGFloat pageWidth = pagingScrollView.bounds.size.width; + CGFloat newOffset = indexPriorToLayout * pageWidth; + pagingScrollView.contentOffset = CGPointMake(newOffset, 0); + + // Reset page + currentPageIndex = indexPriorToLayout; + } #pragma mark - @@ -180,19 +218,23 @@ - (void)photoDidFinishLoading:(MWPhoto *)photo { // Tell page to display image again ZoomingScrollView *page = [self pageDisplayedAtIndex:index]; - if (page) { - - // Display - [page displayImage]; - - } + if (page) [page displayImage]; } } } - (void)photoDidFailToLoad:(MWPhoto *)photo { - NSLog(@"MWPhotoBrowser: Photo failed to load in background"); + int index = [photos indexOfObject:photo]; + if (index != NSNotFound) { + if ([self isDisplayingPageForIndex:index]) { + + // Tell page it failed + ZoomingScrollView *page = [self pageDisplayedAtIndex:index]; + if (page) [page displayImageFailure]; + + } + } } #pragma mark - @@ -213,7 +255,7 @@ - (void)tilePages { for (ZoomingScrollView *page in visiblePages) { if (page.index < firstNeededPageIndex || page.index > lastNeededPageIndex) { [recycledPages addObject:page]; - NSLog(@"Removed page at index %i", page.index); + /*NSLog(@"Removed page at index %i", page.index);*/ page.index = NSNotFound; // empty [page removeFromSuperview]; } @@ -231,7 +273,7 @@ - (void)tilePages { [self configurePage:page forIndex:index]; [visiblePages addObject:page]; [pagingScrollView addSubview:page]; - NSLog(@"Added page at index %i", page.index); + /*NSLog(@"Added page at index %i", page.index);*/ } } @@ -285,7 +327,7 @@ - (void)didStartViewingPageAtIndex:(int)index { #pragma mark Frame Calculations - (CGRect)frameForPagingScrollView { - CGRect frame = [[UIScreen mainScreen] bounds]; + CGRect frame = self.view.bounds;// [[UIScreen mainScreen] bounds]; frame.origin.x -= PADDING; frame.size.width += (2 * PADDING); return frame; @@ -354,8 +396,11 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { - (void)updateNavigation { // Title - self.title = [NSString stringWithFormat:@"%i of %i", currentPageIndex+1, photos.count]; - //navigationBar.topItem.title = + if (photos.count > 1) { + self.title = [NSString stringWithFormat:@"%i of %i", currentPageIndex+1, photos.count]; + } else { + self.title = nil; + } } @@ -410,7 +455,7 @@ - (void)setControlsHidden:(BOOL)hidden { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.35]; [self.navigationController.navigationBar setAlpha:hidden ? 0 : 1]; - [self.navigationController.toolbar setAlpha:hidden ? 0 : 1]; + [toolbar setAlpha:hidden ? 0 : 1]; [UIView commitAnimations]; // Control hiding timer @@ -455,21 +500,10 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie } - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - - // recalculate contentSize based on current orientation - pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; - - // adjust frames and configuration of each visible page - for (ZoomingScrollView *page in visiblePages) { - page.frame = [self frameForPageAtIndex:page.index]; - [page setMaxMinZoomScalesForCurrentBounds]; - page.zoomScale = page.minimumZoomScale; - } - - // adjust contentOffset to preserve page location based on values collected prior to location - CGFloat pageWidth = pagingScrollView.bounds.size.width; - CGFloat newOffset = pageIndexBeforeRotation * pageWidth; - pagingScrollView.contentOffset = CGPointMake(newOffset, 0); + + // Perform layout + currentPageIndex = pageIndexBeforeRotation; + [self performLayout]; // Delay control holding [self hideControlsAfterDelay]; diff --git a/Classes/MWPhotoBrowserAppDelegate.m b/Classes/MWPhotoBrowserAppDelegate.m index 93f1a7447..196944b6b 100644 --- a/Classes/MWPhotoBrowserAppDelegate.m +++ b/Classes/MWPhotoBrowserAppDelegate.m @@ -7,7 +7,7 @@ // #import "MWPhotoBrowserAppDelegate.h" -#import "MWPhotoBrowser.h" +#import "Menu.h" @implementation MWPhotoBrowserAppDelegate @@ -19,41 +19,12 @@ @implementation MWPhotoBrowserAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - - NSArray *photos = [NSArray arrayWithObjects: - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo1l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo3l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo4l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo1l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo3l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo4l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo1l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo3l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo4l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo1l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo3l" ofType:@"jpg"]], - [MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo4l" ofType:@"jpg"]], - nil]; - -// NSArray *photos = [NSArray arrayWithObjects: -// [MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3567/3523321514_371d9ac42f_b.jpg"]], -// [MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b_b.jpg"]], -// [MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3364/3338617424_7ff836d55f_b.jpg"]], -// [MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b_b.jpg"]], -// nil]; - - MWPhotoBrowser *vc = [[MWPhotoBrowser alloc] initWithPhotos:photos]; + Menu *vc = [[Menu alloc] init]; UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc]; - - // Add the view controller's view to the window and display. - [window addSubview:nc.view]; + [window addSubview:nc.view]; [window makeKeyAndVisible]; - return YES; + } diff --git a/Classes/Menu.h b/Classes/Menu.h new file mode 100644 index 000000000..781443682 --- /dev/null +++ b/Classes/Menu.h @@ -0,0 +1,15 @@ +// +// Menu.h +// MWPhotoBrowser +// +// Created by Michael Waterfall on 21/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import + +@interface Menu : UITableViewController { + +} + +@end diff --git a/Classes/Menu.m b/Classes/Menu.m new file mode 100644 index 000000000..75afa0c10 --- /dev/null +++ b/Classes/Menu.m @@ -0,0 +1,112 @@ +// +// Menu.m +// MWPhotoBrowser +// +// Created by Michael Waterfall on 21/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import "Menu.h" +#import "MWPhotoBrowser.h" + +@implementation Menu + +#pragma mark - +#pragma mark Initialization + +- (id)initWithStyle:(UITableViewStyle)style { + if ((self = [super initWithStyle:style])) { + self.title = @"MWPhotoBrowser"; + } + return self; +} + +#pragma mark - +#pragma mark View lifecycle + +- (void)viewWillAppear:(BOOL)animated { + + // Super + [super viewWillAppear:animated]; + + // Set bar styles + self.navigationController.navigationBar.barStyle = UIBarStyleDefault; + [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES]; + +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return YES; +} + +#pragma mark - +#pragma mark Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 3; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + // Create + static NSString *CellIdentifier = @"Cell"; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + } + + // Configure + switch (indexPath.row) { + case 0: cell.textLabel.text = @"Single photo from a file"; break; + case 1: cell.textLabel.text = @"Multiple photos from files"; break; + case 2: cell.textLabel.text = @"Multiple photos from Flickr"; break; + default: break; + } + return cell; + +} + +#pragma mark - +#pragma mark Table view delegate + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + + // Browser + NSMutableArray *photos = [[NSMutableArray alloc] init]; + switch (indexPath.row) { + case 0: + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]]]; + break; + case 1: + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo1l" ofType:@"jpg"]]]; + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]]]; + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo3l" ofType:@"jpg"]]]; + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo4l" ofType:@"jpg"]]]; + break; + case 2: + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3567/3523321514_371d9ac42f.jpg"]]]; + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b.jpg"]]]; + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3364/3338617424_7ff836d55f.jpg"]]]; + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b.jpg"]]]; + break; + default: break; + } + + // Create browser + MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithPhotos:photos]; + [self.navigationController pushViewController:browser animated:YES]; + [browser release]; + [photos release]; + + // Deselect + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + +} + +@end + diff --git a/Classes/ZoomingScrollView.h b/Classes/ZoomingScrollView.h index 3aa0873be..35271822d 100644 --- a/Classes/ZoomingScrollView.h +++ b/Classes/ZoomingScrollView.h @@ -33,6 +33,7 @@ // Methods - (void)displayImage; +- (void)displayImageFailure; - (void)setMaxMinZoomScalesForCurrentBounds; - (void)handleSingleTap:(CGPoint)touchPoint; - (void)handleDoubleTap:(CGPoint)touchPoint; diff --git a/Classes/ZoomingScrollView.m b/Classes/ZoomingScrollView.m index 72c0160a8..b19fb7712 100644 --- a/Classes/ZoomingScrollView.m +++ b/Classes/ZoomingScrollView.m @@ -116,6 +116,11 @@ - (void)displayImage { } } +// Image failed so just show black! +- (void)displayImageFailure { + [spinner stopAnimating]; +} + #pragma mark - #pragma mark Setup Content diff --git a/MWPhotoBrowser.xcodeproj/Michael.mode1v3 b/MWPhotoBrowser.xcodeproj/Michael.mode1v3 index 2d64ae6c4..46b65d5ec 100644 --- a/MWPhotoBrowser.xcodeproj/Michael.mode1v3 +++ b/MWPhotoBrowser.xcodeproj/Michael.mode1v3 @@ -274,21 +274,21 @@ 4CC82BC51266798B00C05633 4C48EFD4126F90CA00F85546 4C48EFD3126F90C600F85546 - 29B97323FDCFA39411CA2CEA + 29B97317FDCFA39411CA2CEA 1C37FBAC04509CD000000102 1C37FAAC04509CD000000102 - 1C37FABC05509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey - 5 + 6 + 2 1 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {363, 1076}} + {{0, 0}, {363, 802}} PBXTopSmartGroupGIDs @@ -300,14 +300,14 @@ GeometryConfiguration Frame - {{0, 0}, {380, 1094}} + {{0, 0}, {380, 820}} GroupTreeTableConfiguration MainColumn 363 RubberWindowFrame - 0 43 1920 1135 0 0 1920 1178 + 230 184 1440 861 0 0 1920 1178 Module PBXSmartGroupTreeModule @@ -325,7 +325,7 @@ PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel - MWPhotoBrowserAppDelegate.h + Menu.m PBXSplitModuleInNavigatorKey Split0 @@ -333,28 +333,33 @@ PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel - MWPhotoBrowserAppDelegate.h + Menu.m _historyCapacity 0 bookmark - 4C1C97A31270980E0076418C + 4C667CBC1270D4560008B630 history 4C75D4A3126B7ABF004D0ECF 4C48EFE8126F932C00F85546 - 4C3EAFA9126FC57800C7CF25 4C3EAFC9126FC70A00C7CF25 4C3EAFCA126FC70A00C7CF25 4C3EAFCB126FC70A00C7CF25 4C3EAFCC126FC70A00C7CF25 4C3EAFCD126FC70A00C7CF25 - 4C3EAFCE126FC70A00C7CF25 - 4C3EAFCF126FC70A00C7CF25 4C3EAFD0126FC70A00C7CF25 - 4C3EAFD1126FC70A00C7CF25 - 4C3EAFD2126FC70A00C7CF25 - 4C3EAFD3126FC70A00C7CF25 - 4C3EAFD6126FC70A00C7CF25 + 4C667C591270C8370008B630 + 4C667C5A1270C8370008B630 + 4C667C5D1270C8EC0008B630 + 4C667C5E1270C8EC0008B630 + 4C667C601270C8EC0008B630 + 4C667C6E1270CA3A0008B630 + 4C667C6F1270CA3A0008B630 + 4C667CAC1270CF150008B630 + 4C667CB41270D1230008B630 + 4C667CB51270D1230008B630 + 4C667CB61270D1230008B630 + 4C667CAB1270CF150008B630 SplitCount @@ -366,14 +371,14 @@ GeometryConfiguration Frame - {{0, 0}, {1535, 1089}} + {{0, 0}, {1055, 815}} RubberWindowFrame - 0 43 1920 1135 0 0 1920 1178 + 230 184 1440 861 0 0 1920 1178 Module PBXNavigatorGroup Proportion - 1089pt + 815pt ContentConfiguration @@ -386,9 +391,9 @@ GeometryConfiguration Frame - {{0, 1094}, {1535, 0}} + {{0, 820}, {1055, 0}} RubberWindowFrame - 0 43 1920 1135 0 0 1920 1178 + 230 184 1440 861 0 0 1920 1178 Module XCDetailModule @@ -397,7 +402,7 @@ Proportion - 1535pt + 1055pt Name @@ -412,9 +417,9 @@ TableOfContents - 4C1C97A01270978C0076418C + 4C667BF61270C1200008B630 1CE0B1FE06471DED0097A5F4 - 4C1C97A11270978C0076418C + 4C667BF71270C1200008B630 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -552,11 +557,16 @@ 5 WindowOrderList + 1C530D57069F1CE1000CFCEE + 4C667C011270C1200008B630 + 4C667C021270C1200008B630 + 1CD10A99069EF8BA00B06720 4CC82BC01266793900C05633 /Users/Michael/My Work/d3i/Projects/MWPhotoBrowser/MWPhotoBrowser.xcodeproj + 1C78EAAD065D492600B07095 WindowString - 0 43 1920 1135 0 0 1920 1178 + 230 184 1440 861 0 0 1920 1178 WindowToolsV3 @@ -633,7 +643,7 @@ TableOfContents 4CC82BC01266793900C05633 - 4C1C97A21270978C0076418C + 4C667BF81270C1200008B630 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID @@ -755,13 +765,13 @@ TableOfContents 1CD10A99069EF8BA00B06720 - 4C3EAFAF126FC57800C7CF25 + 4C667BF91270C1200008B630 1C162984064C10D400B95A72 - 4C3EAFB0126FC57800C7CF25 - 4C3EAFB1126FC57800C7CF25 - 4C3EAFB2126FC57800C7CF25 - 4C3EAFB3126FC57800C7CF25 - 4C3EAFB4126FC57800C7CF25 + 4C667BFA1270C1200008B630 + 4C667BFB1270C1200008B630 + 4C667BFC1270C1200008B630 + 4C667BFD1270C1200008B630 + 4C667BFE1270C1200008B630 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -788,34 +798,34 @@ Dock + BecomeActive + ContentConfiguration PBXProjectModuleGUID 1CDD528C0622207200134675 PBXProjectModuleLabel - ZoomingScrollView.m + MWPhotoBrowser.m StatusBarVisibility GeometryConfiguration Frame - {{0, 0}, {1057, 396}} + {{0, 0}, {1920, 805}} RubberWindowFrame - 458 267 1057 654 0 0 1920 1178 + 0 4 1920 1174 0 0 1920 1178 Module PBXNavigatorGroup Proportion - 1057pt + 1920pt Proportion - 396pt + 805pt - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -826,18 +836,18 @@ GeometryConfiguration Frame - {{0, 401}, {1057, 212}} + {{0, 810}, {1920, 323}} RubberWindowFrame - 458 267 1057 654 0 0 1920 1178 + 0 4 1920 1174 0 0 1920 1178 Module PBXProjectFindModule Proportion - 212pt + 323pt Proportion - 613pt + 1133pt Name @@ -851,13 +861,13 @@ TableOfContents 1C530D57069F1CE1000CFCEE - 4C48EFC9126F8DAF00F85546 - 4C48EFCA126F8DAF00F85546 + 4C667C391270C5340008B630 + 4C667C3A1270C5340008B630 1CDD528C0622207200134675 1CD0528E0623707200166675 WindowString - 458 267 1057 654 0 0 1920 1178 + 0 4 1920 1174 0 0 1920 1178 WindowToolGUID 1C530D57069F1CE1000CFCEE WindowToolIsVisible @@ -894,7 +904,7 @@ Frame {{0, 0}, {878, 746}} RubberWindowFrame - -1413 280 878 787 -1440 196 1440 900 + -1409 284 878 787 -1440 196 1440 900 Module PBXDebugCLIModule @@ -917,13 +927,13 @@ TableOfContents 1C78EAAD065D492600B07095 - 4C3EAFB5126FC57800C7CF25 + 4C667BFF1270C1200008B630 1C78EAAC065D492600B07095 ToolbarConfiguration xcode.toolbar.config.consoleV3 WindowString - -1413 280 878 787 -1440 196 1440 900 + -1409 284 878 787 -1440 196 1440 900 WindowToolGUID 1C78EAAD065D492600B07095 WindowToolIsVisible diff --git a/MWPhotoBrowser.xcodeproj/Michael.pbxuser b/MWPhotoBrowser.xcodeproj/Michael.pbxuser index 820d7207e..a670c8cee 100644 --- a/MWPhotoBrowser.xcodeproj/Michael.pbxuser +++ b/MWPhotoBrowser.xcodeproj/Michael.pbxuser @@ -9,9 +9,9 @@ }; 1D3623250D0F684500981E51 /* MWPhotoBrowserAppDelegate.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1965, 1287}}"; - sepNavSelRange = "{578, 0}"; - sepNavVisRange = "{0, 4265}"; + sepNavIntBoundsRect = "{{0, 0}, {1965, 1092}}"; + sepNavSelRange = "{469, 0}"; + sepNavVisRange = "{0, 2237}"; }; }; 1D6058900D05DD3D006BFB54 /* MWPhotoBrowser */ = { @@ -22,21 +22,21 @@ }; 28D7ACF60DDB3853001CB0EB /* MWPhotoBrowser.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1474, 1057}}"; - sepNavSelRange = "{213, 0}"; - sepNavVisRange = "{0, 1602}"; + sepNavIntBoundsRect = "{{0, 0}, {1474, 1032}}"; + sepNavSelRange = "{572, 0}"; + sepNavVisRange = "{0, 1571}"; }; }; 28D7ACF70DDB3853001CB0EB /* MWPhotoBrowser.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1474, 6513}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 1949}"; + sepNavIntBoundsRect = "{{0, 0}, {1859, 6344}}"; + sepNavSelRange = "{7542, 0}"; + sepNavVisRange = "{9800, 2274}"; sepNavWindowFrame = "{{15, 299}, {938, 874}}"; }; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { - activeBuildConfigurationName = Release; + activeBuildConfigurationName = Debug; activeExecutable = 4CC82BB31266792D00C05633 /* MWPhotoBrowser */; activeSDKPreference = iphonesimulator4.1; activeTarget = 1D6058900D05DD3D006BFB54 /* MWPhotoBrowser */; @@ -93,7 +93,7 @@ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; PBXFileTableDataSourceColumnWidthsKey = ( 20, - 1296, + 816, 20, 48, 43, @@ -132,51 +132,36 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 309368709; - PBXWorkspaceStateSaveDate = 309368709; + PBXPerProjectTemplateStateSaveDate = 309379108; + PBXWorkspaceStateSaveDate = 309379108; }; perUserProjectItems = { - 4C1C97A31270980E0076418C /* PBXTextBookmark */ = 4C1C97A31270980E0076418C /* PBXTextBookmark */; - 4C3EAFA9126FC57800C7CF25 /* PBXTextBookmark */ = 4C3EAFA9126FC57800C7CF25 /* PBXTextBookmark */; 4C3EAFC9126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFC9126FC70A00C7CF25 /* PBXTextBookmark */; 4C3EAFCA126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCA126FC70A00C7CF25 /* PBXTextBookmark */; 4C3EAFCB126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCB126FC70A00C7CF25 /* PBXTextBookmark */; 4C3EAFCC126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCC126FC70A00C7CF25 /* PBXTextBookmark */; 4C3EAFCD126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCD126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFCE126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCE126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFCF126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFCF126FC70A00C7CF25 /* PBXTextBookmark */; 4C3EAFD0126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFD0126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFD1126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFD1126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFD2126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFD2126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFD3126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFD3126FC70A00C7CF25 /* PBXTextBookmark */; - 4C3EAFD6126FC70A00C7CF25 /* PBXTextBookmark */ = 4C3EAFD6126FC70A00C7CF25 /* PBXTextBookmark */; 4C48EFE8126F932C00F85546 /* PBXTextBookmark */ = 4C48EFE8126F932C00F85546 /* PBXTextBookmark */; + 4C667C591270C8370008B630 /* PBXTextBookmark */ = 4C667C591270C8370008B630 /* PBXTextBookmark */; + 4C667C5A1270C8370008B630 /* PBXTextBookmark */ = 4C667C5A1270C8370008B630 /* PBXTextBookmark */; + 4C667C5D1270C8EC0008B630 /* PBXTextBookmark */ = 4C667C5D1270C8EC0008B630 /* PBXTextBookmark */; + 4C667C5E1270C8EC0008B630 /* PBXTextBookmark */ = 4C667C5E1270C8EC0008B630 /* PBXTextBookmark */; + 4C667C601270C8EC0008B630 /* PBXTextBookmark */ = 4C667C601270C8EC0008B630 /* PBXTextBookmark */; + 4C667C6E1270CA3A0008B630 /* PBXBookmark */ = 4C667C6E1270CA3A0008B630 /* PBXBookmark */; + 4C667C6F1270CA3A0008B630 /* PBXBookmark */ = 4C667C6F1270CA3A0008B630 /* PBXBookmark */; + 4C667CAB1270CF150008B630 /* PBXTextBookmark */ = 4C667CAB1270CF150008B630 /* PBXTextBookmark */; + 4C667CAC1270CF150008B630 /* PBXTextBookmark */ = 4C667CAC1270CF150008B630 /* PBXTextBookmark */; + 4C667CB41270D1230008B630 /* PBXTextBookmark */ = 4C667CB41270D1230008B630 /* PBXTextBookmark */; + 4C667CB51270D1230008B630 /* PBXBookmark */ = 4C667CB51270D1230008B630 /* PBXBookmark */; + 4C667CB61270D1230008B630 /* PBXTextBookmark */ = 4C667CB61270D1230008B630 /* PBXTextBookmark */; + 4C667CBC1270D4560008B630 /* PBXTextBookmark */ = 4C667CBC1270D4560008B630 /* PBXTextBookmark */; 4C75D4A3126B7ABF004D0ECF /* PlistBookmark */ = 4C75D4A3126B7ABF004D0ECF /* PlistBookmark */; }; sourceControlManager = 4CC82BC21266793900C05633 /* Source Control */; userBuildSettings = { }; }; - 4C1C97A31270980E0076418C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623240D0F684500981E51 /* MWPhotoBrowserAppDelegate.h */; - name = "MWPhotoBrowserAppDelegate.h: 19"; - rLen = 0; - rLoc = 342; - rType = 0; - vrLen = 342; - vrLoc = 0; - }; - 4C3EAFA9126FC57800C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623250D0F684500981E51 /* MWPhotoBrowserAppDelegate.m */; - name = "MWPhotoBrowserAppDelegate.m: 24"; - rLen = 0; - rLoc = 578; - rType = 0; - vrLen = 4265; - vrLoc = 0; - }; 4C3EAFC9126FC70A00C7CF25 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 4C48EFCB126F8DD900F85546 /* UIImage+Decompress.h */; @@ -227,26 +212,6 @@ vrLen = 710; vrLoc = 0; }; - 4C3EAFCE126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28D7ACF60DDB3853001CB0EB /* MWPhotoBrowser.h */; - name = "MWPhotoBrowser.h: 12"; - rLen = 0; - rLoc = 213; - rType = 0; - vrLen = 1602; - vrLoc = 0; - }; - 4C3EAFCF126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 28D7ACF70DDB3853001CB0EB /* MWPhotoBrowser.m */; - name = "MWPhotoBrowser.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1949; - vrLoc = 0; - }; 4C3EAFD0126FC70A00C7CF25 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 4C75D46D126B659A004D0ECF /* MWPhoto.h */; @@ -257,46 +222,6 @@ vrLen = 968; vrLoc = 0; }; - 4C3EAFD1126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 4C75D46E126B659A004D0ECF /* MWPhoto.m */; - name = "MWPhoto.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 1542; - vrLoc = 0; - }; - 4C3EAFD2126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 4CC82BE41266804500C05633 /* ZoomingScrollView.h */; - name = "ZoomingScrollView.h: 30"; - rLen = 0; - rLoc = 577; - rType = 0; - vrLen = 846; - vrLoc = 0; - }; - 4C3EAFD3126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 4CC82BE51266804500C05633 /* ZoomingScrollView.m */; - name = "ZoomingScrollView.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 2026; - vrLoc = 0; - }; - 4C3EAFD6126FC70A00C7CF25 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1D3623240D0F684500981E51 /* MWPhotoBrowserAppDelegate.h */; - name = "MWPhotoBrowserAppDelegate.h: 14"; - rLen = 0; - rLoc = 277; - rType = 0; - vrLen = 342; - vrLoc = 0; - }; 4C48EFCB126F8DD900F85546 /* UIImage+Decompress.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1474, 1057}}"; @@ -335,6 +260,132 @@ vrLen = 790; vrLoc = 0; }; + 4C667B2B1270AFCE0008B630 /* Menu.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {1474, 1057}}"; + sepNavSelRange = "{157, 0}"; + sepNavVisRange = "{0, 209}"; + }; + }; + 4C667B2C1270AFCE0008B630 /* Menu.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {994, 1625}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 1562}"; + }; + }; + 4C667C591270C8370008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4CC82BE41266804500C05633 /* ZoomingScrollView.h */; + name = "ZoomingScrollView.h: 36"; + rLen = 0; + rLoc = 733; + rType = 0; + vrLen = 875; + vrLoc = 0; + }; + 4C667C5A1270C8370008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4CC82BE51266804500C05633 /* ZoomingScrollView.m */; + name = "ZoomingScrollView.m: 105"; + rLen = 0; + rLoc = 2627; + rType = 0; + vrLen = 1643; + vrLoc = 1603; + }; + 4C667C5D1270C8EC0008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4C667B2B1270AFCE0008B630 /* Menu.h */; + name = "Menu.h: 10"; + rLen = 0; + rLoc = 157; + rType = 0; + vrLen = 209; + vrLoc = 0; + }; + 4C667C5E1270C8EC0008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623240D0F684500981E51 /* MWPhotoBrowserAppDelegate.h */; + name = "MWPhotoBrowserAppDelegate.h: 19"; + rLen = 0; + rLoc = 342; + rType = 0; + vrLen = 342; + vrLoc = 0; + }; + 4C667C601270C8EC0008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4C75D46E126B659A004D0ECF /* MWPhoto.m */; + name = "MWPhoto.m: 114"; + rLen = 0; + rLoc = 2417; + rType = 0; + vrLen = 2295; + vrLoc = 1342; + }; + 4C667C6E1270CA3A0008B630 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 4C667C411270C6A50008B630 /* UIBarButtonItemArrowLeft.png */; + }; + 4C667C6F1270CA3A0008B630 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 4C667C421270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png */; + }; + 4C667CAB1270CF150008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4C667B2C1270AFCE0008B630 /* Menu.m */; + name = "Menu.m: 34"; + rLen = 0; + rLoc = 644; + rType = 0; + vrLen = 2216; + vrLoc = 33; + }; + 4C667CAC1270CF150008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF60DDB3853001CB0EB /* MWPhotoBrowser.h */; + name = "MWPhotoBrowser.h: 30"; + rLen = 0; + rLoc = 572; + rType = 0; + vrLen = 1571; + vrLoc = 0; + }; + 4C667CB41270D1230008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 28D7ACF70DDB3853001CB0EB /* MWPhotoBrowser.m */; + name = "MWPhotoBrowser.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 1823; + vrLoc = 0; + }; + 4C667CB51270D1230008B630 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 4CFB7931126A3B4100E5F263 /* photo1l.jpg */; + }; + 4C667CB61270D1230008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 1D3623250D0F684500981E51 /* MWPhotoBrowserAppDelegate.m */; + name = "MWPhotoBrowserAppDelegate.m: 21"; + rLen = 0; + rLoc = 469; + rType = 0; + vrLen = 2237; + vrLoc = 0; + }; + 4C667CBC1270D4560008B630 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 4C667B2C1270AFCE0008B630 /* Menu.m */; + name = "Menu.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 1562; + vrLoc = 0; + }; 4C75D46D126B659A004D0ECF /* MWPhoto.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1474, 1057}}"; @@ -344,9 +395,9 @@ }; 4C75D46E126B659A004D0ECF /* MWPhoto.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1474, 2418}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 1542}"; + sepNavIntBoundsRect = "{{0, 0}, {1859, 2366}}"; + sepNavSelRange = "{1606, 0}"; + sepNavVisRange = "{1343, 1546}"; }; }; 4C75D4A3126B7ABF004D0ECF /* PlistBookmark */ = { @@ -367,7 +418,7 @@ argumentStrings = ( ); autoAttachOnCrash = 1; - breakpointsEnabled = 1; + breakpointsEnabled = 0; configStateDict = { }; customDataFormattersEnabled = 1; @@ -409,15 +460,15 @@ 4CC82BE41266804500C05633 /* ZoomingScrollView.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1474, 1057}}"; - sepNavSelRange = "{577, 0}"; - sepNavVisRange = "{0, 846}"; + sepNavSelRange = "{733, 0}"; + sepNavVisRange = "{0, 875}"; }; }; 4CC82BE51266804500C05633 /* ZoomingScrollView.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1474, 3328}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 2026}"; + sepNavIntBoundsRect = "{{0, 0}, {1474, 3341}}"; + sepNavSelRange = "{2627, 0}"; + sepNavVisRange = "{1603, 1643}"; }; }; 4CFB783C126A29BE00E5F263 /* UIImageViewTap.h */ = { diff --git a/MWPhotoBrowser.xcodeproj/project.pbxproj b/MWPhotoBrowser.xcodeproj/project.pbxproj index d7a47afb6..393925773 100755 --- a/MWPhotoBrowser.xcodeproj/project.pbxproj +++ b/MWPhotoBrowser.xcodeproj/project.pbxproj @@ -16,6 +16,11 @@ 28D7ACF80DDB3853001CB0EB /* MWPhotoBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* MWPhotoBrowser.m */; }; 4C48EFCD126F8DD900F85546 /* UIImage+Decompress.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C48EFCC126F8DD900F85546 /* UIImage+Decompress.m */; }; 4C48EFD2126F90B100F85546 /* UIViewTap.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C48EFD1126F90B100F85546 /* UIViewTap.m */; }; + 4C667B2D1270AFCE0008B630 /* Menu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C667B2C1270AFCE0008B630 /* Menu.m */; }; + 4C667C451270C6A50008B630 /* UIBarButtonItemArrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C667C411270C6A50008B630 /* UIBarButtonItemArrowLeft.png */; }; + 4C667C461270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C667C421270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png */; }; + 4C667C471270C6A50008B630 /* UIBarButtonItemArrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C667C431270C6A50008B630 /* UIBarButtonItemArrowRight.png */; }; + 4C667C481270C6A50008B630 /* UIBarButtonItemArrowRight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C667C441270C6A50008B630 /* UIBarButtonItemArrowRight@2x.png */; }; 4C75D46F126B659A004D0ECF /* MWPhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C75D46E126B659A004D0ECF /* MWPhoto.m */; }; 4CC82BE61266804500C05633 /* ZoomingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC82BE51266804500C05633 /* ZoomingScrollView.m */; }; 4CFB783E126A29BE00E5F263 /* UIImageViewTap.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFB783D126A29BE00E5F263 /* UIImageViewTap.m */; }; @@ -45,20 +50,26 @@ 4C48EFCC126F8DD900F85546 /* UIImage+Decompress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Decompress.m"; sourceTree = ""; }; 4C48EFD0126F90B100F85546 /* UIViewTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIViewTap.h; sourceTree = ""; }; 4C48EFD1126F90B100F85546 /* UIViewTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIViewTap.m; sourceTree = ""; }; + 4C667B2B1270AFCE0008B630 /* Menu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Menu.h; sourceTree = ""; }; + 4C667B2C1270AFCE0008B630 /* Menu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Menu.m; sourceTree = ""; }; + 4C667C411270C6A50008B630 /* UIBarButtonItemArrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UIBarButtonItemArrowLeft.png; sourceTree = ""; }; + 4C667C421270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UIBarButtonItemArrowLeft@2x.png"; sourceTree = ""; }; + 4C667C431270C6A50008B630 /* UIBarButtonItemArrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = UIBarButtonItemArrowRight.png; sourceTree = ""; }; + 4C667C441270C6A50008B630 /* UIBarButtonItemArrowRight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "UIBarButtonItemArrowRight@2x.png"; sourceTree = ""; }; 4C75D46D126B659A004D0ECF /* MWPhoto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWPhoto.h; sourceTree = ""; }; 4C75D46E126B659A004D0ECF /* MWPhoto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWPhoto.m; sourceTree = ""; }; 4CC82BE41266804500C05633 /* ZoomingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZoomingScrollView.h; sourceTree = ""; }; 4CC82BE51266804500C05633 /* ZoomingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZoomingScrollView.m; sourceTree = ""; }; 4CFB783C126A29BE00E5F263 /* UIImageViewTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageViewTap.h; sourceTree = ""; }; 4CFB783D126A29BE00E5F263 /* UIImageViewTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIImageViewTap.m; sourceTree = ""; }; - 4CFB7931126A3B4100E5F263 /* photo1l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo1l.jpg; sourceTree = ""; }; - 4CFB7932126A3B4100E5F263 /* photo1m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo1m.jpg; sourceTree = ""; }; - 4CFB7933126A3B4100E5F263 /* photo2l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo2l.jpg; sourceTree = ""; }; - 4CFB7934126A3B4100E5F263 /* photo2m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo2m.jpg; sourceTree = ""; }; - 4CFB7935126A3B4100E5F263 /* photo3l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo3l.jpg; sourceTree = ""; }; - 4CFB7936126A3B4100E5F263 /* photo3m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo3m.jpg; sourceTree = ""; }; - 4CFB7937126A3B4100E5F263 /* photo4l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo4l.jpg; sourceTree = ""; }; - 4CFB7938126A3B4100E5F263 /* photo4m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = photo4m.jpg; sourceTree = ""; }; + 4CFB7931126A3B4100E5F263 /* photo1l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo1l.jpg; path = ../photo1l.jpg; sourceTree = ""; }; + 4CFB7932126A3B4100E5F263 /* photo1m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo1m.jpg; path = ../photo1m.jpg; sourceTree = ""; }; + 4CFB7933126A3B4100E5F263 /* photo2l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo2l.jpg; path = ../photo2l.jpg; sourceTree = ""; }; + 4CFB7934126A3B4100E5F263 /* photo2m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo2m.jpg; path = ../photo2m.jpg; sourceTree = ""; }; + 4CFB7935126A3B4100E5F263 /* photo3l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo3l.jpg; path = ../photo3l.jpg; sourceTree = ""; }; + 4CFB7936126A3B4100E5F263 /* photo3m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo3m.jpg; path = ../photo3m.jpg; sourceTree = ""; }; + 4CFB7937126A3B4100E5F263 /* photo4l.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo4l.jpg; path = ../photo4l.jpg; sourceTree = ""; }; + 4CFB7938126A3B4100E5F263 /* photo4m.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = photo4m.jpg; path = ../photo4m.jpg; sourceTree = ""; }; 8D1107310486CEB800E47090 /* MWPhotoBrowser-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "MWPhotoBrowser-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -81,6 +92,8 @@ children = ( 4CC82BC6126679A200C05633 /* App */, 4CC82BC51266798B00C05633 /* MWPhotoBrowser */, + 4C48EFD4126F90CA00F85546 /* Subclasses */, + 4C48EFD3126F90C600F85546 /* Categories */, ); path = Classes; sourceTree = ""; @@ -97,8 +110,9 @@ isa = PBXGroup; children = ( 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, + 4C667CB31270D0E50008B630 /* Photos */, 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); @@ -117,14 +131,10 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( - 4CFB7931126A3B4100E5F263 /* photo1l.jpg */, - 4CFB7932126A3B4100E5F263 /* photo1m.jpg */, - 4CFB7933126A3B4100E5F263 /* photo2l.jpg */, - 4CFB7934126A3B4100E5F263 /* photo2m.jpg */, - 4CFB7935126A3B4100E5F263 /* photo3l.jpg */, - 4CFB7936126A3B4100E5F263 /* photo3m.jpg */, - 4CFB7937126A3B4100E5F263 /* photo4l.jpg */, - 4CFB7938126A3B4100E5F263 /* photo4m.jpg */, + 4C667C411270C6A50008B630 /* UIBarButtonItemArrowLeft.png */, + 4C667C421270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png */, + 4C667C431270C6A50008B630 /* UIBarButtonItemArrowRight.png */, + 4C667C441270C6A50008B630 /* UIBarButtonItemArrowRight@2x.png */, 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 8D1107310486CEB800E47090 /* MWPhotoBrowser-Info.plist */, ); @@ -161,6 +171,22 @@ name = Subclasses; sourceTree = ""; }; + 4C667CB31270D0E50008B630 /* Photos */ = { + isa = PBXGroup; + children = ( + 4CFB7931126A3B4100E5F263 /* photo1l.jpg */, + 4CFB7932126A3B4100E5F263 /* photo1m.jpg */, + 4CFB7933126A3B4100E5F263 /* photo2l.jpg */, + 4CFB7934126A3B4100E5F263 /* photo2m.jpg */, + 4CFB7935126A3B4100E5F263 /* photo3l.jpg */, + 4CFB7936126A3B4100E5F263 /* photo3m.jpg */, + 4CFB7937126A3B4100E5F263 /* photo4l.jpg */, + 4CFB7938126A3B4100E5F263 /* photo4m.jpg */, + ); + name = Photos; + path = Classes; + sourceTree = ""; + }; 4CC82BC51266798B00C05633 /* MWPhotoBrowser */ = { isa = PBXGroup; children = ( @@ -170,8 +196,6 @@ 4C75D46E126B659A004D0ECF /* MWPhoto.m */, 4CC82BE41266804500C05633 /* ZoomingScrollView.h */, 4CC82BE51266804500C05633 /* ZoomingScrollView.m */, - 4C48EFD4126F90CA00F85546 /* Subclasses */, - 4C48EFD3126F90C600F85546 /* Categories */, ); name = MWPhotoBrowser; sourceTree = ""; @@ -181,6 +205,8 @@ children = ( 1D3623240D0F684500981E51 /* MWPhotoBrowserAppDelegate.h */, 1D3623250D0F684500981E51 /* MWPhotoBrowserAppDelegate.m */, + 4C667B2B1270AFCE0008B630 /* Menu.h */, + 4C667B2C1270AFCE0008B630 /* Menu.m */, ); name = App; sourceTree = ""; @@ -243,6 +269,10 @@ 4CFB793E126A3B4100E5F263 /* photo3m.jpg in Resources */, 4CFB793F126A3B4100E5F263 /* photo4l.jpg in Resources */, 4CFB7940126A3B4100E5F263 /* photo4m.jpg in Resources */, + 4C667C451270C6A50008B630 /* UIBarButtonItemArrowLeft.png in Resources */, + 4C667C461270C6A50008B630 /* UIBarButtonItemArrowLeft@2x.png in Resources */, + 4C667C471270C6A50008B630 /* UIBarButtonItemArrowRight.png in Resources */, + 4C667C481270C6A50008B630 /* UIBarButtonItemArrowRight@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -261,6 +291,7 @@ 4C75D46F126B659A004D0ECF /* MWPhoto.m in Sources */, 4C48EFCD126F8DD900F85546 /* UIImage+Decompress.m in Sources */, 4C48EFD2126F90B100F85546 /* UIViewTap.m in Sources */, + 4C667B2D1270AFCE0008B630 /* Menu.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/README.markdown b/README.markdown index 86a18d944..3faecc83c 100644 --- a/README.markdown +++ b/README.markdown @@ -1,13 +1,34 @@ # MWPhotoBrowser — A simple iOS photo browser -_Description coming soon._ +MWPhotoBrowser is an implementation of a photo browser similar to the native Photos app in iOS. It can display one or more images by providing either `UIImage` objects, file paths to images on the device, or URLs images online. Photos can also be zoomed and panned. + +***Photos kindly provided by Oliver Waters ()*** + + +## Usage + +MWPhotoBrowser is designed to be presented within a navigation controller. You pass the browser an array of `MWPhoto` objects to display. You can create an `MWPhoto` object by providing a `UIImage` object, a file path to a physical image file, or a URL to an image. + +See the code snippet below for an example of how to implement the photo browser. There is also a simple demo project within the project. + + // Create array of `MWPhoto` objects + NSMutableArray *photos = [NSMutableArray array]; + [photos addObject:[MWPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]]]; + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b.jpg"]]]; + [photos addObject:[MWPhoto photoWithURL:[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b.jpg"]]]; + + // Create & present browser + MWPhotoBrowser *browser = [[MWPhotoBrowser alloc] initWithPhotos:photos]; + [self.navigationController pushViewController:browser animated:YES]; + ## Adding to your project 1. Open `MWPhotoBrowser.xcodeproj`. -2. Drag the `MWPhotoBrowser` group into your project, ensuring you check **Copy items into destination group's folder**. -3. Import `MWPhotoBrowser.h` into your source as required. +2. Drag the `MWPhotoBrowser`, `Subclasses` and `Categories` groups into your project, ensuring you check **"Copy items into destination group's folder"**. +3. Copy the 4 `UIBarButtonItemArrow*.png` images and add them as resources to your bundle. +4. Import `MWPhotoBrowser.h` into your source as required. ## Licence diff --git a/UIBarButtonItemArrowLeft.png b/UIBarButtonItemArrowLeft.png new file mode 100644 index 000000000..4075997d9 Binary files /dev/null and b/UIBarButtonItemArrowLeft.png differ diff --git a/UIBarButtonItemArrowLeft@2x.png b/UIBarButtonItemArrowLeft@2x.png new file mode 100644 index 000000000..16c36ea36 Binary files /dev/null and b/UIBarButtonItemArrowLeft@2x.png differ diff --git a/UIBarButtonItemArrowRight.png b/UIBarButtonItemArrowRight.png new file mode 100644 index 000000000..19109d33a Binary files /dev/null and b/UIBarButtonItemArrowRight.png differ diff --git a/UIBarButtonItemArrowRight@2x.png b/UIBarButtonItemArrowRight@2x.png new file mode 100644 index 000000000..55c43c730 Binary files /dev/null and b/UIBarButtonItemArrowRight@2x.png differ