Permalink
Browse files

Merge pull request #311 from OTrumpf/master

setChromeTitle in NetworkPhotoExample / solved cache issues
  • Loading branch information...
2 parents 2023ba0 + ccb66e4 commit 2aac31c56ae38772b72cccb3353865736c1d3f91 @jverkoey committed Nov 19, 2012
@@ -144,7 +144,7 @@ - (void)requestImageFromSource:(NSString *)source
}
// Start the operation.
-
+ [_activeRequests addObject:identifierKey];
[_queue addOperation:readOp];
}
@@ -165,7 +165,7 @@ - (void)loadView {
_thumbnailImageCache = [[NIImageMemoryCache alloc] init];
[_highQualityImageCache setMaxNumberOfPixels:1024L*1024L*10L];
- [_highQualityImageCache setMaxNumberOfPixelsUnderStress:1024L*1024L*3L];
+ [_thumbnailImageCache setMaxNumberOfPixelsUnderStress:1024L*1024L*3L];
_queue = [[NSOperationQueue alloc] init];
[_queue setMaxConcurrentOperationCount:5];
@@ -124,6 +124,8 @@
#pragma mark Subclassing
- (void)setChromeVisibility:(BOOL)isVisible animated:(BOOL)animated;
+- (void)setChromeTitle;
+
@end
@@ -443,6 +443,12 @@ - (void)refreshChromeState {
self.previousButton.enabled = [self.photoAlbumView hasPrevious];
self.nextButton.enabled = [self.photoAlbumView hasNext];
+ [self setChromeTitle];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+- (void)setChromeTitle {
self.title = [NSString stringWithFormat:@"%d of %d",
(self.photoAlbumView.centerPageIndex + 1),
self.photoAlbumView.numberOfPages];

0 comments on commit 2aac31c

Please sign in to comment.