Merge pull request #56 from SDWebImage/bugfix_watchkit_size_arg

Fix the issue that WatchKit patch will cause other WatchKit interfaceObject with sizing issue
This commit is contained in:
DreamPiggy 2019-11-14 22:01:32 +08:00 committed by GitHub
commit 7ac13afbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ static CGSize sizeThatFitsIMP(id<UIViewProtocol> self, SEL _cmd, CGSize size) {
NSUInteger tag = self.tag;
id<UIViewProtocol> interfaceView = self.subviews.firstObject;
if (tag != SDAnimatedImageInterfaceWrapperTag || !interfaceView) {
return ((CGSize(*)(id, SEL))objc_msgSend)(self, NSSelectorFromString(SDAnimatedImageInterfaceWrapperSEL_sizeThatFits));
return ((CGSize(*)(id, SEL, CGSize))objc_msgSend)(self, NSSelectorFromString(SDAnimatedImageInterfaceWrapperSEL_sizeThatFits), size);
}
return size;
}