Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

setChromeTitle in NetworkPhotoExample / solved cache issues #311

Merged
merged 7 commits into from

2 participants

@OTrumpf

Hello,

as I am new to GitHub and still have some difficulties with the overall functionality, this pull request is not as structured as I'd wished.

NIToolbarPhotoViewController.h:
1) Feature: :added setChromeTitle for subclassing in order to change chrome title in derived view controllers

2) Bug: Fixed activeRequest-queue - adding of the identifier key was missing

3) Bug: Fixed issue when setting cache size of thumbnail and high quality image cache

Thank you for your great work on this library!

Oliver

@jverkoey jverkoey merged commit 2aac31c into from
@jverkoey
Owner

Awesome, thanks for the fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 5, 2012
  1. @OTrumpf

    added setChromeTitle for subclassing

    OTrumpf authored
    setChromeTitle allows individual titles in a subclass
  2. @OTrumpf

    added setChromeTitle for subclassing

    OTrumpf authored
    override setChromeTitle in a subclass for individual titles
Commits on Sep 7, 2012
  1. @OTrumpf
  2. @OTrumpf
Commits on Sep 8, 2012
  1. @OTrumpf
Commits on Sep 20, 2012
  1. @OTrumpf

    b2

    OTrumpf authored
Commits on Oct 3, 2012
  1. @OTrumpf
This page is out of date. Refresh to see the latest.
View
4 examples/photos/NetworkPhotoAlbums/src/NetworkPhotoAlbumViewController.m
@@ -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];
View
2  src/networkimage/src/NINetworkImageView.m
@@ -395,7 +395,7 @@ - (void)setPathToNetworkImage:(NSString *)pathToNetworkImage forDisplaySize:(CGS
[self _didFailToLoadWithError:error];
}];
- [operation setDownloadProgressBlock:^(NSInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {
+ [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {
if ([self.delegate respondsToSelector:@selector(networkImageView:readBytes:totalBytes:)]) {
[self.delegate networkImageView:self readBytes:totalBytesRead totalBytes:totalBytesExpectedToRead];
}
View
2  src/photos/src/NIToolbarPhotoViewController.h
@@ -123,6 +123,8 @@
#pragma mark Subclassing
- (void)setChromeVisibility:(BOOL)isVisible animated:(BOOL)animated;
+- (void)setChromeTitle;
+
@end
View
6 src/photos/src/NIToolbarPhotoViewController.m
@@ -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];
Something went wrong with that request. Please try again.