diff --git a/JGProgressHUD.podspec b/JGProgressHUD.podspec index 06f1c25..48aeeb7 100644 --- a/JGProgressHUD.podspec +++ b/JGProgressHUD.podspec @@ -1,14 +1,14 @@ Pod::Spec.new do |s| s.name = "JGProgressHUD" - s.version = "1.2.1" + s.version = "1.2.2" s.summary = "Powerful and modern progress HUD for iOS." s.homepage = "https://github.com/JonasGessner/JGProgressHUD" s.license = { :type => "MIT", :file => "LICENSE.txt" } s.author = "Jonas Gessner" s.social_media_url = "http://twitter.com/JonasGessner" s.platform = :ios, "5.0" - s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.2.1" } + s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.2.2" } s.source_files = "JGProgressHUD/JGProgressHUD/*.{h,m}" s.resources = "JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle" s.frameworks = "Foundation", "UIKit", "QuartzCore" diff --git a/JGProgressHUD/JGProgressHUD-Prefix.pch b/JGProgressHUD/JGProgressHUD-Prefix.pch index 0680be5..eb2007e 100644 --- a/JGProgressHUD/JGProgressHUD-Prefix.pch +++ b/JGProgressHUD/JGProgressHUD-Prefix.pch @@ -6,4 +6,4 @@ #ifdef __OBJC__ #import -#endif \ No newline at end of file +#endif diff --git a/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj b/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj index c10c0c1..7e3e1da 100644 --- a/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj +++ b/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 6B29118E19CA0D4500E93DF9 /* jg_hud_error@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B29118C19CA0D4500E93DF9 /* jg_hud_error@3x.png */; }; + 6B29118F19CA0D4500E93DF9 /* jg_hud_success@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B29118D19CA0D4500E93DF9 /* jg_hud_success@3x.png */; }; 6B60B25419A3B78B00ED1A4E /* JGProgressHUDSuccessIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B60B25319A3B78B00ED1A4E /* JGProgressHUDSuccessIndicatorView.m */; }; 6B60B25719A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B60B25619A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.m */; }; 6B60B27519A3C34D00ED1A4E /* jg_hud_error.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27119A3C34D00ED1A4E /* jg_hud_error.png */; }; @@ -37,6 +39,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6B29118C19CA0D4500E93DF9 /* jg_hud_error@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "jg_hud_error@3x.png"; path = "JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_error@3x.png"; sourceTree = SOURCE_ROOT; }; + 6B29118D19CA0D4500E93DF9 /* jg_hud_success@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "jg_hud_success@3x.png"; path = "JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_success@3x.png"; sourceTree = SOURCE_ROOT; }; 6B334B46197DB7940010087F /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 6B60B24019A3B3C500ED1A4E /* JGProgressHUD Resources.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "JGProgressHUD Resources.bundle"; sourceTree = BUILT_PRODUCTS_DIR; }; 6B60B25219A3B78B00ED1A4E /* JGProgressHUDSuccessIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JGProgressHUDSuccessIndicatorView.h; sourceTree = ""; }; @@ -96,8 +100,10 @@ children = ( 6B60B27119A3C34D00ED1A4E /* jg_hud_error.png */, 6B60B27219A3C34D00ED1A4E /* jg_hud_error@2x.png */, + 6B29118C19CA0D4500E93DF9 /* jg_hud_error@3x.png */, 6B60B27319A3C34D00ED1A4E /* jg_hud_success.png */, 6B60B27419A3C34D00ED1A4E /* jg_hud_success@2x.png */, + 6B29118D19CA0D4500E93DF9 /* jg_hud_success@3x.png */, ); path = Resources; sourceTree = SOURCE_ROOT; @@ -279,10 +285,12 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6B60B27619A3C34D00ED1A4E /* jg_hud_error@2x.png in Resources */, 6B60B27519A3C34D00ED1A4E /* jg_hud_error.png in Resources */, + 6B60B27619A3C34D00ED1A4E /* jg_hud_error@2x.png in Resources */, + 6B29118E19CA0D4500E93DF9 /* jg_hud_error@3x.png in Resources */, 6B60B27719A3C34D00ED1A4E /* jg_hud_success.png in Resources */, 6B60B27819A3C34D00ED1A4E /* jg_hud_success@2x.png in Resources */, + 6B29118F19CA0D4500E93DF9 /* jg_hud_success@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -424,28 +432,118 @@ 6BC01897197B2AA600DA4C49 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; DSTROOT = /tmp/JGProgressHUD.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JGProgressHUD-Prefix.pch"; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = include; SKIP_INSTALL = YES; WARNING_CFLAGS = "-Wfloat-equal"; + WARNING_LDFLAGS = ( + "-Weverything", + "-Wcast-align", + "-Wmissing-declarations", + "-Wmissing-prototypes", + "-Woverlength-strings", + "-Wshadow", + "-Wundeclared-selector", + "-Wunreachable-code", + "-Wformat=2", + "-Woverriding-method-mismatch", + "-Wno-objc-missing-property-synthesis", + "-Wno-unused-parameter", + "-Wno-covered-switch-default", + "-Wno-direct-ivar-access", + "-Wno-assign-enum", + "-Wno-float-equal", + "-Wno-switch-enum", + "-Wno-implicit-retain-self", + "-Wno-vla", + "-Wno-pedantic", + "-Wno-explicit-ownership-type", + "-Wno-bad-function-cast", + "-Wno-documentation-unknown-command", + "-Wno-packed", + ); }; name = Debug; }; 6BC01898197B2AA600DA4C49 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_ASSIGN_ENUM = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = NO; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; DSTROOT = /tmp/JGProgressHUD.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JGProgressHUD-Prefix.pch"; + GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; + GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; PUBLIC_HEADERS_FOLDER_PATH = include; SKIP_INSTALL = YES; WARNING_CFLAGS = "-Wfloat-equal"; + WARNING_LDFLAGS = ( + "-Weverything", + "-Wcast-align", + "-Wmissing-declarations", + "-Wmissing-prototypes", + "-Woverlength-strings", + "-Wshadow", + "-Wundeclared-selector", + "-Wunreachable-code", + "-Wformat=2", + "-Woverriding-method-mismatch", + "-Wno-objc-missing-property-synthesis", + "-Wno-unused-parameter", + "-Wno-covered-switch-default", + "-Wno-direct-ivar-access", + "-Wno-assign-enum", + "-Wno-float-equal", + "-Wno-switch-enum", + "-Wno-implicit-retain-self", + "-Wno-vla", + "-Wno-pedantic", + "-Wno-explicit-ownership-type", + "-Wno-bad-function-cast", + "-Wno-documentation-unknown-command", + "-Wno-packed", + ); }; name = Release; }; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_error@3x.png b/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_error@3x.png new file mode 100644 index 0000000..40a609a Binary files /dev/null and b/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_error@3x.png differ diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_success@3x.png b/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_success@3x.png new file mode 100644 index 0000000..e6a9dfb Binary files /dev/null and b/JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle/jg_hud_success@3x.png differ diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD.h b/JGProgressHUD/JGProgressHUD/JGProgressHUD.h index 5c34f93..4e54407 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUD.h +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUD.h @@ -79,8 +79,8 @@ typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { /** A HUD view to indicate progress, success, error, warnings or other notifications to the user. - @Note Remember to call every method from the main thread! UIKit = always main thread! - @Attention This applies only to iOS 8 and higher: You may not add JGProgressHUD to a view which has an alpha value < 1.0 or to a view which is a subview of a view with an alpha value < 1.0. + @note Remember to call every method from the main thread! UIKit = always main thread! + @attention This applies only to iOS 8 and higher: You may not add JGProgressHUD to a view which has an alpha value < 1.0 or to a view which is a subview of a view with an alpha value < 1.0. */ @interface JGProgressHUD : UIView @@ -110,14 +110,14 @@ typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { /** A block to be invoked when the HUD view is tapped. - @Note The interaction type of the HUD must be JGProgressHUDInteractionTypeBlockTouchesOnHUDView or JGProgressHUDInteractionTypeBlockNoTouches, if not this block won't be fired. + @note The interaction type of the HUD must be JGProgressHUDInteractionTypeBlockTouchesOnHUDView or JGProgressHUDInteractionTypeBlockNoTouches, if not this block won't be fired. */ @property (nonatomic, copy) void (^tapOnHUDViewBlock)(JGProgressHUD *HUD); /** A block to be invoked when the area outside of the HUD view is tapped. - @Note The interaction type of the HUD must be JGProgressHUDInteractionTypeBlockNoTouches, if not this block won't be fired. + @note The interaction type of the HUD must be JGProgressHUDInteractionTypeBlockNoTouches, if not this block won't be fired. */ @property (nonatomic, copy) void (^tapOutsideBlock)(JGProgressHUD *HUD); @@ -250,7 +250,7 @@ typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { /** Shows the HUD. You should preferably show the HUD in a UIViewController's view. @param view The view to show the HUD in. The frame of the @c view will be used to calculate the position of the HUD. - @param If th HUD should show with an animation. + @param animated If th HUD should show with an animation. */ - (void)showInView:(UIView *)view animated:(BOOL)animated; @@ -265,7 +265,7 @@ typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { Shows the HUD animated. You should preferably show the HUD in a UIViewController's view. @param view The view to show the HUD in. @param rect The rect allocated in @c view for displaying the HUD. - @param If th HUD should show with an animation. + @param animated If th HUD should show with an animation. */ - (void)showInRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated; @@ -329,11 +329,11 @@ typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { @interface JGProgressHUD (Deprecated) /** - @Warning Deprecated. Use @c indicatorView. + @warning Deprecated. Use @c indicatorView. */ @property (nonatomic, strong) JGProgressHUDIndicatorView *progressIndicatorView DEPRECATED_ATTRIBUTE; /** - @Warning Deprecated this no longer has any effect. To show no indicator view set @c indicatorView to @c nil, otherwise assign an indicator view to @c indicatorView (By default @c indicatorView is @c JGProgressHUDIndeterminateIndicatorView). + @warning Deprecated this no longer has any effect. To show no indicator view set @c indicatorView to @c nil, otherwise assign an indicator view to @c indicatorView (By default @c indicatorView is @c JGProgressHUDIndeterminateIndicatorView). @sa indicatorView. */ @property (nonatomic, assign) BOOL useProgressIndicatorView DEPRECATED_ATTRIBUTE; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD.m b/JGProgressHUD/JGProgressHUD/JGProgressHUD.m index 9baa275..b1cc1f9 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUD.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUD.m @@ -105,7 +105,7 @@ - (instancetype)init { return [self initWithStyle:JGProgressHUDStyleExtraLight]; } -- (instancetype)initWithFrame:(CGRect)frame { +- (instancetype)initWithFrame:(CGRect __unused)frame { return [self initWithStyle:JGProgressHUDStyleExtraLight]; } @@ -483,7 +483,7 @@ - (void)keyboardFrameChanged:(NSNotification *)notification { NSTimeInterval duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; - UIViewAnimationCurve curve = [notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue]; + UIViewAnimationCurve curve = (UIViewAnimationCurve)[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] unsignedIntegerValue]; [UIView beginAnimations:@"de.j-gessner.jgprogresshud.keyboardframechange" context:NULL]; [UIView setAnimationCurve:curve]; @@ -594,8 +594,8 @@ - (UILabel *)textLabel { _textLabel.textAlignment = NSTextAlignmentCenter; _textLabel.font = [UIFont boldSystemFontOfSize:15.0f]; _textLabel.numberOfLines = 0; - [_textLabel addObserver:self forKeyPath:@"text" options:kNilOptions context:NULL]; - [_textLabel addObserver:self forKeyPath:@"font" options:kNilOptions context:NULL]; + [_textLabel addObserver:self forKeyPath:@"text" options:(NSKeyValueObservingOptions)kNilOptions context:NULL]; + [_textLabel addObserver:self forKeyPath:@"font" options:(NSKeyValueObservingOptions)kNilOptions context:NULL]; [self.contentView addSubview:_textLabel]; } @@ -611,8 +611,8 @@ - (UILabel *)detailTextLabel { _detailTextLabel.textAlignment = NSTextAlignmentCenter; _detailTextLabel.font = [UIFont systemFontOfSize:13.0f]; _detailTextLabel.numberOfLines = 0; - [_detailTextLabel addObserver:self forKeyPath:@"text" options:kNilOptions context:NULL]; - [_detailTextLabel addObserver:self forKeyPath:@"font" options:kNilOptions context:NULL]; + [_detailTextLabel addObserver:self forKeyPath:@"text" options:(NSKeyValueObservingOptions)kNilOptions context:NULL]; + [_detailTextLabel addObserver:self forKeyPath:@"font" options:(NSKeyValueObservingOptions)kNilOptions context:NULL]; [self.contentView addSubview:_detailTextLabel]; } diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m index 3c57d5a..b1ad471 100644 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m @@ -10,7 +10,7 @@ @implementation JGProgressHUDErrorIndicatorView -- (instancetype)initWithContentView:(UIView *)contentView { +- (instancetype)initWithContentView:(UIView *__unused)contentView { NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[bundlePath stringByAppendingPathComponent:@"jg_hud_error.png"]]]; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m index c59a469..e778867 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m @@ -39,7 +39,7 @@ - (void)show { //Perform the presentation animation [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ self.progressHUD.alpha = 1.0f; - } completion:^(BOOL finished) { + } completion:^(BOOL __unused finished) { [self animationFinished]; }]; } @@ -52,7 +52,7 @@ - (void)hide { //Perform the dismissal animation [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ self.progressHUD.alpha = 0.0f; - } completion:^(BOOL finished) { + } completion:^(BOOL __unused finished) { [self animationFinished]; }]; } diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m index eb9fbbe..73cca40 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m @@ -38,16 +38,16 @@ - (void)show { //Now animate the presentation - [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ + [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ self.progressHUD.alpha = 1.0f; } completion:nil]; - [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState animations:^{ + [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); - } completion:^(BOOL finished) { - [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState animations:^{ + } completion:^(BOOL __unused _finished) { + [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ self.progressHUD.HUDView.transform = CGAffineTransformIdentity; - } completion:^(BOOL finished) { + } completion:^(BOOL __unused __finished) { [self animationFinished]; }]; }]; @@ -61,16 +61,16 @@ - (void)hide { NSTimeInterval totalDuration = self.expandAnimationDuaration+self.shrinkAnimationDuaration; //Animate the dismissal - [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ + [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ self.progressHUD.alpha = 0.0f; } completion:nil]; - [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState animations:^{ + [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); - } completion:^(BOOL finished) { - [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState animations:^{ + } completion:^(BOOL __unused _finished) { + [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(0.1f, 0.1f); - } completion:^(BOOL finished) { + } completion:^(BOOL __unused __finished) { //HUD is now hidden, restore the transform self.progressHUD.HUDView.transform = CGAffineTransformIdentity; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m index 35fe60c..abaa566 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m @@ -13,7 +13,7 @@ @implementation JGProgressHUDIndicatorView #pragma mark - Initializers -- (instancetype)initWithFrame:(CGRect)frame { +- (instancetype)initWithFrame:(CGRect __unused)frame { return [self init]; } @@ -42,7 +42,7 @@ - (void)setProgress:(float)progress { [self setProgress:progress animated:NO]; } -- (void)setProgress:(float)progress animated:(BOOL)animated { +- (void)setProgress:(float)progress animated:(BOOL __unused)animated { if (fequal(self.progress, progress)) { return; } diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m index 3cd3a52..ae0973f 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m @@ -44,12 +44,12 @@ - (void)drawInContext:(CGContextRef)ctx { CGRect rect = self.bounds; - CGPoint center = CGPointMake(rect.origin.x + floorf(rect.size.height / 2.0f), rect.origin.y + floorf(rect.size.height / 2.0f)); + CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.height/2.0f), rect.origin.y + (CGFloat)floor(rect.size.height/2.0f)); CGFloat lineWidth = 2.0f; - CGFloat radius = floorf(MIN(rect.size.width, rect.size.height) / 2.0f) -lineWidth; + CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0f)-lineWidth; //Border && Fill - UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0f endAngle:2*M_PI clockwise:NO]; + UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0f endAngle:2.0f*(CGFloat)M_PI clockwise:NO]; [borderPath setLineWidth:lineWidth]; @@ -70,8 +70,8 @@ - (void)drawInContext:(CGContextRef)ctx { [processPath setLineWidth:radius]; - CGFloat startAngle = -(M_PI / 2.0f); - CGFloat endAngle = startAngle + 2.0f * M_PI * self.progress; + CGFloat startAngle = -((CGFloat)M_PI/2.0f); + CGFloat endAngle = startAngle + 2.0f * (CGFloat)M_PI * self.progress; [processPath addArcWithCenter:center radius:radius/2.0f startAngle:startAngle endAngle:endAngle clockwise:YES]; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m index f3d8e40..af68a4d 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m @@ -48,14 +48,14 @@ - (void)drawInContext:(CGContextRef)ctx { CGRect rect = self.bounds; - CGPoint center = CGPointMake(rect.origin.x + floorf(rect.size.height / 2.0f), rect.origin.y + floorf(rect.size.height / 2.0f)); + CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.height/2.0f), rect.origin.y + (CGFloat)floor(rect.size.height/2.0f)); CGFloat lineWidth = self.ringWidth; - CGFloat radius = floorf(MIN(rect.size.width, rect.size.height) / 2.0f) - lineWidth; + CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0f) - lineWidth; //Background [self.ringBackgroundColor setStroke]; - UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0f endAngle:2*M_PI clockwise:NO]; + UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0f endAngle:2.0f*(CGFloat)M_PI clockwise:NO]; [borderPath setLineWidth:lineWidth]; [borderPath stroke]; @@ -69,8 +69,8 @@ - (void)drawInContext:(CGContextRef)ctx { [processPath setLineWidth:lineWidth]; [borderPath setLineCapStyle:(self.roundProgressLine ? kCGLineCapRound : kCGLineCapSquare)]; - CGFloat startAngle = -(M_PI / 2.0f); - CGFloat endAngle = startAngle + 2.0f * M_PI * self.progress; + CGFloat startAngle = -((CGFloat)M_PI / 2.0f); + CGFloat endAngle = startAngle + 2.0f * (CGFloat)M_PI * self.progress; [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m index c354246..dafaed1 100644 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m @@ -10,7 +10,7 @@ @implementation JGProgressHUDSuccessIndicatorView -- (instancetype)initWithContentView:(UIView *)contentView { +- (instancetype)initWithContentView:(UIView * __unused)contentView { NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[bundlePath stringByAppendingPathComponent:@"jg_hud_success.png"]]];