Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
matej committed Jan 13, 2020
1 parent 049b2f4 commit 794de35
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Framework-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Framework-tvOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 15 additions & 15 deletions MBProgressHUD.h
Original file line number Diff line number Diff line change
@@ -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
//
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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.
*
Expand All @@ -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.
*
Expand Down Expand Up @@ -209,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN

/// @name Appearance

/**
/**
* MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate.
*/
@property (assign, nonatomic) MBProgressHUDMode mode;
Expand Down Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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)
Expand All @@ -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).
*/
Expand All @@ -353,7 +353,7 @@ NS_ASSUME_NONNULL_BEGIN


/**
* A flat bar progress view.
* A flat bar progress view.
*/
@interface MBBarProgressView : UIView

Expand Down Expand Up @@ -386,7 +386,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface MBBackgroundView : UIView

/**
* The background style.
* The background style.
* Defaults to MBProgressHUDBackgroundStyleBlur.
*/
@property (nonatomic) MBProgressHUDBackgroundStyle style;
Expand Down
40 changes: 20 additions & 20 deletions MBProgressHUD.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// MBProgressHUD.m
// Version 1.1.0
// Version 1.2.0
// Created by Matej Bukovinski on 2.4.09.
//

Expand Down Expand Up @@ -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];
Expand All @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -591,10 +591,10 @@ - (void)updateConstraints {

[bezel addConstraints:bezelConstraints];
self.bezelConstraints = bezelConstraints;

self.paddingConstraints = [paddingConstraints copy];
[self updatePaddingConstraints];

[super updateConstraints];
}

Expand Down Expand Up @@ -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];
}
}
Expand Down Expand Up @@ -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!
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion MBProgressHUD.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions MBProgressHUD.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ You will need the latest developer tools in order to build `MBProgressHUD`. Old

[CocoaPods](http:https://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.

### SwiftPM / Accio

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
Expand Down

0 comments on commit 794de35

Please sign in to comment.