From 794de3587a325e635be9353cb8d8a3793b6c8ac8 Mon Sep 17 00:00:00 2001 From: Matej Bukovinski Date: Mon, 13 Jan 2020 21:34:03 +0100 Subject: [PATCH] Bump version --- Framework-Info.plist | 2 +- Framework-tvOS-Info.plist | 2 +- LICENSE | 2 +- MBProgressHUD.h | 30 +++++++++---------- MBProgressHUD.m | 40 ++++++++++++------------- MBProgressHUD.podspec | 2 +- MBProgressHUD.xcodeproj/project.pbxproj | 4 +++ README.mdown | 6 ++-- 8 files changed, 46 insertions(+), 42 deletions(-) diff --git a/Framework-Info.plist b/Framework-Info.plist index a6f720ec9..ca23c84f4 100644 --- a/Framework-Info.plist +++ b/Framework-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion diff --git a/Framework-tvOS-Info.plist b/Framework-tvOS-Info.plist index d63d29010..ec0cc7b0c 100644 --- a/Framework-tvOS-Info.plist +++ b/Framework-tvOS-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1 + $(MARKETING_VERSION) CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/LICENSE b/LICENSE index 1c0d59bb8..d7f0647bc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright © 2009-2016 Matej Bukovinski +Copyright © 2009-2020 Matej Bukovinski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MBProgressHUD.h b/MBProgressHUD.h index 4f459f26b..38b500490 100644 --- a/MBProgressHUD.h +++ b/MBProgressHUD.h @@ -1,10 +1,10 @@ // // MBProgressHUD.h -// Version 1.1.0 +// Version 1.2.0 // Created by Matej Bukovinski on 2.4.09. // -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // Copyright © 2009-2016 Matej Bukovinski // @@ -75,7 +75,7 @@ typedef void (^MBProgressHUDCompletionBlock)(void); NS_ASSUME_NONNULL_BEGIN -/** +/** * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. * * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. @@ -136,8 +136,8 @@ NS_ASSUME_NONNULL_BEGIN */ - (instancetype)initWithView:(UIView *)view; -/** - * Displays the HUD. +/** + * Displays the HUD. * * @note You need to make sure that the main thread completes its run loop soon after this method call so that * the user interface can be updated. Call this method when your task is already set up to be executed in a new thread @@ -150,7 +150,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)showAnimated:(BOOL)animated; -/** +/** * Hides the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to * hide the HUD when your task completes. * @@ -161,7 +161,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)hideAnimated:(BOOL)animated; -/** +/** * Hides the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to * hide the HUD when your task completes. * @@ -209,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN /// @name Appearance -/** +/** * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. */ @property (assign, nonatomic) MBProgressHUDMode mode; @@ -302,7 +302,7 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, readonly) UILabel *detailsLabel; /** - * A button that is placed below the labels. Visible only if a target / action is added and a title is assigned.. + * A button that is placed below the labels. Visible only if a target / action is added and a title is assigned.. */ @property (strong, nonatomic, readonly) UIButton *button; @@ -313,8 +313,8 @@ NS_ASSUME_NONNULL_BEGIN @optional -/** - * Called after the HUD was fully hidden from the screen. +/** + * Called after the HUD was fully hidden from the screen. */ - (void)hudWasHidden:(MBProgressHUD *)hud; @@ -324,7 +324,7 @@ NS_ASSUME_NONNULL_BEGIN /** * A progress view for showing definite progress by filling up a circle (pie chart). */ -@interface MBRoundProgressView : UIView +@interface MBRoundProgressView : UIView /** * Progress (0.0 to 1.0) @@ -338,7 +338,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) UIColor *progressTintColor; /** - * Indicator background (non-progress) color. + * Indicator background (non-progress) color. * Only applicable on iOS versions older than iOS 7. * Defaults to translucent white (alpha 0.1). */ @@ -353,7 +353,7 @@ NS_ASSUME_NONNULL_BEGIN /** - * A flat bar progress view. + * A flat bar progress view. */ @interface MBBarProgressView : UIView @@ -386,7 +386,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MBBackgroundView : UIView /** - * The background style. + * The background style. * Defaults to MBProgressHUDBackgroundStyleBlur. */ @property (nonatomic) MBProgressHUDBackgroundStyle style; diff --git a/MBProgressHUD.m b/MBProgressHUD.m index b67e49571..6460e1a70 100644 --- a/MBProgressHUD.m +++ b/MBProgressHUD.m @@ -1,6 +1,6 @@ // // MBProgressHUD.m -// Version 1.1.0 +// Version 1.2.0 // Created by Matej Bukovinski on 2.4.09. // @@ -137,7 +137,7 @@ - (void)showAnimated:(BOOL)animated { NSTimer *timer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; self.graceTimer = timer; - } + } // ... otherwise show the HUD immediately else { [self showUsingAnimation:self.useAnimation]; @@ -158,7 +158,7 @@ - (void)hideAnimated:(BOOL)animated { [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes]; self.minShowTimer = timer; return; - } + } } // ... otherwise hide the HUD immediately [self hideUsingAnimation:self.useAnimation]; @@ -403,7 +403,7 @@ - (void)updateIndicators { if (mode == MBProgressHUDModeAnnularDeterminate) { [(MBRoundProgressView *)indicator setAnnular:YES]; } - } + } else if (mode == MBProgressHUDModeCustomView && self.customView != indicator) { // Update custom view indicator [indicator removeFromSuperview]; @@ -446,7 +446,7 @@ - (void)updateViewsForColor:(UIColor *)color { // For iOS 9+ appearance = [UIActivityIndicatorView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]]; #endif - + if (appearance.color == nil) { ((UIActivityIndicatorView *)indicator).color = color; } @@ -591,10 +591,10 @@ - (void)updateConstraints { [bezel addConstraints:bezelConstraints]; self.bezelConstraints = bezelConstraints; - + self.paddingConstraints = [paddingConstraints copy]; [self updatePaddingConstraints]; - + [super updateConstraints]; } @@ -679,9 +679,9 @@ - (void)setSquare:(BOOL)square { - (void)setProgressObjectDisplayLink:(CADisplayLink *)progressObjectDisplayLink { if (progressObjectDisplayLink != _progressObjectDisplayLink) { [_progressObjectDisplayLink invalidate]; - + _progressObjectDisplayLink = progressObjectDisplayLink; - + [_progressObjectDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; } } @@ -786,7 +786,7 @@ - (void)updateForCurrentOrientationAnimated:(BOOL)animated { UIApplication *application = [UIApplication performSelector:@selector(sharedApplication)]; UIInterfaceOrientation orientation = application.statusBarOrientation; CGFloat radians = 0; - + if (UIInterfaceOrientationIsLandscape(orientation)) { radians = orientation == UIInterfaceOrientationLandscapeLeft ? -(CGFloat)M_PI_2 : (CGFloat)M_PI_2; // Window coordinates differ! @@ -971,11 +971,11 @@ - (void)setProgressRemainingColor:(UIColor *)progressRemainingColor { - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); - + CGContextSetLineWidth(context, 2); CGContextSetStrokeColorWithColor(context,[_lineColor CGColor]); CGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]); - + // Draw background and Border CGFloat radius = (rect.size.height / 2) - 2; CGContextMoveToPoint(context, 2, rect.size.height/2); @@ -984,26 +984,26 @@ - (void)drawRect:(CGRect)rect { CGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius); CGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius); CGContextDrawPath(context, kCGPathFillStroke); - + CGContextSetFillColorWithColor(context, [_progressColor CGColor]); radius = radius - 2; CGFloat amount = self.progress * rect.size.width; - + // Progress in the middle area if (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) { CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius); CGContextAddLineToPoint(context, amount, 4); CGContextAddLineToPoint(context, amount, radius + 4); - + CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); CGContextAddLineToPoint(context, amount, rect.size.height - 4); CGContextAddLineToPoint(context, amount, radius + 4); - + CGContextFillPath(context); } - + // Progress in the right arc else if (amount > radius + 4) { CGFloat x = amount - (rect.size.width - radius - 4); @@ -1023,10 +1023,10 @@ - (void)drawRect:(CGRect)rect { if (isnan(angle)) angle = 0; CGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1); CGContextAddLineToPoint(context, amount, rect.size.height/2); - + CGContextFillPath(context); } - + // Progress is in the left arc else if (amount < radius + 4 && amount > 0) { CGContextMoveToPoint(context, 4, rect.size.height/2); @@ -1036,7 +1036,7 @@ - (void)drawRect:(CGRect)rect { CGContextMoveToPoint(context, 4, rect.size.height/2); CGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius); CGContextAddLineToPoint(context, radius + 4, rect.size.height/2); - + CGContextFillPath(context); } } diff --git a/MBProgressHUD.podspec b/MBProgressHUD.podspec index 29153e9e9..b2c7ed067 100644 --- a/MBProgressHUD.podspec +++ b/MBProgressHUD.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "MBProgressHUD" - s.version = "1.1.0" + s.version = "1.2.0" s.summary = "An iOS activity indicator view." s.description = <<-DESC MBProgressHUD is an iOS drop-in class that displays a translucent HUD diff --git a/MBProgressHUD.xcodeproj/project.pbxproj b/MBProgressHUD.xcodeproj/project.pbxproj index fe176f337..1c3ed2338 100644 --- a/MBProgressHUD.xcodeproj/project.pbxproj +++ b/MBProgressHUD.xcodeproj/project.pbxproj @@ -305,6 +305,7 @@ INFOPLIST_FILE = "Framework-tvOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.2; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = com.matej.MBProgressHUD; PRODUCT_NAME = MBProgressHUD; @@ -343,6 +344,7 @@ INFOPLIST_FILE = "Framework-tvOS-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.2; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.matej.MBProgressHUD; PRODUCT_NAME = MBProgressHUD; @@ -381,6 +383,7 @@ INFOPLIST_FILE = "Framework-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.2; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.matej.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = MBProgressHUD; @@ -415,6 +418,7 @@ INFOPLIST_FILE = "Framework-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MARKETING_VERSION = 1.2; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.matej.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = MBProgressHUD; diff --git a/README.mdown b/README.mdown index 3e413e769..c90f5c6a6 100644 --- a/README.mdown +++ b/README.mdown @@ -31,13 +31,13 @@ You will need the latest developer tools in order to build `MBProgressHUD`. Old [CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project. -1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 1.1.0'` +1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 1.2.0'` 2. Install the pod(s) by running `pod install`. 3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. ### Carthage -1. Add MBProgressHUD to your Cartfile. e.g., `github "jdg/MBProgressHUD" ~> 1.1.0` +1. Add MBProgressHUD to your Cartfile. e.g., `github "jdg/MBProgressHUD" ~> 1.2.0` 2. Run `carthage update` 3. Follow the rest of the [standard Carthage installation instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to add MBProgressHUD to your project. @@ -45,7 +45,7 @@ You will need the latest developer tools in order to build `MBProgressHUD`. Old 1. Add the following to your `Package.swift`: ```swift - .package(url: "https://github.com/jdg/MBProgressHUD.git", .upToNextMajor(from: "1.1.0")), + .package(url: "https://github.com/jdg/MBProgressHUD.git", .upToNextMajor(from: "1.2.0")), ``` 2. Next, add `MBProgressHUD` to your App targets dependencies like so: ```swift