Compare commits
94 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a7c5f3e53 | |||
| 18c442d573 | |||
| 2c62462e38 | |||
| 9682b56446 | |||
| 684e5b7160 | |||
| c843e4c86d | |||
| 9bed52746a | |||
| 38dc9aa471 | |||
| 73cc7ba023 | |||
| 9ce87e2a54 | |||
| 71b7092441 | |||
| 11fc6023b4 | |||
| 61fb89ce30 | |||
| 5097c9c14f | |||
| 24ff51d11d | |||
| 794de3587a | |||
| 049b2f4dbd | |||
| 3958dc56bf | |||
| bf145ece96 | |||
| 74abf4aa76 | |||
| 501fb0d0bc | |||
| c4d965d2c0 | |||
| 898f027554 | |||
| be98d2d1cb | |||
| 8c7f89a5b9 | |||
| 75673fdecc | |||
| d18733fef4 | |||
| 5dcbf5b191 | |||
| 915134629f | |||
| 0c7ea5defd | |||
| 3fdde685bc | |||
| 0581fc848d | |||
| 9ba89d33f7 | |||
| 3aa49153e1 | |||
| 998d32df35 | |||
| bf31ebe9e6 | |||
| cb9d028f2a | |||
| ace36f8aa2 | |||
| d0669df745 | |||
| 7bedf36884 | |||
| 48f79c8e20 | |||
| b0db9a82c4 | |||
| 27d9ade6ea | |||
| 1ec0e9cf81 | |||
| 116ae6bb45 | |||
| 3139692a41 | |||
| deb72a4a7b | |||
| 25aed45cc8 | |||
| bf2f7fb663 | |||
| f0e2b694b0 | |||
| a570ddafc4 | |||
| 60983ca46c | |||
| 0a86894703 | |||
| e2d8b33d03 | |||
| d2842c9124 | |||
| 9c9771ef27 | |||
| d52dc41576 | |||
| 9a0d8e288d | |||
| 71ab8c0b52 | |||
| c9cde526db | |||
| f25d9697f2 | |||
| 4d90a04699 | |||
| df1a29bfa8 | |||
| bdd4ca3272 | |||
| dcd72533c8 | |||
| 3c410dd1ff | |||
| 29b8447b9c | |||
| 202d8895c6 | |||
| 2347f40e0f | |||
| b934604028 | |||
| 04747f8b3d | |||
| 80f66aa5e7 | |||
| 257ec88cbc | |||
| 27c21b2907 | |||
| 8782fbf288 | |||
| 8df5e8ca98 | |||
| c161ea4227 | |||
| d591e1a8e2 | |||
| e23fad1476 | |||
| 56fe3e6a87 | |||
| b74d8e890e | |||
| c954ef3806 | |||
| c63cf1840e | |||
| a90765f5f2 | |||
| 549fa28546 | |||
| 1f1d7ce8bd | |||
| 16e8622f52 | |||
| f851a0bde0 | |||
| ef9bd9679f | |||
| d34d348a6a | |||
| 364a0fad0b | |||
| d4166737ca | |||
| 643b58c62f | |||
| 8839e57987 |
+3
-4
@@ -1,10 +1,9 @@
|
||||
language: objective-c
|
||||
osx_image: xcode9
|
||||
osx_image: xcode11.2
|
||||
|
||||
before_install:
|
||||
- env
|
||||
- locale
|
||||
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
|
||||
- xcpretty --version
|
||||
- xcodebuild -version
|
||||
- xcodebuild -showsdks
|
||||
@@ -13,8 +12,8 @@ script:
|
||||
- set -o pipefail
|
||||
|
||||
- xcodebuild clean build -workspace MBProgressHUD.xcworkspace -scheme HudDemo -sdk iphonesimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build -workspace MBProgressHUD.xcworkspace -scheme HudDemoTV -sdk iphonesimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build test -workspace MBProgressHUD.xcworkspace -scheme HudTests -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPad Air 2,OS=11.0" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
|
||||
- xcodebuild clean build -workspace MBProgressHUD.xcworkspace -scheme HudDemoTV -sdk appletvsimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean build test -workspace MBProgressHUD.xcworkspace -scheme HudTests -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPad Air (3rd generation),OS=13.2.2" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
Please take a moment to review this document in order to make the contribution
|
||||
process easy and effective for everyone involved.
|
||||
|
||||
|
||||
# Using the issue tracker
|
||||
|
||||
The issue tracker is the preferred channel for [bug reports](#bugs) and
|
||||
[features requests](#features), but please respect the following restriction:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests (use
|
||||
a service like [Stack Overflow](http://stackoverflow.com) instead).
|
||||
|
||||
<a name="bugs"></a>
|
||||
## Bug reports
|
||||
|
||||
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
||||
Good bug reports are extremely helpful - thank you!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
latest `master` branch in the repository.
|
||||
|
||||
3. **Isolate the problem** — provide exact reproduction steps, preferably
|
||||
in the form of a failing test case or by providing modification steps in the
|
||||
`MBProgressHUD` Demo application.
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more
|
||||
information. Please try to be as detailed as possible in your report. What is
|
||||
your environment? What steps will reproduce the issue? What iOS version did
|
||||
you use? What would you expect to be the outcome?
|
||||
|
||||
|
||||
<a name="features"></a>
|
||||
## Feature requests
|
||||
|
||||
Feature requests are welcome. But take a moment to find out whether your idea
|
||||
fits with the scope and aims of the project. It's up to *you* to make a strong
|
||||
case to convince the project's developers of the merits of this feature. Please
|
||||
provide as much detail and context as possible.
|
||||
|
||||
<a name="pull-requests"></a>
|
||||
|
||||
# Pull requests
|
||||
|
||||
Good pull requests - patches, improvements, new features - are a fantastic
|
||||
help. They should remain focused in scope and avoid containing unrelated
|
||||
commits.
|
||||
|
||||
**Please ask first** before embarking on any significant pull request (e.g.
|
||||
implementing features, refactoring code, porting to a different language),
|
||||
otherwise you risk spending a lot of time working on something that the
|
||||
project's developers might not want to merge into the project.
|
||||
|
||||
Please adhere to the coding conventions used throughout a project (indentation,
|
||||
accurate comments, etc.) and any other requirements (such as test coverage).
|
||||
|
||||
**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
|
||||
license your work under the same license as that used by the project.
|
||||
|
||||
This document is based on https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md.
|
||||
@@ -24,6 +24,7 @@
|
||||
D27F18641D3B5E21009D7482 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D27F18611D3B5E21009D7482 /* Main.storyboard */; };
|
||||
D286A76D1518CA9F00E13FB8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */; };
|
||||
D2B174121C5E3A3D00021915 /* HudTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B174111C5E3A3D00021915 /* HudTests.m */; };
|
||||
D2D75D5323A8193100485497 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D2D75D5123A8193000485497 /* Launch.storyboard */; };
|
||||
D2EEB3811B55967200F59EC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2EEB3801B55967200F59EC1 /* Images.xcassets */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -63,9 +64,11 @@
|
||||
D27F18621D3B5E21009D7482 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = HudDemo/en.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
D27F18651D3B5E2D009D7482 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HudDemo/Info.plist; sourceTree = "<group>"; };
|
||||
D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
D2B1269B23CB8D9C00A01F4C /* HudDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HudDemo.entitlements; sourceTree = "<group>"; };
|
||||
D2B1740F1C5E3A3D00021915 /* HudTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HudTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D2B174111C5E3A3D00021915 /* HudTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HudTests.m; sourceTree = "<group>"; };
|
||||
D2B174131C5E3A3D00021915 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
D2D75D5223A8193000485497 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Launch.storyboard; sourceTree = "<group>"; };
|
||||
D2EEB3801B55967200F59EC1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HudDemo/Images.xcassets; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -101,6 +104,7 @@
|
||||
080E96DDFE201D6D7F000001 /* HudDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2B1269B23CB8D9C00A01F4C /* HudDemo.entitlements */,
|
||||
D27F18561D3B5DFF009D7482 /* MBHudDemoAppDelegate.h */,
|
||||
D27F18571D3B5DFF009D7482 /* MBHudDemoViewController.h */,
|
||||
D27F18581D3B5DFF009D7482 /* MBHudDemoAppDelegate.m */,
|
||||
@@ -199,6 +203,7 @@
|
||||
D27F18671D3B5E43009D7482 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2D75D5123A8193000485497 /* Launch.storyboard */,
|
||||
D27F184C1D3B5878009D7482 /* Main.storyboard */,
|
||||
D27F18511D3B5878009D7482 /* Info.plist */,
|
||||
D274948A1D3B74AA00ABEB66 /* Images.xcassets */,
|
||||
@@ -286,7 +291,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = MB;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0930;
|
||||
ORGANIZATIONNAME = "Matej Bukovinski";
|
||||
TargetAttributes = {
|
||||
D27F18401D3B5878009D7482 = {
|
||||
@@ -300,13 +305,9 @@
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
@@ -338,6 +339,7 @@
|
||||
files = (
|
||||
D27F184E1D3B5878009D7482 /* Main.storyboard in Resources */,
|
||||
D274948B1D3B74AA00ABEB66 /* Images.xcassets in Resources */,
|
||||
D2D75D5323A8193100485497 /* Launch.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -416,6 +418,14 @@
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2D75D5123A8193000485497 /* Launch.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
D2D75D5223A8193000485497 /* Base */,
|
||||
);
|
||||
name = Launch.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
@@ -424,15 +434,18 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = HudDemo/HudDemo.entitlements;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = HudDemo/HudDemo_Prefix.pch;
|
||||
INFOPLIST_FILE = HudDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.bukovinski.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = HudDemo;
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -442,14 +455,17 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = HudDemo/HudDemo.entitlements;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = HudDemo/HudDemo_Prefix.pch;
|
||||
INFOPLIST_FILE = HudDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.bukovinski.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = HudDemo;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
@@ -463,18 +479,19 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
@@ -486,7 +503,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
@@ -501,18 +518,19 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
@@ -523,7 +541,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
name = Release;
|
||||
@@ -538,6 +556,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
@@ -570,6 +589,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
@@ -615,6 +635,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo";
|
||||
};
|
||||
name = Debug;
|
||||
@@ -641,6 +662,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.8">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,10 +40,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -53,8 +50,18 @@
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D2B1740E1C5E3A3D00021915"
|
||||
BuildableName = "HudTests.xctest"
|
||||
BlueprintName = "HudTests"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -62,7 +69,6 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
displayScaleIsEnabled = "NO"
|
||||
displayScale = "1.00"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -79,8 +85,6 @@
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
displayScaleIsEnabled = "NO"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,10 +26,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -39,14 +36,13 @@
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -63,8 +59,6 @@
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -10,8 +10,16 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
|
||||
BuildableName = "HudDemo.app"
|
||||
BlueprintName = "HudDemo"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -24,23 +32,11 @@
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
|
||||
BuildableName = "HudDemo.app"
|
||||
BlueprintName = "HudDemo"
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -57,8 +53,6 @@
|
||||
ReferencedContainer = "container:HudDemo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -28,29 +28,6 @@
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchImages</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UILaunchImageMinimumOSVersion</key>
|
||||
<string>7.0</string>
|
||||
<key>UILaunchImageName</key>
|
||||
<string>Default-iOS7</string>
|
||||
<key>UILaunchImageOrientation</key>
|
||||
<string>Portrait</string>
|
||||
<key>UILaunchImageSize</key>
|
||||
<string>{320, 568}</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UILaunchImageMinimumOSVersion</key>
|
||||
<string>7.0</string>
|
||||
<key>UILaunchImageName</key>
|
||||
<string>Default-iOS7</string>
|
||||
<key>UILaunchImageOrientation</key>
|
||||
<string>Portrait</string>
|
||||
<key>UILaunchImageSize</key>
|
||||
<string>{320, 480}</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>Launch</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
|
||||
// Do something useful in the background and update the HUD periodically.
|
||||
[self doSomeWorkWithMixedProgress];
|
||||
[self doSomeWorkWithMixedProgress:hud];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[hud hideAnimated:YES];
|
||||
});
|
||||
@@ -340,8 +340,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)doSomeWorkWithMixedProgress {
|
||||
MBProgressHUD *hud = [MBProgressHUD HUDForView:self.navigationController.view];
|
||||
- (void)doSomeWorkWithMixedProgress:(MBProgressHUD *)hud {
|
||||
// Indeterminate mode
|
||||
sleep(2);
|
||||
// Switch to determinate mode
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A282b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Fq2-vR-Rsu">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="Fq2-vR-Rsu">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Navigation Controller-->
|
||||
@@ -10,9 +12,8 @@
|
||||
<objects>
|
||||
<navigationController id="Fq2-vR-Rsu" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="2LN-7G-jZD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<animations/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="iXE-FA-91q" kind="relationship" relationship="rootViewController" id="peN-oI-nI6"/>
|
||||
@@ -31,10 +32,9 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="YSo-zR-oqe"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="TWt-Z9-CWt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="MBProgressHUD" id="IuF-Dp-Voh"/>
|
||||
</viewController>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="9dw-fs-BGe">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="9dw-fs-BGe">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--MBProgressHUD-->
|
||||
@@ -10,16 +12,16 @@
|
||||
<objects>
|
||||
<tableViewController id="1VA-J6-vTg" customClass="MBHudDemoViewController" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="v14-ld-S1m">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<inset key="separatorInset" minX="30" minY="0.0" maxX="30" maxY="0.0"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="MBExampleCell" id="EW9-df-ImK">
|
||||
<rect key="frame" x="0.0" y="114" width="600" height="44"/>
|
||||
<rect key="frame" x="0.0" y="55.5" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EW9-df-ImK" id="TMc-hr-0mm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
@@ -41,7 +43,7 @@
|
||||
<objects>
|
||||
<navigationController id="9dw-fs-BGe" sceneMemberID="viewController">
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="355-tf-2jt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="15702" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="appleTV" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="tvOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="438" y="544"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -26,6 +26,8 @@
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>Launch</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
|
||||
+175
-11
@@ -26,10 +26,15 @@ XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \
|
||||
XCTAssertEqual(hud.bezelView.alpha, 1.f, @"The HUD should be visible."); \
|
||||
} while (0)
|
||||
|
||||
#define MBTestHUDIsHiden(hud, rootView) \
|
||||
do { \
|
||||
XCTAssertEqual(hud.alpha, 0.f, @"The hud should be faded out."); \
|
||||
} while (0)
|
||||
|
||||
#define MBTestHUDIsHidenAndRemoved(hud, rootView) \
|
||||
do { \
|
||||
XCTAssertFalse([rootView.subviews containsObject:hud], @"The HUD should not be part of the view hierarchy."); \
|
||||
XCTAssertEqual(hud.alpha, 0.f, @"The hud should be faded out."); \
|
||||
MBTestHUDIsHiden(hud, rootView); \
|
||||
XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
} while (0)
|
||||
|
||||
@@ -43,10 +48,30 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
|
||||
@implementation HudTests
|
||||
|
||||
#pragma mark - Initialization
|
||||
|
||||
- (void)testInitializers {
|
||||
XCTAssertNotNil([[MBProgressHUD alloc] initWithView:[UIView new]]);
|
||||
UIView *nilView = nil;
|
||||
XCTAssertThrows([[MBProgressHUD alloc] initWithView:nilView]);
|
||||
XCTAssertNotNil([[MBProgressHUD alloc] initWithFrame:CGRectZero]);
|
||||
NSKeyedUnarchiver *dummyUnarchiver;
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
if (@available(iOS 11.0, *)) {
|
||||
#endif
|
||||
dummyUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:[NSData data] error:nil];
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
} else {
|
||||
dummyUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:[NSData data]];
|
||||
}
|
||||
#endif
|
||||
XCTAssertNotNil([[MBProgressHUD alloc] initWithCoder:dummyUnarchiver]);
|
||||
}
|
||||
|
||||
#pragma mark - Convenience
|
||||
|
||||
- (void)testNonAnimatedConvenienceHUDPresentation {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:NO];
|
||||
@@ -67,7 +92,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
}
|
||||
|
||||
- (void)testAnimatedConvenienceHUDPresentation {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -103,7 +128,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
}
|
||||
|
||||
- (void)testCompletionBlock {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -120,10 +145,80 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
[self waitForExpectationsWithTimeout:5. handler:nil];
|
||||
}
|
||||
|
||||
#pragma mark - Modes
|
||||
|
||||
- (void)testRoundDeterminate {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
hud.mode = MBProgressHUDModeDeterminate;
|
||||
[rootView addSubview:hud];
|
||||
[hud showAnimated:NO];
|
||||
|
||||
MBTestHUDIsVisible(hud, rootView);
|
||||
XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBRoundProgressView class]]);
|
||||
|
||||
XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed.");
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
- (void)testRoundAnnularDeterminate {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
hud.mode = MBProgressHUDModeAnnularDeterminate;
|
||||
[rootView addSubview:hud];
|
||||
[hud showAnimated:NO];
|
||||
|
||||
MBTestHUDIsVisible(hud, rootView);
|
||||
XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBRoundProgressView class]]);
|
||||
|
||||
XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed.");
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
- (void)testDeterminateHorizontalBar {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
hud.mode = MBProgressHUDModeDeterminateHorizontalBar;
|
||||
[rootView addSubview:hud];
|
||||
[hud showAnimated:NO];
|
||||
|
||||
MBTestHUDIsVisible(hud, rootView);
|
||||
XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBBarProgressView class]]);
|
||||
|
||||
XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed.");
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Customization
|
||||
|
||||
- (void)testEffectViewOrderAfterSettingBlurStyle {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
|
||||
[hud.bezelView.subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) {
|
||||
XCTAssert(![view isKindOfClass:UIVisualEffectView.class] || idx == 0, @"Just the first subview should be a visual effect view.");
|
||||
}];
|
||||
|
||||
hud.bezelView.blurEffectStyle = UIBlurEffectStyleDark;
|
||||
|
||||
[hud.bezelView.subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) {
|
||||
XCTAssert(![view isKindOfClass:UIVisualEffectView.class] || idx == 0, @"Just the first subview should be a visual effect view even after changing the blurEffectStyle.");
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Delay
|
||||
|
||||
- (void)testDelayedHide {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -153,10 +248,38 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
- (void)testDelayedHideDoesNotRace {
|
||||
// https://github.com/jdg/MBProgressHUD/issues/503
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
[rootView addSubview:hud];
|
||||
|
||||
[hud showAnimated:YES];
|
||||
[hud hideAnimated:YES afterDelay:0.3];
|
||||
MBTestHUDIsVisible(hud, rootView);
|
||||
|
||||
XCTestExpectation *hideCheckExpectation = [self expectationWithDescription:@"Hide check"];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
[hud showAnimated:YES];
|
||||
[hud hideAnimated:YES afterDelay:0.3];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
MBTestHUDIsHiden(hud, rootView);
|
||||
[hideCheckExpectation fulfill];
|
||||
});
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithTimeout:5. handler:nil];
|
||||
|
||||
[hud removeFromSuperview];
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
#pragma mark - Ruse
|
||||
|
||||
- (void)testNonAnimatedHudReuse {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
@@ -175,7 +298,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
}
|
||||
|
||||
- (void)testUnfinishedHidingAnimation {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:NO];
|
||||
@@ -200,7 +323,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
}
|
||||
|
||||
- (void)testAnimatedImmediateHudReuse {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
XCTestExpectation *hideExpectation = [self expectationWithDescription:@"The hud should have been hidden."];
|
||||
@@ -229,7 +352,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
#pragma mark - Min show time
|
||||
|
||||
- (void)testMinShowTime {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -266,7 +389,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
#pragma mark - Grace time
|
||||
|
||||
- (void)testGraceTime {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -307,7 +430,7 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
}
|
||||
|
||||
- (void)testHideBeforeGraceTimeElapsed {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."];
|
||||
@@ -348,6 +471,31 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
#pragma mark - Customization
|
||||
|
||||
- (void)testShape {
|
||||
UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController;
|
||||
UIView *rootView = rootViewController.view;
|
||||
|
||||
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView];
|
||||
hud.removeFromSuperViewOnHide = YES;
|
||||
hud.offset = CGPointMake(50, 50);
|
||||
hud.square = YES;
|
||||
hud.label.text = @"Some long text...";
|
||||
[rootView addSubview:hud];
|
||||
[hud showAnimated:NO];
|
||||
|
||||
[hud setNeedsLayout];
|
||||
[hud layoutIfNeeded];
|
||||
|
||||
CGRect frame = hud.bezelView.frame;
|
||||
XCTAssertEqual(frame.size.width, frame.size.height);
|
||||
|
||||
[hud hideAnimated:NO];
|
||||
|
||||
MBTestHUDIsHidenAndRemoved(hud, rootView);
|
||||
}
|
||||
|
||||
#pragma mark - MBProgressHUDDelegate
|
||||
|
||||
- (void)hudWasHidden:(MBProgressHUD *)hud {
|
||||
@@ -358,4 +506,20 @@ XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \
|
||||
self.hideExpectation = nil;
|
||||
}
|
||||
|
||||
#pragma mark - Helpers
|
||||
|
||||
- (nullable UIView *)view:(UIView *)view firstSubviewOfClass:(Class)clazz {
|
||||
for (__unsafe_unretained UIView *subview in view.subviews) {
|
||||
if ([subview isKindOfClass:clazz]) {
|
||||
return subview;
|
||||
}
|
||||
}
|
||||
__unsafe_unretained UIView *theView;
|
||||
for (__unsafe_unretained UIView *subview in view.subviews) {
|
||||
theView = [self view:subview firstSubviewOfClass:clazz];
|
||||
if (theView) { break; }
|
||||
}
|
||||
return theView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_3_0
|
||||
#warning "This project uses features only available in iOS SDK 3.0 and later."
|
||||
#ifndef __IPHONE_8_0
|
||||
#warning "This project uses features only available in iOS SDK 8.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
+30
-62
@@ -1,12 +1,12 @@
|
||||
//
|
||||
// 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
|
||||
// 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
|
||||
@@ -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.
|
||||
@@ -125,7 +125,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
* @param view The view that is going to be searched.
|
||||
* @return A reference to the last HUD subview discovered.
|
||||
*/
|
||||
+ (nullable MBProgressHUD *)HUDForView:(UIView *)view;
|
||||
+ (nullable MBProgressHUD *)HUDForView:(UIView *)view NS_SWIFT_NAME(forView(_:));
|
||||
|
||||
/**
|
||||
* A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with
|
||||
@@ -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.
|
||||
*
|
||||
@@ -179,16 +179,18 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) id<MBProgressHUDDelegate> delegate;
|
||||
|
||||
/**
|
||||
* Called after the HUD is hiden.
|
||||
* Called after the HUD is hidden.
|
||||
*/
|
||||
@property (copy, nullable) MBProgressHUDCompletionBlock completionBlock;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Grace period is the time (in seconds) that the invoked method may be run without
|
||||
* showing the HUD. If the task finishes before the grace time runs out, the HUD will
|
||||
* not be shown at all.
|
||||
* This may be used to prevent HUD display for very short tasks.
|
||||
* Defaults to 0 (no grace time).
|
||||
* @note The graceTime needs to be set before the hud is shown. You thus can't use `showHUDAddedTo:animated:`,
|
||||
* but instead need to alloc / init the HUD, configure the grace time and than show it manually.
|
||||
*/
|
||||
@property (assign, nonatomic) NSTimeInterval graceTime;
|
||||
|
||||
@@ -207,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// @name Appearance
|
||||
|
||||
/**
|
||||
/**
|
||||
* MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate.
|
||||
*/
|
||||
@property (assign, nonatomic) MBProgressHUDMode mode;
|
||||
@@ -250,7 +252,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* When enabled, the bezel center gets slightly affected by the device accelerometer data.
|
||||
* Has no effect on iOS < 7.0. Defaults to YES.
|
||||
* Defaults to NO.
|
||||
*
|
||||
* @note This can cause main thread checker assertions on certain devices. https://github.com/jdg/MBProgressHUD/issues/552
|
||||
*/
|
||||
@property (assign, nonatomic, getter=areDefaultMotionEffectsEnabled) BOOL defaultMotionEffectsEnabled UI_APPEARANCE_SELECTOR;
|
||||
|
||||
@@ -298,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.
|
||||
* 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;
|
||||
|
||||
@@ -309,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;
|
||||
|
||||
@@ -320,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)
|
||||
@@ -334,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).
|
||||
*/
|
||||
@@ -349,7 +353,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
/**
|
||||
* A flat bar progress view.
|
||||
* A flat bar progress view.
|
||||
*/
|
||||
@interface MBBarProgressView : UIView
|
||||
|
||||
@@ -382,61 +386,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface MBBackgroundView : UIView
|
||||
|
||||
/**
|
||||
* The background style.
|
||||
* Defaults to MBProgressHUDBackgroundStyleBlur on iOS 7 or later and MBProgressHUDBackgroundStyleSolidColor otherwise.
|
||||
* @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions.
|
||||
* The background style.
|
||||
* Defaults to MBProgressHUDBackgroundStyleBlur.
|
||||
*/
|
||||
@property (nonatomic) MBProgressHUDBackgroundStyle style;
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
/**
|
||||
* The blur effect style, when using MBProgressHUDBackgroundStyleBlur.
|
||||
* Defaults to UIBlurEffectStyleLight.
|
||||
*/
|
||||
@property (nonatomic) UIBlurEffectStyle blurEffectStyle;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The background color or the blur tint color.
|
||||
* @note Due to iOS 7 not supporting UIVisualEffectView, the blur effect differs slightly between iOS 7 and later versions.
|
||||
*
|
||||
* Defaults to nil on iOS 13 and later and
|
||||
* `[UIColor colorWithWhite:0.8f alpha:0.6f]`
|
||||
* on older systems.
|
||||
*/
|
||||
@property (nonatomic, strong) UIColor *color;
|
||||
|
||||
@end
|
||||
|
||||
@interface MBProgressHUD (Deprecated)
|
||||
|
||||
+ (NSArray *)allHUDsForView:(UIView *)view __attribute__((deprecated("Store references when using more than one HUD per view.")));
|
||||
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated __attribute__((deprecated("Store references when using more than one HUD per view.")));
|
||||
|
||||
- (id)initWithWindow:(UIWindow *)window __attribute__((deprecated("Use initWithView: instead.")));
|
||||
|
||||
- (void)show:(BOOL)animated __attribute__((deprecated("Use showAnimated: instead.")));
|
||||
- (void)hide:(BOOL)animated __attribute__((deprecated("Use hideAnimated: instead.")));
|
||||
- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay __attribute__((deprecated("Use hideAnimated:afterDelay: instead.")));
|
||||
|
||||
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated __attribute__((deprecated("Use GCD directly.")));
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block __attribute__((deprecated("Use GCD directly.")));
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(nullable MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly.")));
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue __attribute__((deprecated("Use GCD directly.")));
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
|
||||
completionBlock:(nullable MBProgressHUDCompletionBlock)completion __attribute__((deprecated("Use GCD directly.")));
|
||||
@property (assign) BOOL taskInProgress __attribute__((deprecated("No longer needed.")));
|
||||
|
||||
@property (nonatomic, copy) NSString *labelText __attribute__((deprecated("Use label.text instead.")));
|
||||
@property (nonatomic, strong) UIFont *labelFont __attribute__((deprecated("Use label.font instead.")));
|
||||
@property (nonatomic, strong) UIColor *labelColor __attribute__((deprecated("Use label.textColor instead.")));
|
||||
@property (nonatomic, copy) NSString *detailsLabelText __attribute__((deprecated("Use detailsLabel.text instead.")));
|
||||
@property (nonatomic, strong) UIFont *detailsLabelFont __attribute__((deprecated("Use detailsLabel.font instead.")));
|
||||
@property (nonatomic, strong) UIColor *detailsLabelColor __attribute__((deprecated("Use detailsLabel.textColor instead.")));
|
||||
@property (assign, nonatomic) CGFloat opacity __attribute__((deprecated("Customize bezelView properties instead.")));
|
||||
@property (strong, nonatomic) UIColor *color __attribute__((deprecated("Customize the bezelView color instead.")));
|
||||
@property (assign, nonatomic) CGFloat xOffset __attribute__((deprecated("Set offset.x instead.")));
|
||||
@property (assign, nonatomic) CGFloat yOffset __attribute__((deprecated("Set offset.y instead.")));
|
||||
@property (assign, nonatomic) CGFloat cornerRadius __attribute__((deprecated("Set bezelView.layer.cornerRadius instead.")));
|
||||
@property (assign, nonatomic) BOOL dimBackground __attribute__((deprecated("Customize HUD background properties instead.")));
|
||||
@property (strong, nonatomic) UIColor *activityIndicatorColor __attribute__((deprecated("Use UIAppearance to customize UIActivityIndicatorView. E.g.: [UIActivityIndicatorView appearanceWhenContainedIn:[MBProgressHUD class], nil].color = [UIColor redColor];")));
|
||||
@property (atomic, assign, readonly) CGSize size __attribute__((deprecated("Get the bezelView.frame.size instead.")));
|
||||
@property (nonatomic, strong, nullable) UIColor *color;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
+107
-408
@@ -1,21 +1,12 @@
|
||||
//
|
||||
// MBProgressHUD.m
|
||||
// Version 1.1.0
|
||||
// Version 1.2.0
|
||||
// Created by Matej Bukovinski on 2.4.09.
|
||||
//
|
||||
|
||||
#import "MBProgressHUD.h"
|
||||
#import <tgmath.h>
|
||||
|
||||
|
||||
#ifndef kCFCoreFoundationVersionNumber_iOS_7_0
|
||||
#define kCFCoreFoundationVersionNumber_iOS_7_0 847.20
|
||||
#endif
|
||||
|
||||
#ifndef kCFCoreFoundationVersionNumber_iOS_8_0
|
||||
#define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15
|
||||
#endif
|
||||
|
||||
#define MBMainThreadAssert() NSAssert([NSThread isMainThread], @"MBProgressHUD needs to be accessed on the main thread.");
|
||||
|
||||
CGFloat const MBProgressMaxOffset = 1000000.f;
|
||||
@@ -25,11 +16,7 @@ static const CGFloat MBDefaultLabelFontSize = 16.f;
|
||||
static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
|
||||
@interface MBProgressHUD () {
|
||||
// Deprecated
|
||||
UIColor *_activityIndicatorColor;
|
||||
CGFloat _opacity;
|
||||
}
|
||||
@interface MBProgressHUD ()
|
||||
|
||||
@property (nonatomic, assign) BOOL useAnimation;
|
||||
@property (nonatomic, assign, getter=hasFinished) BOOL finished;
|
||||
@@ -39,14 +26,12 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
@property (nonatomic, strong) NSArray *bezelConstraints;
|
||||
@property (nonatomic, strong) UIView *topSpacer;
|
||||
@property (nonatomic, strong) UIView *bottomSpacer;
|
||||
@property (nonatomic, strong) UIMotionEffectGroup *bezelMotionEffects;
|
||||
@property (nonatomic, weak) NSTimer *graceTimer;
|
||||
@property (nonatomic, weak) NSTimer *minShowTimer;
|
||||
@property (nonatomic, weak) NSTimer *hideDelayTimer;
|
||||
@property (nonatomic, weak) CADisplayLink *progressObjectDisplayLink;
|
||||
|
||||
// Deprecated
|
||||
@property (assign) BOOL taskInProgress;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -96,12 +81,14 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
_animationType = MBProgressHUDAnimationFade;
|
||||
_mode = MBProgressHUDModeIndeterminate;
|
||||
_margin = 20.0f;
|
||||
_opacity = 1.f;
|
||||
_defaultMotionEffectsEnabled = YES;
|
||||
_defaultMotionEffectsEnabled = NO;
|
||||
|
||||
if (@available(iOS 13.0, tvOS 13, *)) {
|
||||
_contentColor = [[UIColor labelColor] colorWithAlphaComponent:0.7f];
|
||||
} else {
|
||||
_contentColor = [UIColor colorWithWhite:0.f alpha:0.7f];
|
||||
}
|
||||
|
||||
// Default color, depending on the current iOS version
|
||||
BOOL isLegacy = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0;
|
||||
_contentColor = isLegacy ? [UIColor whiteColor] : [UIColor colorWithWhite:0.f alpha:0.7f];
|
||||
// Transparent background
|
||||
self.opaque = NO;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
@@ -150,7 +137,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
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];
|
||||
@@ -171,14 +158,14 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
|
||||
self.minShowTimer = timer;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ... otherwise hide the HUD immediately
|
||||
[self hideUsingAnimation:self.useAnimation];
|
||||
}
|
||||
|
||||
- (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay {
|
||||
// Cancel any scheduled hideDelayed: calls
|
||||
// Cancel any scheduled hideAnimated:afterDelay: calls
|
||||
[self.hideDelayTimer invalidate];
|
||||
|
||||
NSTimer *timer = [NSTimer timerWithTimeInterval:delay target:self selector:@selector(handleHideTimer:) userInfo:@(animated) repeats:NO];
|
||||
@@ -216,7 +203,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
[self.bezelView.layer removeAllAnimations];
|
||||
[self.backgroundView.layer removeAllAnimations];
|
||||
|
||||
// Cancel any scheduled hideDelayed: calls
|
||||
// Cancel any scheduled hideAnimated:afterDelay: calls
|
||||
[self.hideDelayTimer invalidate];
|
||||
|
||||
self.showStarted = [NSDate date];
|
||||
@@ -225,18 +212,25 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
// Needed in case we hide and re-show with the same NSProgress object attached.
|
||||
[self setNSProgressDisplayLinkEnabled:YES];
|
||||
|
||||
// Set up motion effects only at this point to avoid needlessly
|
||||
// creating the effect if it was disabled after initialization.
|
||||
[self updateBezelMotionEffects];
|
||||
|
||||
if (animated) {
|
||||
[self animateIn:YES withType:self.animationType completion:NULL];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
self.bezelView.alpha = self.opacity;
|
||||
#pragma clang diagnostic pop
|
||||
self.bezelView.alpha = 1.f;
|
||||
self.backgroundView.alpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)hideUsingAnimation:(BOOL)animated {
|
||||
// Cancel any scheduled hideAnimated:afterDelay: calls.
|
||||
// This needs to happen here instead of in done,
|
||||
// to avoid races if another hideAnimated:afterDelay:
|
||||
// call comes in while the HUD is animating out.
|
||||
[self.hideDelayTimer invalidate];
|
||||
|
||||
if (animated && self.showStarted) {
|
||||
self.showStarted = nil;
|
||||
[self animateIn:NO withType:self.animationType completion:^(BOOL finished) {
|
||||
@@ -276,26 +270,14 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
} else if (!animatingIn && type == MBProgressHUDAnimationZoomOut) {
|
||||
bezelView.transform = small;
|
||||
}
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
bezelView.alpha = animatingIn ? self.opacity : 0.f;
|
||||
#pragma clang diagnostic pop
|
||||
self.backgroundView.alpha = animatingIn ? 1.f : 0.f;
|
||||
CGFloat alpha = animatingIn ? 1.f : 0.f;
|
||||
bezelView.alpha = alpha;
|
||||
self.backgroundView.alpha = alpha;
|
||||
};
|
||||
|
||||
// Spring animations are nicer, but only available on iOS 7+
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) {
|
||||
[UIView animateWithDuration:0.3 delay:0. usingSpringWithDamping:1.f initialSpringVelocity:0.f options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion];
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
[UIView animateWithDuration:0.3 delay:0. options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion];
|
||||
[UIView animateWithDuration:0.3 delay:0. usingSpringWithDamping:1.f initialSpringVelocity:0.f options:UIViewAnimationOptionBeginFromCurrentState animations:animations completion:completion];
|
||||
}
|
||||
|
||||
- (void)done {
|
||||
// Cancel any scheduled hideDelayed: calls
|
||||
[self.hideDelayTimer invalidate];
|
||||
[self setNSProgressDisplayLinkEnabled:NO];
|
||||
|
||||
if (self.hasFinished) {
|
||||
@@ -333,7 +315,6 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
bezelView.alpha = 0.f;
|
||||
[self addSubview:bezelView];
|
||||
_bezelView = bezelView;
|
||||
[self updateBezelMotionEffects];
|
||||
|
||||
UILabel *label = [UILabel new];
|
||||
label.adjustsFontSizeToFitWidth = NO;
|
||||
@@ -389,9 +370,20 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
if (mode == MBProgressHUDModeIndeterminate) {
|
||||
if (!isActivityIndicator) {
|
||||
// Update to indeterminate indicator
|
||||
UIActivityIndicatorView *activityIndicator;
|
||||
[indicator removeFromSuperview];
|
||||
indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
|
||||
[(UIActivityIndicatorView *)indicator startAnimating];
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
if (@available(iOS 13.0, tvOS 13.0, *)) {
|
||||
#endif
|
||||
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleLarge];
|
||||
activityIndicator.color = [UIColor whiteColor];
|
||||
#if !TARGET_OS_MACCATALYST
|
||||
} else {
|
||||
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
|
||||
}
|
||||
#endif
|
||||
[activityIndicator startAnimating];
|
||||
indicator = activityIndicator;
|
||||
[self.bezelView addSubview:indicator];
|
||||
}
|
||||
}
|
||||
@@ -411,7 +403,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
if (mode == MBProgressHUDModeAnnularDeterminate) {
|
||||
[(MBRoundProgressView *)indicator setAnnular:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mode == MBProgressHUDModeCustomView && self.customView != indicator) {
|
||||
// Update custom view indicator
|
||||
[indicator removeFromSuperview];
|
||||
@@ -443,13 +435,6 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
self.detailsLabel.textColor = color;
|
||||
[self.button setTitleColor:color forState:UIControlStateNormal];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (self.activityIndicatorColor) {
|
||||
color = self.activityIndicatorColor;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
// UIAppearance settings are prioritized. If they are preset the set color is ignored.
|
||||
|
||||
UIView *indicator = self.indicator;
|
||||
@@ -461,7 +446,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
// For iOS 9+
|
||||
appearance = [UIActivityIndicatorView appearanceWhenContainedInInstancesOfClasses:@[[MBProgressHUD class]]];
|
||||
#endif
|
||||
|
||||
|
||||
if (appearance.color == nil) {
|
||||
((UIActivityIndicatorView *)indicator).color = color;
|
||||
}
|
||||
@@ -492,20 +477,15 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
((MBBarProgressView *)indicator).lineColor = color;
|
||||
}
|
||||
} else {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV
|
||||
if ([indicator respondsToSelector:@selector(setTintColor:)]) {
|
||||
[indicator setTintColor:color];
|
||||
}
|
||||
#endif
|
||||
[indicator setTintColor:color];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateBezelMotionEffects {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 || TARGET_OS_TV
|
||||
MBBackgroundView *bezelView = self.bezelView;
|
||||
if (![bezelView respondsToSelector:@selector(addMotionEffect:)]) return;
|
||||
UIMotionEffectGroup *bezelMotionEffects = self.bezelMotionEffects;
|
||||
|
||||
if (self.defaultMotionEffectsEnabled) {
|
||||
if (self.defaultMotionEffectsEnabled && !bezelMotionEffects) {
|
||||
CGFloat effectOffset = 10.f;
|
||||
UIInterpolatingMotionEffect *effectX = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];
|
||||
effectX.maximumRelativeValue = @(effectOffset);
|
||||
@@ -518,14 +498,12 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
UIMotionEffectGroup *group = [[UIMotionEffectGroup alloc] init];
|
||||
group.motionEffects = @[effectX, effectY];
|
||||
|
||||
self.bezelMotionEffects = group;
|
||||
[bezelView addMotionEffect:group];
|
||||
} else {
|
||||
NSArray *effects = [bezelView motionEffects];
|
||||
for (UIMotionEffect *effect in effects) {
|
||||
[bezelView removeMotionEffect:effect];
|
||||
}
|
||||
} else if (bezelMotionEffects) {
|
||||
self.bezelMotionEffects = nil;
|
||||
[bezelView removeMotionEffect:bezelMotionEffects];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Layout
|
||||
@@ -613,10 +591,10 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
[bezel addConstraints:bezelConstraints];
|
||||
self.bezelConstraints = bezelConstraints;
|
||||
|
||||
|
||||
self.paddingConstraints = [paddingConstraints copy];
|
||||
[self updatePaddingConstraints];
|
||||
|
||||
|
||||
[super updateConstraints];
|
||||
}
|
||||
|
||||
@@ -701,9 +679,9 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
- (void)setProgressObjectDisplayLink:(CADisplayLink *)progressObjectDisplayLink {
|
||||
if (progressObjectDisplayLink != _progressObjectDisplayLink) {
|
||||
[_progressObjectDisplayLink invalidate];
|
||||
|
||||
|
||||
_progressObjectDisplayLink = progressObjectDisplayLink;
|
||||
|
||||
|
||||
[_progressObjectDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
|
||||
}
|
||||
}
|
||||
@@ -761,7 +739,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
#pragma mark - Notifications
|
||||
|
||||
- (void)registerForNotifications {
|
||||
#if !TARGET_OS_TV
|
||||
#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
|
||||
[nc addObserver:self selector:@selector(statusBarOrientationDidChange:)
|
||||
@@ -770,13 +748,13 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
|
||||
- (void)unregisterFromNotifications {
|
||||
#if !TARGET_OS_TV
|
||||
#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
[nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST
|
||||
- (void)statusBarOrientationDidChange:(NSNotification *)notification {
|
||||
UIView *superview = self.superview;
|
||||
if (!superview) {
|
||||
@@ -808,7 +786,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
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!
|
||||
@@ -886,11 +864,10 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0;
|
||||
|
||||
if (_annular) {
|
||||
// Draw background
|
||||
CGFloat lineWidth = isPreiOS7 ? 5.f : 2.f;
|
||||
CGFloat lineWidth = 2.f;
|
||||
UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath];
|
||||
processBackgroundPath.lineWidth = lineWidth;
|
||||
processBackgroundPath.lineCapStyle = kCGLineCapButt;
|
||||
@@ -903,7 +880,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
[processBackgroundPath stroke];
|
||||
// Draw progress
|
||||
UIBezierPath *processPath = [UIBezierPath bezierPath];
|
||||
processPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare;
|
||||
processPath.lineCapStyle = kCGLineCapSquare;
|
||||
processPath.lineWidth = lineWidth;
|
||||
endAngle = (self.progress * 2 * (float)M_PI) + startAngle;
|
||||
[processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];
|
||||
@@ -918,33 +895,20 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
[_progressTintColor setStroke];
|
||||
[_backgroundTintColor setFill];
|
||||
CGContextSetLineWidth(context, lineWidth);
|
||||
if (isPreiOS7) {
|
||||
CGContextFillEllipseInRect(context, circleRect);
|
||||
}
|
||||
CGContextStrokeEllipseInRect(context, circleRect);
|
||||
// 90 degrees
|
||||
CGFloat startAngle = - ((float)M_PI / 2.f);
|
||||
// Draw progress
|
||||
if (isPreiOS7) {
|
||||
CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - lineWidth;
|
||||
CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle;
|
||||
[_progressTintColor setFill];
|
||||
CGContextMoveToPoint(context, center.x, center.y);
|
||||
CGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0);
|
||||
CGContextClosePath(context);
|
||||
CGContextFillPath(context);
|
||||
} else {
|
||||
UIBezierPath *processPath = [UIBezierPath bezierPath];
|
||||
processPath.lineCapStyle = kCGLineCapButt;
|
||||
processPath.lineWidth = lineWidth * 2.f;
|
||||
CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - (processPath.lineWidth / 2.f);
|
||||
CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle;
|
||||
[processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];
|
||||
// Ensure that we don't get color overlapping when _progressTintColor alpha < 1.f.
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
[_progressTintColor set];
|
||||
[processPath stroke];
|
||||
}
|
||||
UIBezierPath *processPath = [UIBezierPath bezierPath];
|
||||
processPath.lineCapStyle = kCGLineCapButt;
|
||||
processPath.lineWidth = lineWidth * 2.f;
|
||||
CGFloat radius = (CGRectGetWidth(self.bounds) / 2.f) - (processPath.lineWidth / 2.f);
|
||||
CGFloat endAngle = (self.progress * 2.f * (float)M_PI) + startAngle;
|
||||
[processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];
|
||||
// Ensure that we don't get color overlapping when _progressTintColor alpha < 1.f.
|
||||
CGContextSetBlendMode(context, kCGBlendModeCopy);
|
||||
[_progressTintColor set];
|
||||
[processPath stroke];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -975,8 +939,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
#pragma mark - Layout
|
||||
|
||||
- (CGSize)intrinsicContentSize {
|
||||
BOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0;
|
||||
return CGSizeMake(120.f, isPreiOS7 ? 20.f : 10.f);
|
||||
return CGSizeMake(120.f, 10.f);
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
@@ -1008,11 +971,11 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (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);
|
||||
@@ -1021,26 +984,26 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
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);
|
||||
@@ -1060,10 +1023,10 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
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);
|
||||
@@ -1073,7 +1036,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1083,12 +1046,7 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
@interface MBBackgroundView ()
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
@property UIVisualEffectView *effectView;
|
||||
#endif
|
||||
#if !TARGET_OS_TV
|
||||
@property UIToolbar *toolbar;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@@ -1099,19 +1057,17 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if ((self = [super initWithFrame:frame])) {
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) {
|
||||
_style = MBProgressHUDBackgroundStyleBlur;
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
_blurEffectStyle = UIBlurEffectStyleLight;
|
||||
#endif
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) {
|
||||
_color = [UIColor colorWithWhite:0.8f alpha:0.6f];
|
||||
} else {
|
||||
_color = [UIColor colorWithWhite:0.95f alpha:0.6f];
|
||||
}
|
||||
_style = MBProgressHUDBackgroundStyleBlur;
|
||||
if (@available(iOS 13.0, *)) {
|
||||
#if TARGET_OS_TV
|
||||
_blurEffectStyle = UIBlurEffectStyleRegular;
|
||||
#else
|
||||
_blurEffectStyle = UIBlurEffectStyleSystemThickMaterial;
|
||||
#endif
|
||||
// Leaving the color unassigned yields best results.
|
||||
} else {
|
||||
_style = MBProgressHUDBackgroundStyleSolidColor;
|
||||
_color = [[UIColor blackColor] colorWithAlphaComponent:0.8];
|
||||
_blurEffectStyle = UIBlurEffectStyleLight;
|
||||
_color = [UIColor colorWithWhite:0.8f alpha:0.6f];
|
||||
}
|
||||
|
||||
self.clipsToBounds = YES;
|
||||
@@ -1131,9 +1087,6 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
#pragma mark - Appearance
|
||||
|
||||
- (void)setStyle:(MBProgressHUDBackgroundStyle)style {
|
||||
if (style == MBProgressHUDBackgroundStyleBlur && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0) {
|
||||
style = MBProgressHUDBackgroundStyleSolidColor;
|
||||
}
|
||||
if (_style != style) {
|
||||
_style = style;
|
||||
[self updateForBackgroundStyle];
|
||||
@@ -1148,8 +1101,6 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
|
||||
- (void)setBlurEffectStyle:(UIBlurEffectStyle)blurEffectStyle {
|
||||
if (_blurEffectStyle == blurEffectStyle) {
|
||||
return;
|
||||
@@ -1160,64 +1111,31 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
[self updateForBackgroundStyle];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma mark - Views
|
||||
|
||||
- (void)updateForBackgroundStyle {
|
||||
[self.effectView removeFromSuperview];
|
||||
self.effectView = nil;
|
||||
|
||||
MBProgressHUDBackgroundStyle style = self.style;
|
||||
if (style == MBProgressHUDBackgroundStyleBlur) {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) {
|
||||
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:self.blurEffectStyle];
|
||||
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect];
|
||||
[self addSubview:effectView];
|
||||
effectView.frame = self.bounds;
|
||||
effectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
self.backgroundColor = self.color;
|
||||
self.layer.allowsGroupOpacity = NO;
|
||||
self.effectView = effectView;
|
||||
} else {
|
||||
#endif
|
||||
#if !TARGET_OS_TV
|
||||
UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectInset(self.bounds, -100.f, -100.f)];
|
||||
toolbar.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
toolbar.barTintColor = self.color;
|
||||
toolbar.translucent = YES;
|
||||
[self addSubview:toolbar];
|
||||
self.toolbar = toolbar;
|
||||
#endif
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
}
|
||||
#endif
|
||||
UIBlurEffect *effect = [UIBlurEffect effectWithStyle:self.blurEffectStyle];
|
||||
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:effect];
|
||||
[self insertSubview:effectView atIndex:0];
|
||||
effectView.frame = self.bounds;
|
||||
effectView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
self.backgroundColor = self.color;
|
||||
self.layer.allowsGroupOpacity = NO;
|
||||
self.effectView = effectView;
|
||||
} else {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) {
|
||||
[self.effectView removeFromSuperview];
|
||||
self.effectView = nil;
|
||||
} else {
|
||||
#endif
|
||||
#if !TARGET_OS_TV
|
||||
[self.toolbar removeFromSuperview];
|
||||
self.toolbar = nil;
|
||||
#endif
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 || TARGET_OS_TV
|
||||
}
|
||||
#endif
|
||||
self.backgroundColor = self.color;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateViewsForColor:(UIColor *)color {
|
||||
if (self.style == MBProgressHUDBackgroundStyleBlur) {
|
||||
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) {
|
||||
self.backgroundColor = self.color;
|
||||
} else {
|
||||
#if !TARGET_OS_TV
|
||||
self.toolbar.barTintColor = color;
|
||||
#endif
|
||||
}
|
||||
self.backgroundColor = self.color;
|
||||
} else {
|
||||
self.backgroundColor = self.color;
|
||||
}
|
||||
@@ -1226,226 +1144,6 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
@end
|
||||
|
||||
|
||||
@implementation MBProgressHUD (Deprecated)
|
||||
|
||||
#pragma mark - Class
|
||||
|
||||
+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated {
|
||||
NSArray *huds = [MBProgressHUD allHUDsForView:view];
|
||||
for (MBProgressHUD *hud in huds) {
|
||||
hud.removeFromSuperViewOnHide = YES;
|
||||
[hud hideAnimated:animated];
|
||||
}
|
||||
return [huds count];
|
||||
}
|
||||
|
||||
+ (NSArray *)allHUDsForView:(UIView *)view {
|
||||
NSMutableArray *huds = [NSMutableArray array];
|
||||
NSArray *subviews = view.subviews;
|
||||
for (UIView *aView in subviews) {
|
||||
if ([aView isKindOfClass:self]) {
|
||||
[huds addObject:aView];
|
||||
}
|
||||
}
|
||||
return [NSArray arrayWithArray:huds];
|
||||
}
|
||||
|
||||
#pragma mark - Lifecycle
|
||||
|
||||
- (id)initWithWindow:(UIWindow *)window {
|
||||
return [self initWithView:window];
|
||||
}
|
||||
|
||||
#pragma mark - Show & hide
|
||||
|
||||
- (void)show:(BOOL)animated {
|
||||
[self showAnimated:animated];
|
||||
}
|
||||
|
||||
- (void)hide:(BOOL)animated {
|
||||
[self hideAnimated:animated];
|
||||
}
|
||||
|
||||
- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay {
|
||||
[self hideAnimated:animated afterDelay:delay];
|
||||
}
|
||||
|
||||
#pragma mark - Threading
|
||||
|
||||
- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated {
|
||||
[self showAnimated:animated whileExecutingBlock:^{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
|
||||
// Start executing the requested task
|
||||
[target performSelector:method withObject:object];
|
||||
#pragma clang diagnostic pop
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)(void))completion {
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue {
|
||||
[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL];
|
||||
}
|
||||
|
||||
- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue completionBlock:(nullable MBProgressHUDCompletionBlock)completion {
|
||||
self.taskInProgress = YES;
|
||||
self.completionBlock = completion;
|
||||
dispatch_async(queue, ^(void) {
|
||||
block();
|
||||
dispatch_async(dispatch_get_main_queue(), ^(void) {
|
||||
[self cleanUp];
|
||||
});
|
||||
});
|
||||
[self showAnimated:animated];
|
||||
}
|
||||
|
||||
- (void)cleanUp {
|
||||
self.taskInProgress = NO;
|
||||
[self hideAnimated:self.useAnimation];
|
||||
}
|
||||
|
||||
#pragma mark - Labels
|
||||
|
||||
- (NSString *)labelText {
|
||||
return self.label.text;
|
||||
}
|
||||
|
||||
- (void)setLabelText:(NSString *)labelText {
|
||||
MBMainThreadAssert();
|
||||
self.label.text = labelText;
|
||||
}
|
||||
|
||||
- (UIFont *)labelFont {
|
||||
return self.label.font;
|
||||
}
|
||||
|
||||
- (void)setLabelFont:(UIFont *)labelFont {
|
||||
MBMainThreadAssert();
|
||||
self.label.font = labelFont;
|
||||
}
|
||||
|
||||
- (UIColor *)labelColor {
|
||||
return self.label.textColor;
|
||||
}
|
||||
|
||||
- (void)setLabelColor:(UIColor *)labelColor {
|
||||
MBMainThreadAssert();
|
||||
self.label.textColor = labelColor;
|
||||
}
|
||||
|
||||
- (NSString *)detailsLabelText {
|
||||
return self.detailsLabel.text;
|
||||
}
|
||||
|
||||
- (void)setDetailsLabelText:(NSString *)detailsLabelText {
|
||||
MBMainThreadAssert();
|
||||
self.detailsLabel.text = detailsLabelText;
|
||||
}
|
||||
|
||||
- (UIFont *)detailsLabelFont {
|
||||
return self.detailsLabel.font;
|
||||
}
|
||||
|
||||
- (void)setDetailsLabelFont:(UIFont *)detailsLabelFont {
|
||||
MBMainThreadAssert();
|
||||
self.detailsLabel.font = detailsLabelFont;
|
||||
}
|
||||
|
||||
- (UIColor *)detailsLabelColor {
|
||||
return self.detailsLabel.textColor;
|
||||
}
|
||||
|
||||
- (void)setDetailsLabelColor:(UIColor *)detailsLabelColor {
|
||||
MBMainThreadAssert();
|
||||
self.detailsLabel.textColor = detailsLabelColor;
|
||||
}
|
||||
|
||||
- (CGFloat)opacity {
|
||||
return _opacity;
|
||||
}
|
||||
|
||||
- (void)setOpacity:(CGFloat)opacity {
|
||||
MBMainThreadAssert();
|
||||
_opacity = opacity;
|
||||
}
|
||||
|
||||
- (UIColor *)color {
|
||||
return self.bezelView.color;
|
||||
}
|
||||
|
||||
- (void)setColor:(UIColor *)color {
|
||||
MBMainThreadAssert();
|
||||
self.bezelView.color = color;
|
||||
}
|
||||
|
||||
- (CGFloat)yOffset {
|
||||
return self.offset.y;
|
||||
}
|
||||
|
||||
- (void)setYOffset:(CGFloat)yOffset {
|
||||
MBMainThreadAssert();
|
||||
self.offset = CGPointMake(self.offset.x, yOffset);
|
||||
}
|
||||
|
||||
- (CGFloat)xOffset {
|
||||
return self.offset.x;
|
||||
}
|
||||
|
||||
- (void)setXOffset:(CGFloat)xOffset {
|
||||
MBMainThreadAssert();
|
||||
self.offset = CGPointMake(xOffset, self.offset.y);
|
||||
}
|
||||
|
||||
- (CGFloat)cornerRadius {
|
||||
return self.bezelView.layer.cornerRadius;
|
||||
}
|
||||
|
||||
- (void)setCornerRadius:(CGFloat)cornerRadius {
|
||||
MBMainThreadAssert();
|
||||
self.bezelView.layer.cornerRadius = cornerRadius;
|
||||
}
|
||||
|
||||
- (BOOL)dimBackground {
|
||||
MBBackgroundView *backgroundView = self.backgroundView;
|
||||
UIColor *dimmedColor = [UIColor colorWithWhite:0.f alpha:.2f];
|
||||
return backgroundView.style == MBProgressHUDBackgroundStyleSolidColor && [backgroundView.color isEqual:dimmedColor];
|
||||
}
|
||||
|
||||
- (void)setDimBackground:(BOOL)dimBackground {
|
||||
MBMainThreadAssert();
|
||||
self.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor;
|
||||
self.backgroundView.color = dimBackground ? [UIColor colorWithWhite:0.f alpha:.2f] : [UIColor clearColor];
|
||||
}
|
||||
|
||||
- (CGSize)size {
|
||||
return self.bezelView.frame.size;
|
||||
}
|
||||
|
||||
- (UIColor *)activityIndicatorColor {
|
||||
return _activityIndicatorColor;
|
||||
}
|
||||
|
||||
- (void)setActivityIndicatorColor:(UIColor *)activityIndicatorColor {
|
||||
if (activityIndicatorColor != _activityIndicatorColor) {
|
||||
_activityIndicatorColor = activityIndicatorColor;
|
||||
UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)self.indicator;
|
||||
if ([indicator isKindOfClass:[UIActivityIndicatorView class]]) {
|
||||
[indicator setColor:activityIndicatorColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MBProgressHUDRoundedButton
|
||||
|
||||
#pragma mark - Lifecycle
|
||||
@@ -1469,8 +1167,9 @@ static const CGFloat MBDefaultDetailsLabelFontSize = 12.f;
|
||||
}
|
||||
|
||||
- (CGSize)intrinsicContentSize {
|
||||
// Only show if we have associated control events
|
||||
if (self.allControlEvents == 0) return CGSizeZero;
|
||||
// Only show if we have associated control events and a title
|
||||
if ((self.allControlEvents == 0) || ([self titleForState:UIControlStateNormal].length == 0))
|
||||
return CGSizeZero;
|
||||
CGSize size = [super intrinsicContentSize];
|
||||
// Add some side padding
|
||||
size.width += 20.f;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
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
|
||||
with an indicator and/or labels while work is being done in a background thread.
|
||||
The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD
|
||||
MBProgressHUD is an iOS drop-in class that displays a translucent HUD
|
||||
with an indicator and/or labels while work is being done in a background thread.
|
||||
The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD
|
||||
with some additional features.
|
||||
DESC
|
||||
s.homepage = "http://www.bukovinski.com"
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'Matej Bukovinski' => 'matej@bukovinski.com' }
|
||||
s.source = { :git => "https://github.com/matej/MBProgressHUD.git", :tag => s.version.to_s }
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.ios.deployment_target = '9.0'
|
||||
s.tvos.deployment_target = '9.0'
|
||||
s.source_files = '*.{h,m}'
|
||||
s.resource_bundles = {'MBProgressHUD' => ['PrivacyInfo.xcprivacy']}
|
||||
s.frameworks = "CoreGraphics", "QuartzCore"
|
||||
s.requires_arc = true
|
||||
end
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
1777D3E81D757B6E0037C7F1 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; };
|
||||
1D104D931ACA371400973364 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; };
|
||||
1D104D941ACA373100973364 /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
AAD69D522B51630200BE0369 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = AAD69D512B5162AE00BE0369 /* PrivacyInfo.xcprivacy */; };
|
||||
AAD69D532B51630200BE0369 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = AAD69D512B5162AE00BE0369 /* PrivacyInfo.xcprivacy */; };
|
||||
D286A74D1518C70F00E13FB8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A74C1518C70F00E13FB8 /* Foundation.framework */; };
|
||||
D286A7531518C70F00E13FB8 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; };
|
||||
D286A75E1518C89600E13FB8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A75D1518C89600E13FB8 /* UIKit.framework */; };
|
||||
@@ -37,6 +39,7 @@
|
||||
1777D3E21D757AF50037C7F1 /* Framework-tvOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Framework-tvOS-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
1D104D7A1ACA36CC00973364 /* MBProgressHUD.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MBProgressHUD.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1D104D951ACA376200973364 /* Framework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Framework-Info.plist"; sourceTree = SOURCE_ROOT; };
|
||||
AAD69D512B5162AE00BE0369 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMBProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D286A74C1518C70F00E13FB8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D286A7511518C70F00E13FB8 /* MBProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = SOURCE_ROOT; };
|
||||
@@ -117,6 +120,7 @@
|
||||
children = (
|
||||
D286A7511518C70F00E13FB8 /* MBProgressHUD.h */,
|
||||
D286A7521518C70F00E13FB8 /* MBProgressHUD.m */,
|
||||
AAD69D512B5162AE00BE0369 /* PrivacyInfo.xcprivacy */,
|
||||
1315DD72178044770032507D /* Supporting Files */,
|
||||
);
|
||||
name = MBProgressHUD;
|
||||
@@ -204,7 +208,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
CLASSPREFIX = MB;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 1120;
|
||||
ORGANIZATIONNAME = "Matej Bukovinski";
|
||||
TargetAttributes = {
|
||||
1777D3DE1D757AF50037C7F1 = {
|
||||
@@ -218,10 +222,11 @@
|
||||
};
|
||||
buildConfigurationList = D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = D286A73E1518C70E00E13FB8;
|
||||
productRefGroup = D286A74A1518C70F00E13FB8 /* Products */;
|
||||
@@ -240,6 +245,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AAD69D532B51630200BE0369 /* PrivacyInfo.xcprivacy in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -247,6 +253,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AAD69D522B51630200BE0369 /* PrivacyInfo.xcprivacy in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -304,6 +311,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;
|
||||
@@ -342,6 +350,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;
|
||||
@@ -380,6 +389,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;
|
||||
@@ -414,6 +424,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;
|
||||
@@ -428,6 +439,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -435,11 +447,13 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
@@ -465,7 +479,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
};
|
||||
@@ -475,6 +489,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -482,11 +497,13 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
@@ -504,7 +521,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
+1
-5
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -29,8 +29,6 @@
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -51,8 +49,6 @@
|
||||
ReferencedContainer = "container:MBProgressHUD.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,18 +26,14 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -53,8 +49,6 @@
|
||||
ReferencedContainer = "container:MBProgressHUD.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1120"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,18 +26,14 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
@@ -53,8 +49,6 @@
|
||||
ReferencedContainer = "container:MBProgressHUD.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,20 @@
|
||||
// swift-tools-version:5.9
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "MBProgressHUD",
|
||||
products: [
|
||||
.library(name: "MBProgressHUD", targets: ["MBProgressHUD"])
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "MBProgressHUD",
|
||||
dependencies: [],
|
||||
path: ".",
|
||||
exclude: ["Demo"],
|
||||
sources: ["MBProgressHUD.h", "MBProgressHUD.m"],
|
||||
resources: [.copy("PrivacyInfo.xcprivacy")],
|
||||
publicHeadersPath: "include"
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
+23
-9
@@ -1,7 +1,7 @@
|
||||
# MBProgressHUD
|
||||
|
||||
[](https://travis-ci.org/matej/MBProgressHUD) [](https://codecov.io/github/matej/MBProgressHUD?branch=master)
|
||||
[](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [](https://cocoapods.org/pods/MBProgressHUD) [](http://opensource.org/licenses/MIT)
|
||||
[](https://github.com/apple/swift-package-manager) [](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [](https://github.com/JamitLabs/Accio) [](https://cocoapods.org/pods/MBProgressHUD) [](http://opensource.org/licenses/MIT)
|
||||
|
||||
`MBProgressHUD` is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private `UIKit` `UIProgressHUD` with some additional features.
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
[](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/6.png)
|
||||
[](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/7.png)
|
||||
|
||||
**NOTE:** The class has recently undergone a major rewrite. The old version is available in the [legacy](https://github.com/jdg/MBProgressHUD/tree/legacy) branch, should you need it.
|
||||
|
||||
## Requirements
|
||||
|
||||
`MBProgressHUD` works on iOS 6+ and requires ARC to build. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
|
||||
`MBProgressHUD` works on iOS 9.0+. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
|
||||
|
||||
* Foundation.framework
|
||||
* UIKit.framework
|
||||
@@ -31,16 +29,28 @@ 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.
|
||||
|
||||
### SwiftPM / Accio
|
||||
|
||||
1. Add the following to your `Package.swift`:
|
||||
```swift
|
||||
.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
|
||||
.target(name: "App", dependencies: ["MBProgressHUD"]),
|
||||
```
|
||||
3. Then open your project in Xcode 11+ (SwiftPM) or run `accio update` (Accio).
|
||||
|
||||
### Source files
|
||||
|
||||
Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.
|
||||
@@ -72,7 +82,7 @@ dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
|
||||
});
|
||||
```
|
||||
|
||||
You can add the HUD on any view or window. It is however a good idea to avoid adding the HUD to certain `UIKit` views with complex view hierarchies - like `UITableView` or `UICollectionView`. Those can mutate their subviews in unexpected ways and thereby break HUD display.
|
||||
You can add the HUD on any view or window. It is however a good idea to avoid adding the HUD to certain `UIKit` views with complex view hierarchies - like `UITableView` or `UICollectionView`. Those can mutate their subviews in unexpected ways and thereby break HUD display.
|
||||
|
||||
If you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns.
|
||||
|
||||
@@ -99,7 +109,7 @@ NSProgress *progress = [self doSomethingInBackgroundCompletion:^{
|
||||
hud.progressObject = progress;
|
||||
```
|
||||
|
||||
Keep in mind that UI updates, inclining calls to MBProgressHUD should always be done on the main thread.
|
||||
Keep in mind that UI updates, including calls to MBProgressHUD should always be done on the main thread.
|
||||
|
||||
If you need to run your long-running task in the main thread, you should perform it with a slight delay, so UIKit will have enough time to update the UI (i.e., draw the HUD) before you block the main thread with your task.
|
||||
|
||||
@@ -123,4 +133,8 @@ This code is distributed under the terms and conditions of the [MIT license](LIC
|
||||
|
||||
## Change-log
|
||||
|
||||
A brief summary of each MBProgressHUD release can be found in the [CHANGELOG](CHANGELOG.mdown).
|
||||
A brief summary of each MBProgressHUD release can be found in the [CHANGELOG](CHANGELOG.mdown).
|
||||
|
||||
## Privacy
|
||||
|
||||
MBProgressHUD does not collect any data. See [SDK Privacy Practices](https://bukovinski.com/sdk-privacy/mbprogresshud/) for more information.
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../MBProgressHUD.h
|
||||
@@ -0,0 +1,5 @@
|
||||
module MBProgressHUD {
|
||||
umbrella header "MBProgressHUD/MBProgressHUD.h"
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Reference in New Issue
Block a user