Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[FIX] Changing the imageKeyPath should reload all the images

  • Loading branch information...
commit 5817bbb23f5f9a5a6c0ba442220a21bd548503dd 1 parent eff108e
@mattball authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 MBCoverFlowView.m
View
17 MBCoverFlowView.m
@@ -389,6 +389,23 @@ - (void)setContent:(NSArray *)newContents
self.selectionIndex = self.selectionIndex;
}
+- (void)setImageKeyPath:(NSString *)keyPath
+{
+ if (_imageKeyPath) {
+ [_imageKeyPath release];
+ _imageKeyPath = nil;
+ }
+
+ if (keyPath) {
+ _imageKeyPath = [keyPath copy];
+ }
+
+ // Refresh all the layers with images at the new key path
+ for (CALayer *layer in [_scrollLayer sublayers]) {
+ [self _refreshLayer:layer];
+ }
+}
+
#pragma mark Setting Display Attributes
- (void)setAutoresizesItems:(BOOL)flag
Please sign in to comment.
Something went wrong with that request. Please try again.