Commit b34a83bf authored by yuzheng.tz's avatar yuzheng.tz

在获取新的cachedImage之前先把旧的清空掉

parent 9a7248f7
...@@ -451,7 +451,7 @@ ...@@ -451,7 +451,7 @@
TargetAttributes = { TargetAttributes = {
900E657B1C2BB8D5003D9A9E = { 900E657B1C2BB8D5003D9A9E = {
CreatedOnToolsVersion = 7.2; CreatedOnToolsVersion = 7.2;
DevelopmentTeam = W3JQFZCRV5; DevelopmentTeam = T86X98NCU2;
ProvisioningStyle = Automatic; ProvisioningStyle = Automatic;
}; };
900E65941C2BB8D5003D9A9E = { 900E65941C2BB8D5003D9A9E = {
...@@ -752,7 +752,7 @@ ...@@ -752,7 +752,7 @@
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = W3JQFZCRV5; DEVELOPMENT_TEAM = T86X98NCU2;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/TZImagePickerController", "$(PROJECT_DIR)/TZImagePickerController",
...@@ -775,7 +775,7 @@ ...@@ -775,7 +775,7 @@
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = W3JQFZCRV5; DEVELOPMENT_TEAM = T86X98NCU2;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/TZImagePickerController", "$(PROJECT_DIR)/TZImagePickerController",
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
if (self.useCachedImage && model.cachedImage) { if (self.useCachedImage && model.cachedImage) {
self.imageView.image = model.cachedImage; self.imageView.image = model.cachedImage;
} else { } else {
self.model.cachedImage = nil;
int32_t imageRequestID = [[TZImageManager manager] getPhotoWithAsset:model.asset photoWidth:self.tz_width completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) { int32_t imageRequestID = [[TZImageManager manager] getPhotoWithAsset:model.asset photoWidth:self.tz_width completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
if (self->_progressView) { if (self->_progressView) {
self.progressView.hidden = YES; self.progressView.hidden = YES;
......
...@@ -606,7 +606,7 @@ static CGFloat itemMargin = 5; ...@@ -606,7 +606,7 @@ static CGFloat itemMargin = 5;
- (void)setUseCachedImageAndReloadData { - (void)setUseCachedImageAndReloadData {
self.useCachedImage = YES; self.useCachedImage = YES;
[self.collectionView reloadData]; [self.collectionView reloadData];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.useCachedImage = NO; self.useCachedImage = NO;
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment