Skip to content
Browse files

added activity indicator views

  • Loading branch information...
1 parent 70465c8 commit 210a080cbdd645317ae3ecc671f4fb249f57b858 @Agent007 committed Dec 30, 2011
View
6 FlickrFetcher.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ AF54A2EC14ABA594001B0E16 /* BackgroundLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = AF54A2EB14ABA593001B0E16 /* BackgroundLoader.m */; };
AF9DC2571487DFCB0017723F /* ImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9DC2561487DFCB0017723F /* ImageViewController.m */; };
AFAE162214832350001E7D41 /* iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AFAE162114832350001E7D41 /* iPad.storyboard */; };
AFAE1626148326D4001E7D41 /* FlickrFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = AFAE1625148326D4001E7D41 /* FlickrFetcher.m */; };
@@ -27,6 +28,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ AF54A2EA14ABA593001B0E16 /* BackgroundLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackgroundLoader.h; sourceTree = "<group>"; };
+ AF54A2EB14ABA593001B0E16 /* BackgroundLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BackgroundLoader.m; sourceTree = "<group>"; };
AF7096A314A9433300137DFC /* SplitViewBarButtonItemPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplitViewBarButtonItemPresenter.h; sourceTree = "<group>"; };
AF9DC2551487DFCB0017723F /* ImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageViewController.h; sourceTree = "<group>"; };
AF9DC2561487DFCB0017723F /* ImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageViewController.m; sourceTree = "<group>"; };
@@ -122,6 +125,8 @@
AFED37D314820F2B001DE098 /* Supporting Files */,
AFAE1627148328A9001E7D41 /* TopPlacesTableViewController.h */,
AFAE1628148328A9001E7D41 /* TopPlacesTableViewController.m */,
+ AF54A2EA14ABA593001B0E16 /* BackgroundLoader.h */,
+ AF54A2EB14ABA593001B0E16 /* BackgroundLoader.m */,
);
path = FlickrFetcher;
sourceTree = "<group>";
@@ -211,6 +216,7 @@
AFAE162C1483294F001E7D41 /* LastViewedPhotosTableViewController.m in Sources */,
AFAE163E14839618001E7D41 /* RecentPhotosTableViewController.m in Sources */,
AF9DC2571487DFCB0017723F /* ImageViewController.m in Sources */,
+ AF54A2EC14ABA594001B0E16 /* BackgroundLoader.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
BIN ...xcodeproj/project.xcworkspace/xcuserdata/jeffl.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
110 FlickrFetcher.xcodeproj/xcuserdata/jeffl.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -8,13 +8,13 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
- filePath = "FlickrFetcher/TopPlacesTableViewController.m"
- timestampString = "346629186.366984"
+ filePath = "FlickrFetcher/ImageViewController.m"
+ timestampString = "346827157.529268"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "40"
- endingLineNumber = "40"
- landmarkName = "-prepareForSegue:sender:"
+ startingLineNumber = "36"
+ endingLineNumber = "36"
+ landmarkName = "-photo"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
@@ -23,26 +23,40 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "FlickrFetcher/ImageViewController.m"
- timestampString = "346653657.03166"
+ timestampString = "346914573.968654"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "119"
- endingLineNumber = "119"
- landmarkName = "-viewDidLoad"
+ startingLineNumber = "55"
+ endingLineNumber = "55"
+ landmarkName = "-setPhoto:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
- filePath = "FlickrFetcher/ImageViewController.m"
- timestampString = "346638671.428791"
+ filePath = "FlickrFetcher/LastViewedPhotosTableViewController.m"
+ timestampString = "346647757.887231"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "33"
- endingLineNumber = "33"
- landmarkName = "-photo"
+ startingLineNumber = "36"
+ endingLineNumber = "36"
+ landmarkName = "-viewWillAppear:"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ isPathRelative = "1"
+ filePath = "FlickrFetcher/RecentPhotosTableViewController.m"
+ timestampString = "346911300.438174"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "28"
+ endingLineNumber = "28"
+ landmarkName = "-setPhotos:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
@@ -51,41 +65,81 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "FlickrFetcher/ImageViewController.m"
- timestampString = "346643652.432126"
+ timestampString = "346914573.968654"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "39"
- endingLineNumber = "39"
- landmarkName = "-setPhoto:"
+ startingLineNumber = "139"
+ endingLineNumber = "139"
+ landmarkName = "-viewDidLoad"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
- filePath = "FlickrFetcher/LastViewedPhotosTableViewController.m"
- timestampString = "346647757.887231"
+ filePath = "FlickrFetcher/BackgroundLoader.m"
+ timestampString = "346908638.274088"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "36"
- endingLineNumber = "36"
- landmarkName = "-viewWillAppear:"
+ startingLineNumber = "16"
+ endingLineNumber = "16"
+ landmarkName = "+viewDidLoad:withBlock:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
- filePath = "FlickrFetcher/RecentPhotosTableViewController.m"
- timestampString = "346647810.871331"
+ filePath = "FlickrFetcher/ImageViewController.m"
+ timestampString = "346914377.924428"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "21"
- endingLineNumber = "21"
- landmarkName = "-setPhotos:"
+ startingLineNumber = "44"
+ endingLineNumber = "44"
+ landmarkName = "-fetchPhotoAndSetTitle:"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ isPathRelative = "1"
+ filePath = "FlickrFetcher/ImageViewController.m"
+ timestampString = "346914455.224873"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "42"
+ endingLineNumber = "42"
+ landmarkName = "-fetchPhotoAndSetTitle:"
landmarkType = "5">
+ <Locations>
+ <Location
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "-[ImageViewController fetchPhotoAndSetTitle:]"
+ urlString = "file://localhost/Users/jeffl/FlickrFetcher/FlickrFetcher/ImageViewController.m"
+ timestampString = "346914455.236116"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "42"
+ endingLineNumber = "42">
+ </Location>
+ <Location
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ symbolName = "__45-[ImageViewController fetchPhotoAndSetTitle:]_block_invoke_0"
+ urlString = "file://localhost/Users/jeffl/FlickrFetcher/FlickrFetcher/ImageViewController.m"
+ timestampString = "346914455.236434"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "42"
+ endingLineNumber = "42">
+ </Location>
+ </Locations>
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
View
15 FlickrFetcher/BackgroundLoader.h
@@ -0,0 +1,15 @@
+//
+// BackgroundLoader.h
+// FlickrFetcher
+//
+// Created by Jeffrey Lam on 12/28/11.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+/* Decorator pattern was considered, but assignment hinted at using a helper class (see hint #2)*/
+
+#import <Foundation/Foundation.h>
+
+@interface BackgroundLoader : NSObject
++ (void)viewDidLoad:(UIView *)activityIndicatorView withBlock:(void (^)())block;
+@end
View
20 FlickrFetcher/BackgroundLoader.m
@@ -0,0 +1,20 @@
+//
+// BackgroundLoader.m
+// FlickrFetcher
+//
+// Created by Jeffrey Lam on 12/28/11.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "BackgroundLoader.h"
+
+@implementation BackgroundLoader
++ (void)viewDidLoad:(UIActivityIndicatorView *)activityIndicatorView withBlock:(void (^)())block
+{
+ //[activityIndicatorView startAnimating];
+
+ dispatch_queue_t downloadQueue = dispatch_queue_create("flickr downloader", NULL); // TODO parameterize queue name if this will be used in other apps
+ dispatch_async(downloadQueue, block);
+ dispatch_release(downloadQueue);
+}
+@end
View
6 FlickrFetcher/FlickrFetcher-Info.plist
@@ -40,5 +40,11 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
</dict>
</plist>
View
79 FlickrFetcher/ImageViewController.m
@@ -8,22 +8,25 @@
#import "ImageViewController.h"
#import "FlickrFetcher.h"
+#import "BackgroundLoader.h"
@interface ImageViewController() <UIScrollViewDelegate>
@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
-@property (nonatomic, weak) IBOutlet UIToolbar *toolbar;
+@property (weak, nonatomic) IBOutlet UIToolbar *toolbar;
+@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView;
@end
@implementation ImageViewController
-@synthesize scrollView;
-@synthesize imageView;
+@synthesize scrollView = _scrollView;
+@synthesize imageView = _imageView;
@synthesize photo = _photo;
-@synthesize titleLabel;
+@synthesize titleLabel = _titleLabel;
@synthesize splitViewBarButtonItem = _splitViewBarButtonItem;
@synthesize toolbar = _toolbar;
+@synthesize activityIndicatorView = _activityIndicatorView;
- (NSDictionary *)photo
{
@@ -33,13 +36,27 @@ - (NSDictionary *)photo
return _photo;
}
+-(void)fetchPhotoAndSetTitle:(NSDictionary *)photo
+{
+ NSData *imageData = [NSData dataWithContentsOfURL:[FlickrFetcher urlForPhoto:photo format:FlickrPhotoFormatLarge]];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ //[self.activityIndicatorView startAnimating];
+ UIImage *image = self.imageView.image = [UIImage imageWithData:imageData];
+ self.scrollView.contentSize = image.size;
+ self.titleLabel.text = [photo valueForKey:FLICKR_PHOTO_TITLE];
+ [self.activityIndicatorView stopAnimating];
+ });
+}
+
- (void)setPhoto:(NSDictionary *)photo
{
if (_photo != photo) {
+ [self.activityIndicatorView startAnimating];
_photo = photo;
self.scrollView.zoomScale = 1;
- self.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[FlickrFetcher urlForPhoto:photo format:FlickrPhotoFormatLarge]]];
- self.titleLabel.text = [photo valueForKey:FLICKR_PHOTO_TITLE];
+ [BackgroundLoader viewDidLoad:nil withBlock:^{
+ [self fetchPhotoAndSetTitle:photo];
+ }];
// save this photo in recently-viewed photos list
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *LAST_PHOTOS = @"LAST_PHOTOS";
@@ -116,58 +133,18 @@ - (void)viewDidLoad
{
[super viewDidLoad];
self.scrollView.delegate = self;
- self.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[FlickrFetcher urlForPhoto:self.photo format:FlickrPhotoFormatLarge]]];
- self.titleLabel.text = [self.photo valueForKey:FLICKR_PHOTO_TITLE];
+ [BackgroundLoader viewDidLoad:self.activityIndicatorView withBlock:^{
+ [self fetchPhotoAndSetTitle:self.photo];
+ }];
self.splitViewController.delegate = self;
}
-- (void)viewWillAppear:(BOOL)animated
-{
- [super viewWillAppear:animated];
- // code from https://github.com/mikegoodspeed/Places/blob/master/Places/PhotoViewController.m
- CGRect viewRect = self.scrollView.bounds;
- CGSize viewSize = viewRect.size;
- CGFloat viewWidth = viewSize.width;
- CGFloat viewHeight = viewSize.height;
- UIImage *image = self.imageView.image;
- CGSize imageSize = image.size;
- CGFloat imageWidth = imageSize.width;
- CGFloat imageHeight = imageSize.height;
- CGFloat screenAspect = viewWidth / viewHeight;
- CGFloat imageAspect = imageWidth / imageHeight;
-
- CGRect zoomRect;
- if (imageAspect > screenAspect)
- {
- zoomRect = CGRectMake(0, 0, imageHeight * screenAspect, imageHeight);
- }
- else
- {
- zoomRect = CGRectMake(0, 0, imageWidth, imageWidth / screenAspect);
- }
- CGSize zoomRectSize = zoomRect.size;
- zoomRect.origin.x = (imageWidth - zoomRectSize.width) / 2;
- zoomRect.origin.y = (imageHeight - zoomRectSize.height) / 2;
-
- [self.scrollView zoomToRect:zoomRect animated:NO];
-
- // Set the minimum zoom
- CGFloat xscale = viewWidth / imageWidth;
- CGFloat yscale = viewHeight / imageHeight;
-
- CGFloat minscale = (xscale < yscale ? xscale : yscale);
- self.scrollView.minimumZoomScale = minscale;
-}
-
-- (void)viewDidAppear:(BOOL)animated
-{
- [super viewDidAppear:animated];
-}
-
- (void)viewDidUnload
{
self.imageView = nil;
self.scrollView = nil;
+ self.toolbar = nil;
+ self.activityIndicatorView = nil;
[super viewDidUnload];
}
View
3 FlickrFetcher/RecentPhotosTableViewController.h
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface RecentPhotosTableViewController : UITableViewController
-@property (nonatomic, strong) NSArray *photos; // may be changed to "atomic" later when mult-threading is implemented in next assignment
+@property (nonatomic, strong) NSArray *photos;
+@property (nonatomic, strong) NSDictionary *place;
@end
View
34 FlickrFetcher/RecentPhotosTableViewController.m
@@ -9,10 +9,17 @@
#import "RecentPhotosTableViewController.h"
#import "FlickrFetcher.h"
#import "ImageViewController.h"
+#import "BackgroundLoader.h"
+
+@interface RecentPhotosTableViewController()
+@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView;
+@end
@implementation RecentPhotosTableViewController
+@synthesize activityIndicatorView = _activityIndicatorView;
@synthesize photos = _photos;
+@synthesize place = _place;
- (void)setPhotos:(NSArray *)photos
{
@@ -22,26 +29,33 @@ - (void)setPhotos:(NSArray *)photos
}
}
+- (void)setPlace:(NSDictionary *)place
+{
+ if (_place != place) {
+ _place = place;
+ [BackgroundLoader viewDidLoad:nil withBlock:^{
+ NSArray *photos = [FlickrFetcher photosInPlace:place maxResults:50];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.photos = photos;
+ [self.activityIndicatorView stopAnimating];
+ });
+ }];
+ }
+}
+
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"View Recent Photo From Place"]) {
- if ([segue isKindOfClass:[UIStoryboardPopoverSegue class]]) {
- //UIStoryboardPopoverSegue *popoverSegue = (UIStoryboardPopoverSegue *)segue;
- //[self.popoverController dismissPopoverAnimated:YES];
- //self.popoverController = popoverSegue.popoverController; // might want to be popover's delegate and self.popoverController = nil on dismiss?
- }
- //[segue.destinationViewController setDelegate:self];
NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
NSDictionary *photo = [self.photos objectAtIndex:indexPath.row];
id viewController = segue.destinationViewController;
[viewController setTitle:((UITableViewCell *)sender).textLabel.text];
- ((ImageViewController *) viewController).photo = photo;
+ ((ImageViewController *)viewController).photo = photo;
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
- // Return YES for supported orientations
return YES;
}
@@ -84,4 +98,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
detailViewController.photo = photo;
}
+- (void)viewDidUnload {
+ self.activityIndicatorView = nil;
+ [super viewDidUnload];
+}
@end
View
1 FlickrFetcher/TopPlacesTableViewController.h
@@ -9,5 +9,4 @@
#import <UIKit/UIKit.h>
@interface TopPlacesTableViewController : UITableViewController
-
@end
View
29 FlickrFetcher/TopPlacesTableViewController.m
@@ -9,16 +9,19 @@
#import "TopPlacesTableViewController.h"
#import "FlickrFetcher.h"
#import "RecentPhotosTableViewController.h"
+#import "BackgroundLoader.h"
@interface TopPlacesTableViewController()
-@property (nonatomic, strong) NSArray *topPlaces; // TODO may be changed to "atomic" later when mult-threading is implemented in next assignment
+@property (nonatomic, strong) NSArray *topPlaces;
@property (nonatomic, strong) NSDictionary *countries;
+@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView; // TODO extract all activityIndicatorViews and put into BackgroundLoader by programatically creating the activity indicator view and its parent plain UIView; or, use a 3rd party component like https://github.com/mattmmatt/MBProgressHUD when coding professionally instead of doing this as a homework
@end
@implementation TopPlacesTableViewController
@synthesize topPlaces = _topPlaces;
@synthesize countries = _countries;
+@synthesize activityIndicatorView = _activityIndicatorView;
- (void)setTopPlaces:(NSArray *)topPlaces
{
@@ -41,20 +44,24 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
NSString *country = [self tableView:self.tableView titleForHeaderInSection:indexPath.section];
NSDictionary *place = [[self.countries valueForKey:country] objectAtIndex:indexPath.row];
- [segue.destinationViewController setPhotos:[FlickrFetcher photosInPlace:place maxResults:50]];
+ [segue.destinationViewController setPlace:place];
}
}
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return YES;
+}
+
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
- dispatch_queue_t downloadQueue = dispatch_queue_create("flickr downloader", NULL);
- dispatch_async(downloadQueue, ^{
+ [BackgroundLoader viewDidLoad:nil withBlock:^{
NSArray *unorderedPlaces = [FlickrFetcher topPlaces];
dispatch_async(dispatch_get_main_queue(), ^{
- // TODO stop progress bar
+ [self.activityIndicatorView stopAnimating];
NSArray *topPlaces = self.topPlaces = [unorderedPlaces sortedArrayUsingDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:FLICKR_PLACE_NAME ascending:YES]]];
NSMutableDictionary *countries = [NSMutableDictionary dictionary];
for (NSDictionary *place in topPlaces) {
@@ -69,13 +76,7 @@ - (void)viewDidLoad
}
self.countries = countries;
});
- });
- dispatch_release(downloadQueue);
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- return YES;
+ }];
}
#pragma mark - Table view data source
@@ -129,4 +130,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
return cell;
}
+- (void)viewDidUnload {
+ self.activityIndicatorView = nil;
+ [super viewDidUnload];
+}
@end
View
64 FlickrFetcher/en.lproj/iPhone.storyboard
@@ -9,7 +9,7 @@
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="bOR-yT-jsa" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController title="Top Places" definesPresentationContext="YES" id="0gM-DS-9x7" sceneMemberID="viewController">
- <tabBarItem key="tabBarItem" title="Top Places" id="BW9-3L-dl8"/>
+ <tabBarItem key="tabBarItem" systemItem="topRated" id="BW9-3L-dl8"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="Pj5-mY-JYG">
<autoresizingMask key="autoresizingMask"/>
@@ -29,6 +29,16 @@
<rect key="frame" x="0.0" y="64" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <view key="tableFooterView" alpha="0.50000000000000011" contentMode="scaleToFill" id="9FQ-jz-DJD">
+ <rect key="frame" x="0.0" y="66" width="320" height="354"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <activityIndicatorView opaque="NO" contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="Alm-cb-dtL">
+ <rect key="frame" x="152" y="165" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
+ </subviews>
+ </view>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Place" textLabel="YTM-2S-BeY" detailTextLabel="fgn-pf-Yp4" style="IBUITableViewCellStyleSubtitle" id="Gpp-nc-3mj">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
@@ -64,8 +74,11 @@
<outlet property="delegate" destination="Eux-R8-ILy" id="cVB-0X-yBJ"/>
</connections>
</tableView>
- <tabBarItem key="tabBarItem" title="Top Places" id="wqU-qG-coP"/>
+ <tabBarItem key="tabBarItem" systemItem="topRated" id="wqU-qG-coP"/>
<navigationItem key="navigationItem" id="NSS-d7-7zJ"/>
+ <connections>
+ <outlet property="activityIndicatorView" destination="Alm-cb-dtL" id="OWi-cP-zQa"/>
+ </connections>
</tableViewController>
</objects>
<point key="canvasLocation" x="516" y="263"/>
@@ -78,6 +91,17 @@
<rect key="frame" x="0.0" y="64" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <view key="tableFooterView" contentMode="scaleToFill" id="9Df-fn-S11">
+ <rect key="frame" x="0.0" y="66" width="320" height="303"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <activityIndicatorView contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="n7L-kN-jtt">
+ <rect key="frame" x="150" y="142" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Photo" textLabel="1DT-RM-bAi" detailTextLabel="Xes-b3-fOP" style="IBUITableViewCellStyleSubtitle" id="pO2-ww-ECQ">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
@@ -115,6 +139,9 @@
</tableView>
<navigationItem key="navigationItem" id="leb-qr-GPp"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
+ <connections>
+ <outlet property="activityIndicatorView" destination="n7L-kN-jtt" id="ph3-Dd-sVU"/>
+ </connections>
</tableViewController>
</objects>
<point key="canvasLocation" x="923" y="263"/>
@@ -164,7 +191,7 @@
<outlet property="delegate" destination="5Gw-qk-B7x" id="Ziu-gb-EkN"/>
</connections>
</tableView>
- <tabBarItem key="tabBarItem" title="Last Viewed Photos" id="H5C-cK-4AR"/>
+ <tabBarItem key="tabBarItem" systemItem="recents" id="H5C-cK-4AR"/>
<navigationItem key="navigationItem" id="Tph-9J-Qx1"/>
</tableViewController>
</objects>
@@ -182,7 +209,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="vh1-vZ-Bib">
+ <activityIndicatorView opaque="NO" contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="B8r-Ml-7in">
+ <rect key="frame" x="151" y="173" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" id="vh1-vZ-Bib">
<rect key="frame" x="0.0" y="0.0" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
@@ -194,6 +225,7 @@
<navigationItem key="navigationItem" id="DND-gl-O5D"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<connections>
+ <outlet property="activityIndicatorView" destination="B8r-Ml-7in" id="Ffg-E5-RjW"/>
<outlet property="imageView" destination="vh1-vZ-Bib" id="YvJ-h5-bO9"/>
<outlet property="scrollView" destination="YXa-PQ-TVt" id="7C7-sa-mja"/>
</connections>
@@ -205,7 +237,7 @@
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="rgD-1I-F0e" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController title="Last Viewed Photos" definesPresentationContext="YES" id="Wq4-Gv-z6k" sceneMemberID="viewController">
- <tabBarItem key="tabBarItem" title="Last Viewed Photos" id="Bm7-AE-rQL"/>
+ <tabBarItem key="tabBarItem" systemItem="recents" id="Bm7-AE-rQL"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="l4F-lC-NnT">
<autoresizingMask key="autoresizingMask"/>
@@ -236,32 +268,12 @@
<point key="canvasLocation" x="-471" y="624"/>
</scene>
</scenes>
- <classes>
- <class className="ImageViewController" superclassName="UIViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/ImageViewController.h"/>
- <relationships>
- <relationship kind="outlet" name="imageView" candidateClass="UIImageView"/>
- <relationship kind="outlet" name="scrollView" candidateClass="UIScrollView"/>
- <relationship kind="outlet" name="titleLabel" candidateClass="UILabel"/>
- <relationship kind="outlet" name="toolbar" candidateClass="UIToolbar"/>
- </relationships>
- </class>
- <class className="LastViewedPhotosTableViewController" superclassName="RecentPhotosTableViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/LastViewedPhotosTableViewController.h"/>
- </class>
- <class className="RecentPhotosTableViewController" superclassName="UITableViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/RecentPhotosTableViewController.h"/>
- </class>
- <class className="TopPlacesTableViewController" superclassName="UITableViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/TopPlacesTableViewController.h"/>
- </class>
- </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
- <segue reference="3E8-8V-MOw"/>
+ <segue reference="cvK-9O-2kH"/>
</inferredMetricsTieBreakers>
</document>
View
57 FlickrFetcher/iPad.storyboard
@@ -27,7 +27,7 @@
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="jao-qd-BPG" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController definesPresentationContext="YES" id="TpP-gE-aI2" sceneMemberID="viewController">
- <tabBarItem key="tabBarItem" title="Top Places" id="Izm-xo-MHZ"/>
+ <tabBarItem key="tabBarItem" systemItem="topRated" id="Izm-xo-MHZ"/>
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="5Ta-lH-ONM">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
@@ -46,6 +46,17 @@
<rect key="frame" x="0.0" y="64" width="320" height="739"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <view key="tableFooterView" contentMode="scaleToFill" id="ZjS-00-GxL">
+ <rect key="frame" x="0.0" y="66" width="320" height="742"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <activityIndicatorView contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="XQF-xi-Xfa">
+ <rect key="frame" x="150" y="361" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Place" textLabel="dA5-Ya-6ov" detailTextLabel="Dm1-zN-bSw" style="IBUITableViewCellStyleSubtitle" id="pb4-0x-af7">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
@@ -81,7 +92,7 @@
<outlet property="delegate" destination="A1f-sB-TLU" id="MR2-U0-yYX"/>
</connections>
</tableView>
- <tabBarItem key="tabBarItem" title="Top Places" id="m97-Es-tL0"/>
+ <tabBarItem key="tabBarItem" systemItem="topRated" id="m97-Es-tL0"/>
<navigationItem key="navigationItem" id="O4y-VV-YQ0"/>
</tableViewController>
</objects>
@@ -95,6 +106,17 @@
<rect key="frame" x="0.0" y="64" width="320" height="739"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ <view key="tableFooterView" contentMode="scaleToFill" id="4Mx-BM-qse">
+ <rect key="frame" x="0.0" y="66" width="320" height="978"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <activityIndicatorView opaque="NO" contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="IL7-cJ-Akg">
+ <rect key="frame" x="150" y="479" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Photo" textLabel="ywC-y2-dns" detailTextLabel="qXw-fv-Hbd" style="IBUITableViewCellStyleSubtitle" id="C8M-74-geV">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
@@ -129,6 +151,9 @@
</tableView>
<navigationItem key="navigationItem" id="kD5-7c-Dj2"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="blackTranslucent"/>
+ <connections>
+ <outlet property="activityIndicatorView" destination="IL7-cJ-Akg" id="CX0-oc-2t5"/>
+ </connections>
</tableViewController>
</objects>
<point key="canvasLocation" x="1388" y="-345"/>
@@ -175,7 +200,7 @@
<outlet property="delegate" destination="IWT-fG-SAj" id="vc0-x8-GEg"/>
</connections>
</tableView>
- <tabBarItem key="tabBarItem" title="Last Viewed Photos" id="0Eb-Pg-yXD"/>
+ <tabBarItem key="tabBarItem" systemItem="recents" id="0Eb-Pg-yXD"/>
</tableViewController>
</objects>
<point key="canvasLocation" x="386" y="777"/>
@@ -193,28 +218,33 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<items/>
</toolbar>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="poJ-hi-cy4">
+ <rect key="frame" x="256" y="11" width="256" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFill" minimumZoomScale="-4" maximumZoomScale="4" id="FiO-ky-cM5">
<rect key="frame" x="0.0" y="44" width="768" height="960"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
+ <activityIndicatorView opaque="NO" contentMode="scaleToFill" hidesWhenStopped="YES" animating="YES" style="gray" id="R78-TK-7LO">
+ <rect key="frame" x="374" y="470" width="20" height="20"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
+ </activityIndicatorView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" id="BxJ-r7-lxb">
<rect key="frame" x="0.0" y="0.0" width="768" height="960"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
</scrollView>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" id="poJ-hi-cy4">
- <rect key="frame" x="256" y="11" width="256" height="21"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<toolbarItems/>
<connections>
+ <outlet property="activityIndicatorView" destination="R78-TK-7LO" id="zhM-nM-uei"/>
<outlet property="imageView" destination="BxJ-r7-lxb" id="X1M-gf-EJS"/>
<outlet property="scrollView" destination="FiO-ky-cM5" id="18l-xV-7NF"/>
<outlet property="titleLabel" destination="poJ-hi-cy4" id="Qfn-2H-DfS"/>
@@ -242,6 +272,7 @@
<class className="ImageViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/ImageViewController.h"/>
<relationships>
+ <relationship kind="outlet" name="activityIndicatorView" candidateClass="UIActivityIndicatorView"/>
<relationship kind="outlet" name="imageView" candidateClass="UIImageView"/>
<relationship kind="outlet" name="scrollView" candidateClass="UIScrollView"/>
<relationship kind="outlet" name="titleLabel" candidateClass="UILabel"/>
@@ -253,9 +284,15 @@
</class>
<class className="RecentPhotosTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/RecentPhotosTableViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="activityIndicatorView" candidateClass="UIActivityIndicatorView"/>
+ </relationships>
</class>
<class className="TopPlacesTableViewController" superclassName="UITableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/TopPlacesTableViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="activityIndicatorView" candidateClass="UIActivityIndicatorView"/>
+ </relationships>
</class>
</classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">

0 comments on commit 210a080

Please sign in to comment.
Something went wrong with that request. Please try again.