diff --git a/Framework/Info.plist b/Framework/Info.plist
index f0993d5..d04a6b4 100644
--- a/Framework/Info.plist
+++ b/Framework/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.0.4
+ 1.0.5
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSPrincipalClass
diff --git a/Framework/YYImage.xcodeproj/project.pbxproj b/Framework/YYImage.xcodeproj/project.pbxproj
index c92e2ba..2e03acb 100644
--- a/Framework/YYImage.xcodeproj/project.pbxproj
+++ b/Framework/YYImage.xcodeproj/project.pbxproj
@@ -162,7 +162,7 @@
D9A995161F0564180062698B /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0900;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = ibireme;
TargetAttributes = {
D9A9951E1F0564180062698B = {
@@ -176,6 +176,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
+ Base,
);
mainGroup = D9A995151F0564180062698B;
productRefGroup = D9A995201F0564180062698B /* Products */;
@@ -227,12 +228,16 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
@@ -283,12 +288,16 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
diff --git a/Framework/YYImage.xcodeproj/xcshareddata/xcschemes/YYImage.xcscheme b/Framework/YYImage.xcodeproj/xcshareddata/xcschemes/YYImage.xcscheme
index 9b213ef..f92882d 100644
--- a/Framework/YYImage.xcodeproj/xcshareddata/xcschemes/YYImage.xcscheme
+++ b/Framework/YYImage.xcodeproj/xcshareddata/xcschemes/YYImage.xcscheme
@@ -1,7 +1,7 @@
+ LastUpgradeVersion = "1020"
+ version = "1.3">
@@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
diff --git a/YYImage/YYAnimatedImageView.m b/YYImage/YYAnimatedImageView.m
index 07ee652..5aa436f 100644
--- a/YYImage/YYAnimatedImageView.m
+++ b/YYImage/YYAnimatedImageView.m
@@ -431,13 +431,13 @@ - (void)startAnimating {
- (void)didReceiveMemoryWarning:(NSNotification *)notification {
[_requestQueue cancelAllOperations];
[_requestQueue addOperationWithBlock: ^{
- _incrBufferCount = -60 - (int)(arc4random() % 120); // about 1~3 seconds to grow back..
- NSNumber *next = @((_curIndex + 1) % _totalFrameCount);
+ self->_incrBufferCount = -60 - (int)(arc4random() % 120); // about 1~3 seconds to grow back..
+ NSNumber *next = @((self->_curIndex + 1) % self->_totalFrameCount);
LOCK(
- NSArray * keys = _buffer.allKeys;
+ NSArray * keys = self->_buffer.allKeys;
for (NSNumber * key in keys) {
if (![key isEqualToNumber:next]) { // keep the next frame for smoothly animation
- [_buffer removeObjectForKey:key];
+ [self->_buffer removeObjectForKey:key];
}
}
)//LOCK
@@ -577,20 +577,20 @@ - (void)setCurrentAnimatedImageIndex:(NSUInteger)currentAnimatedImageIndex {
if (currentAnimatedImageIndex >= _curAnimatedImage.animatedImageFrameCount) return;
if (_curIndex == currentAnimatedImageIndex) return;
- void (^block)() = ^{
+ void (^block)(void) = ^{
LOCK(
- [_requestQueue cancelAllOperations];
- [_buffer removeAllObjects];
+ [self->_requestQueue cancelAllOperations];
+ [self->_buffer removeAllObjects];
[self willChangeValueForKey:@"currentAnimatedImageIndex"];
- _curIndex = currentAnimatedImageIndex;
+ self->_curIndex = currentAnimatedImageIndex;
[self didChangeValueForKey:@"currentAnimatedImageIndex"];
- _curFrame = [_curAnimatedImage animatedImageFrameAtIndex:_curIndex];
- if (_curImageHasContentsRect) {
- _curContentsRect = [_curAnimatedImage animatedImageContentsRectAtIndex:_curIndex];
+ self->_curFrame = [self->_curAnimatedImage animatedImageFrameAtIndex:self->_curIndex];
+ if (self->_curImageHasContentsRect) {
+ self->_curContentsRect = [self->_curAnimatedImage animatedImageContentsRectAtIndex:self->_curIndex];
}
- _time = 0;
- _loopEnd = NO;
- _bufferMiss = NO;
+ self->_time = 0;
+ self->_loopEnd = NO;
+ self->_bufferMiss = NO;
[self.layer setNeedsDisplay];
)//LOCK
};
diff --git a/YYImage/YYImageCoder.h b/YYImage/YYImageCoder.h
index 31299e7..d644317 100644
--- a/YYImage/YYImageCoder.h
+++ b/YYImage/YYImageCoder.h
@@ -368,10 +368,10 @@ CG_EXTERN NSString *_Nullable YYImageTypeGetExtension(YYImageType type);
/// Returns the shared DeviceRGB color space.
-CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceRGB();
+CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceRGB(void);
/// Returns the shared DeviceGray color space.
-CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceGray();
+CG_EXTERN CGColorSpaceRef YYCGColorSpaceGetDeviceGray(void);
/// Returns whether a color space is DeviceRGB.
CG_EXTERN BOOL YYCGColorSpaceIsDeviceRGB(CGColorSpaceRef space);
@@ -446,7 +446,7 @@ CG_EXTERN CFDataRef _Nullable YYCGImageCreateEncodedData(CGImageRef imageRef, YY
/**
Whether WebP is available in YYImage.
*/
-CG_EXTERN BOOL YYImageWebPAvailable();
+CG_EXTERN BOOL YYImageWebPAvailable(void);
/**
Get a webp image frame count;