mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-04-23 11:57:21 +08:00
Only call respondsToSelector once.
This commit is contained in:
committed by
Garrett Moon
parent
52c7463350
commit
999b5305ec
@@ -184,6 +184,8 @@
|
||||
options |= PINRemoteImageManagerDownloadOptionsIgnoreGIFs;
|
||||
}
|
||||
|
||||
BOOL updateWithFullResult = [view respondsToSelector:@selector(pin_updateUIWithRemoteImageManagerResult:)];
|
||||
|
||||
PINRemoteImageManagerImageCompletion internalProgress = nil;
|
||||
if ([self updateWithProgressOnView:view] && processorKey.length <= 0 && processor == nil) {
|
||||
internalProgress = ^(PINRemoteImageManagerResult *result)
|
||||
@@ -195,7 +197,7 @@
|
||||
return;
|
||||
}
|
||||
if (result.image) {
|
||||
if ([view respondsToSelector:@selector(pin_updateUIWithRemoteImageManagerResult:)]) {
|
||||
if (updateWithFullResult) {
|
||||
[view pin_updateUIWithRemoteImageManagerResult:result];
|
||||
}
|
||||
else {
|
||||
@@ -230,7 +232,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ([view respondsToSelector:@selector(pin_updateUIWithRemoteImageManagerResult:)]) {
|
||||
if (updateWithFullResult) {
|
||||
[view pin_updateUIWithRemoteImageManagerResult:result];
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user