├── .gitignore ├── .travis.yml ├── CHANGELOG.mdown ├── CONTRIBUTING.md ├── Demo ├── HudDemo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── HudDemo.xcscheme │ │ ├── HudDemoTV.xcscheme │ │ └── HudTests.xcscheme ├── HudDemo │ ├── HudDemo.entitlements │ ├── HudDemo_Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppStore.png │ │ │ ├── Contents.json │ │ │ ├── Icon-167.png │ │ │ ├── Icon-20.png │ │ │ ├── Icon-40.png │ │ │ ├── Icon-41.png │ │ │ ├── Icon-60.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-72.png │ │ │ ├── Icon-72@2x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-Small-1.png │ │ │ ├── Icon-Small-40.png │ │ │ ├── Icon-Small-40@2x-1.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Small-50.png │ │ │ ├── Icon-Small-50@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x-1.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ ├── Icon.png │ │ │ └── Icon@2x.png │ │ ├── Checkmark.imageset │ │ │ ├── Checkmark.png │ │ │ ├── Checkmark@2x.png │ │ │ ├── Checkmark@3x.png │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── MBHudDemoAppDelegate.h │ ├── MBHudDemoAppDelegate.m │ ├── MBHudDemoViewController.h │ ├── MBHudDemoViewController.m │ ├── en.lproj │ │ ├── Launch.storyboard │ │ └── Main.storyboard │ └── main.m ├── HudDemoTV │ ├── Base.lproj │ │ ├── Launch.storyboard │ │ └── Main.storyboard │ ├── Images.xcassets │ │ ├── Contents.json │ │ ├── Icons.brandassets │ │ │ ├── App Icon - Large.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ └── gradient-fill-6-copy.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ └── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── vector-smart-object.png │ │ │ │ │ └── Contents.json │ │ │ ├── App Icon - Small.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ └── gradient-fill-6-copy.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ └── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ └── vector-smart-object.png │ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── Top Shelf Image.imageset │ │ │ │ ├── AppleTV-TopShelf-1920x720.png │ │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ ├── AppleTV-Launch.png │ │ │ └── Contents.json │ ├── Info.plist │ ├── MBHudDemoTVAppDelegate.h │ ├── MBHudDemoTVAppDelegate.m │ ├── MBHudDemoTVViewController.h │ ├── MBHudDemoTVViewController.m │ └── main.m └── HudTests │ ├── HudTests.m │ └── Info.plist ├── Framework-Info.plist ├── Framework-tvOS-Info.plist ├── LICENSE ├── MBProgressHUD-Prefix.pch ├── MBProgressHUD.h ├── MBProgressHUD.m ├── MBProgressHUD.podspec ├── MBProgressHUD.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── MBProgressHUD Framework tvOS.xcscheme │ ├── MBProgressHUD Framework.xcscheme │ └── MBProgressHUD.xcscheme ├── MBProgressHUD.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Package.swift ├── README.mdown └── include ├── MBProgressHUD └── MBProgressHUD.h └── module.modulemap /.gitignore: -------------------------------------------------------------------------------- 1 | # xcode noise 2 | build/ 3 | *.pbxuser 4 | *.mode1v3 5 | *.mode2v3 6 | *.perspectivev3 7 | xcuserdata/ 8 | *.xccheckout 9 | 10 | # old skool 11 | .svn 12 | 13 | # osx noise 14 | .DS_Store 15 | profile 16 | 17 | # vim noise 18 | *~ 19 | *.swp 20 | 21 | # AppCode noise 22 | .idea/ 23 | 24 | # Ruby 25 | .ruby-version 26 | 27 | # Carthage 28 | Carthage/Build 29 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode11.2 3 | 4 | before_install: 5 | - env 6 | - locale 7 | - xcpretty --version 8 | - xcodebuild -version 9 | - xcodebuild -showsdks 10 | 11 | script: 12 | - set -o pipefail 13 | 14 | - xcodebuild clean build -workspace MBProgressHUD.xcworkspace -scheme HudDemo -sdk iphonesimulator -configuration Debug | xcpretty -c 15 | - xcodebuild clean build -workspace MBProgressHUD.xcworkspace -scheme HudDemoTV -sdk appletvsimulator -configuration Debug | xcpretty -c 16 | - 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 17 | 18 | after_success: 19 | - bash <(curl -s https://codecov.io/bash) 20 | -------------------------------------------------------------------------------- /CHANGELOG.mdown: -------------------------------------------------------------------------------- 1 | **Version 1.0.0** @ 14.07.16 2 | 3 | - Requires ARC and iOS 6+. 4 | - Includes a new default design for iOS 7+. 5 | - Deprecates certain helpers and exposes some more flexible API. 6 | - Removes KVO observing of local properties. 7 | - Migrates layout code to Auto Layout. 8 | - Includes a rewritten demo app. 9 | - Includes a rewritten iOS example app. 10 | - Updates and extends documentation. 11 | - Adds a new button property (cancellation support). 12 | - Adds support for `NSProgress` 13 | - Adds a new customizable background view class. 14 | - Adds new assertions. 15 | - Adds basic unit tests. 16 | - Adds support for motion effects. 17 | - Adds nullability. 18 | - Adds basic interface builder support. 19 | - Adds tvOS support. 20 | - Adds a simple tvOS example app. 21 | - Improves behavior when showing and hiding in quick succession. 22 | - Improves support for `UIAppearance `. 23 | - Various smaller bug-fixes 24 | 25 | **Version 0.9.2** @ 22.12.15 26 | 27 | - Timer improvements 28 | - Additional assertions 29 | - Added a framework target 30 | - Tint progress tint color enhancements 31 | 32 | **Version 0.9.1** @ 06.03.15 33 | 34 | - Bug-fixes 35 | - Modernization 36 | 37 | **Version 0.9** @ 12.08.14 38 | 39 | - iOS 8 compatibility and some bug fixes. 40 | - Additional iOS 7 / iOS 8 styling enhancements. 41 | - Improved 64bit support. 42 | - Demo modernization. 43 | 44 | **Version 0.8** @ 19.09.13 45 | 46 | - iOS 7 compatibility and some bug fixes. 47 | 48 | **Version 0.7** @ 25.06.13 49 | 50 | - Added horizontal bar mode. ([jjxtra](https://github.com/jjxtra)). 51 | - CI integration. 52 | 53 | **Version 0.6** @ 13.03.13 54 | 55 | - Full cocoapods support. 56 | - Static library integration option. 57 | - Improved blocks support. 58 | - Bezel color. 59 | - Demo app fixes (iOS 6). 60 | - Various bug-fixes and enhancements. 61 | 62 | **Version 0.5** @ 22.03.12 63 | 64 | - Major source code modernization and cleanup (KVO, layout code, instance vars, etc.). 65 | - New annular determinate mode. 66 | - New text only mode. 67 | - Added a static library project and Xcode 4 workspace. 68 | - Added methods to find and return HUD(s) on a view. 69 | - Various bug fixes. 70 | - Various demo project enhancements (hi-res rescues, new samples). 71 | 72 | IMPORTANT: Requires LLVM 3+. 73 | 74 | **Version 0.41** @ 03.01.12 75 | 76 | - Support for ARC. 77 | 78 | **Version 0.4** @ 25.07.10 79 | 80 | - Different animation modes. Default set to zoom. 81 | - Class convenience methods ([tadelv](http://github.com/tadelv)). 82 | - Autorotation when added to a UIWindow ([wuf810](http://github.com/wuf810)). 83 | - Extended demo app. 84 | - Several smaller fixes. 85 | 86 | **Version 0.33** @ 27.03.10 87 | 88 | - Custom view operation mode added. 89 | - Fixed a memory leak. 90 | 91 | **Version 0.32** @ 4.01.10 92 | 93 | - Added minShowTime, graceTime, xOffset, yOffset. 94 | - Various fixes. 95 | 96 | **Version 0.31** @ 8.10.09 97 | 98 | - Fix for touch through during the fade-out animation. 99 | 100 | **Version 0.3** @ 30.9.09 101 | 102 | - Added show: and hide: methods. 103 | - Now using UIViews layoutSubviews to automate layout calls. 104 | - Added some floors to round pixel positions and thereby prevent unsharp views. 105 | - Some additional documentation and code cleanup. 106 | 107 | **Version 0.2** @ 21.7.09 108 | 109 | - Added determinate progress mode and switching capabilities between determinate and indeterminate modes. 110 | - Various bug-fixes. 111 | 112 | **Version 0.11** @ 2.6.09. 113 | 114 | - Updated labelText and detailsLabelText properties to support text modifications while the HUD is being shown. 115 | 116 | **Version 0.1** @ 2.4.09 117 | 118 | - Initial release. 119 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please take a moment to review this document in order to make the contribution 2 | process easy and effective for everyone involved. 3 | 4 | 5 | # Using the issue tracker 6 | 7 | The issue tracker is the preferred channel for [bug reports](#bugs) and 8 | [features requests](#features), but please respect the following restriction: 9 | 10 | * Please **do not** use the issue tracker for personal support requests (use 11 | a service like [Stack Overflow](http://stackoverflow.com) instead). 12 | 13 | 14 | ## Bug reports 15 | 16 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 17 | Good bug reports are extremely helpful - thank you! 18 | 19 | Guidelines for bug reports: 20 | 21 | 1. **Use the GitHub issue search** — check if the issue has already been 22 | reported. 23 | 24 | 2. **Check if the issue has been fixed** — try to reproduce it using the 25 | latest `master` branch in the repository. 26 | 27 | 3. **Isolate the problem** — provide exact reproduction steps, preferably 28 | in the form of a failing test case or by providing modification steps in the 29 | `MBProgressHUD` Demo application. 30 | 31 | A good bug report shouldn't leave others needing to chase you up for more 32 | information. Please try to be as detailed as possible in your report. What is 33 | your environment? What steps will reproduce the issue? What iOS version did 34 | you use? What would you expect to be the outcome? 35 | 36 | 37 | 38 | ## Feature requests 39 | 40 | Feature requests are welcome. But take a moment to find out whether your idea 41 | fits with the scope and aims of the project. It's up to *you* to make a strong 42 | case to convince the project's developers of the merits of this feature. Please 43 | provide as much detail and context as possible. 44 | 45 | 46 | 47 | # Pull requests 48 | 49 | Good pull requests - patches, improvements, new features - are a fantastic 50 | help. They should remain focused in scope and avoid containing unrelated 51 | commits. 52 | 53 | **Please ask first** before embarking on any significant pull request (e.g. 54 | implementing features, refactoring code, porting to a different language), 55 | otherwise you risk spending a lot of time working on something that the 56 | project's developers might not want to merge into the project. 57 | 58 | Please adhere to the coding conventions used throughout a project (indentation, 59 | accurate comments, etc.) and any other requirements (such as test coverage). 60 | 61 | **IMPORTANT**: By submitting a patch, you agree to allow the project owner to 62 | license your work under the same license as that used by the project. 63 | 64 | This document is based on https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md. 65 | -------------------------------------------------------------------------------- /Demo/HudDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 11 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 12 | 5BE141EE1CD8C33D0023BC9E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BE141ED1CD8C33D0023BC9E /* QuartzCore.framework */; }; 13 | D22F7D810F85241C00550BB3 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* MBProgressHUD.m */; }; 14 | D274948B1D3B74AA00ABEB66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D274948A1D3B74AA00ABEB66 /* Images.xcassets */; }; 15 | D27F18451D3B5878009D7482 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F18441D3B5878009D7482 /* main.m */; }; 16 | D27F18481D3B5878009D7482 /* MBHudDemoTVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F18471D3B5878009D7482 /* MBHudDemoTVAppDelegate.m */; }; 17 | D27F184B1D3B5878009D7482 /* MBHudDemoTVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F184A1D3B5878009D7482 /* MBHudDemoTVViewController.m */; }; 18 | D27F184E1D3B5878009D7482 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D27F184C1D3B5878009D7482 /* Main.storyboard */; }; 19 | D27F18551D3B5AAF009D7482 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D22F7D800F85241C00550BB3 /* MBProgressHUD.m */; }; 20 | D27F185A1D3B5DFF009D7482 /* MBHudDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F18581D3B5DFF009D7482 /* MBHudDemoAppDelegate.m */; }; 21 | D27F185B1D3B5DFF009D7482 /* MBHudDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F18591D3B5DFF009D7482 /* MBHudDemoViewController.m */; }; 22 | D27F185E1D3B5E0D009D7482 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D27F185D1D3B5E0D009D7482 /* main.m */; }; 23 | D27F18631D3B5E21009D7482 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D27F185F1D3B5E21009D7482 /* Launch.storyboard */; }; 24 | D27F18641D3B5E21009D7482 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D27F18611D3B5E21009D7482 /* Main.storyboard */; }; 25 | D286A76D1518CA9F00E13FB8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */; }; 26 | D2B174121C5E3A3D00021915 /* HudTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B174111C5E3A3D00021915 /* HudTests.m */; }; 27 | D2D75D5323A8193100485497 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D2D75D5123A8193000485497 /* Launch.storyboard */; }; 28 | D2EEB3811B55967200F59EC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2EEB3801B55967200F59EC1 /* Images.xcassets */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | D2B174141C5E3A3D00021915 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 1D6058900D05DD3D006BFB54; 37 | remoteInfo = HudDemo; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 43 | 1D6058910D05DD3D006BFB54 /* HudDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HudDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 45 | 5BE141ED1CD8C33D0023BC9E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 46 | D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBProgressHUD.h; path = ../MBProgressHUD.h; sourceTree = SOURCE_ROOT; }; 47 | D22F7D800F85241C00550BB3 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBProgressHUD.m; path = ../MBProgressHUD.m; sourceTree = ""; }; 48 | D274948A1D3B74AA00ABEB66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 49 | D27F18411D3B5878009D7482 /* HudDemoTV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HudDemoTV.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | D27F18441D3B5878009D7482 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | D27F18461D3B5878009D7482 /* MBHudDemoTVAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBHudDemoTVAppDelegate.h; sourceTree = ""; }; 52 | D27F18471D3B5878009D7482 /* MBHudDemoTVAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBHudDemoTVAppDelegate.m; sourceTree = ""; }; 53 | D27F18491D3B5878009D7482 /* MBHudDemoTVViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBHudDemoTVViewController.h; sourceTree = ""; }; 54 | D27F184A1D3B5878009D7482 /* MBHudDemoTVViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBHudDemoTVViewController.m; sourceTree = ""; }; 55 | D27F184D1D3B5878009D7482 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | D27F18511D3B5878009D7482 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | D27F18561D3B5DFF009D7482 /* MBHudDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBHudDemoAppDelegate.h; path = HudDemo/MBHudDemoAppDelegate.h; sourceTree = SOURCE_ROOT; }; 58 | D27F18571D3B5DFF009D7482 /* MBHudDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MBHudDemoViewController.h; path = HudDemo/MBHudDemoViewController.h; sourceTree = SOURCE_ROOT; }; 59 | D27F18581D3B5DFF009D7482 /* MBHudDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBHudDemoAppDelegate.m; path = HudDemo/MBHudDemoAppDelegate.m; sourceTree = SOURCE_ROOT; }; 60 | D27F18591D3B5DFF009D7482 /* MBHudDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MBHudDemoViewController.m; path = HudDemo/MBHudDemoViewController.m; sourceTree = SOURCE_ROOT; }; 61 | D27F185C1D3B5E0D009D7482 /* HudDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HudDemo_Prefix.pch; path = HudDemo/HudDemo_Prefix.pch; sourceTree = ""; }; 62 | D27F185D1D3B5E0D009D7482 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HudDemo/main.m; sourceTree = ""; }; 63 | D27F18601D3B5E21009D7482 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = HudDemo/en.lproj/Launch.storyboard; sourceTree = ""; }; 64 | D27F18621D3B5E21009D7482 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = HudDemo/en.lproj/Main.storyboard; sourceTree = ""; }; 65 | D27F18651D3B5E2D009D7482 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HudDemo/Info.plist; sourceTree = ""; }; 66 | D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 67 | D2B1269B23CB8D9C00A01F4C /* HudDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HudDemo.entitlements; sourceTree = ""; }; 68 | D2B1740F1C5E3A3D00021915 /* HudTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HudTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | D2B174111C5E3A3D00021915 /* HudTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HudTests.m; sourceTree = ""; }; 70 | D2B174131C5E3A3D00021915 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | D2D75D5223A8193000485497 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Launch.storyboard; sourceTree = ""; }; 72 | D2EEB3801B55967200F59EC1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HudDemo/Images.xcassets; sourceTree = SOURCE_ROOT; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | 5BE141EE1CD8C33D0023BC9E /* QuartzCore.framework in Frameworks */, 81 | D286A76D1518CA9F00E13FB8 /* CoreGraphics.framework in Frameworks */, 82 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 83 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | D27F183E1D3B5878009D7482 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | D2B1740C1C5E3A3D00021915 /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 080E96DDFE201D6D7F000001 /* HudDemo */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | D2B1269B23CB8D9C00A01F4C /* HudDemo.entitlements */, 108 | D27F18561D3B5DFF009D7482 /* MBHudDemoAppDelegate.h */, 109 | D27F18571D3B5DFF009D7482 /* MBHudDemoViewController.h */, 110 | D27F18581D3B5DFF009D7482 /* MBHudDemoAppDelegate.m */, 111 | D27F18591D3B5DFF009D7482 /* MBHudDemoViewController.m */, 112 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 113 | 29B97317FDCFA39411CA2CEA /* Resources */, 114 | ); 115 | path = HudDemo; 116 | sourceTree = ""; 117 | }; 118 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 1D6058910D05DD3D006BFB54 /* HudDemo.app */, 122 | D2B1740F1C5E3A3D00021915 /* HudTests.xctest */, 123 | D27F18411D3B5878009D7482 /* HudDemoTV.app */, 124 | ); 125 | name = Products; 126 | sourceTree = ""; 127 | }; 128 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 080E96DDFE201D6D7F000001 /* HudDemo */, 132 | D27F18421D3B5878009D7482 /* HudDemoTV */, 133 | D2B174101C5E3A3D00021915 /* HudTests */, 134 | D28CBB391A87A6B00052DCEC /* MBProgressHUD */, 135 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 136 | 19C28FACFE9D520D11CA2CBB /* Products */, 137 | ); 138 | name = CustomTemplate; 139 | sourceTree = ""; 140 | }; 141 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | D27F185C1D3B5E0D009D7482 /* HudDemo_Prefix.pch */, 145 | D27F185D1D3B5E0D009D7482 /* main.m */, 146 | ); 147 | name = "Other Sources"; 148 | path = ..; 149 | sourceTree = ""; 150 | }; 151 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | D27F18651D3B5E2D009D7482 /* Info.plist */, 155 | D277FDBF11FC880100304321 /* UI */, 156 | D2EEB3801B55967200F59EC1 /* Images.xcassets */, 157 | ); 158 | name = Resources; 159 | path = ..; 160 | sourceTree = ""; 161 | }; 162 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 5BE141ED1CD8C33D0023BC9E /* QuartzCore.framework */, 166 | D286A76C1518CA9F00E13FB8 /* CoreGraphics.framework */, 167 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 168 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 169 | ); 170 | name = Frameworks; 171 | sourceTree = ""; 172 | }; 173 | D277FDBF11FC880100304321 /* UI */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | D27F185F1D3B5E21009D7482 /* Launch.storyboard */, 177 | D27F18611D3B5E21009D7482 /* Main.storyboard */, 178 | ); 179 | name = UI; 180 | sourceTree = ""; 181 | }; 182 | D27F18421D3B5878009D7482 /* HudDemoTV */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | D27F18461D3B5878009D7482 /* MBHudDemoTVAppDelegate.h */, 186 | D27F18471D3B5878009D7482 /* MBHudDemoTVAppDelegate.m */, 187 | D27F18491D3B5878009D7482 /* MBHudDemoTVViewController.h */, 188 | D27F184A1D3B5878009D7482 /* MBHudDemoTVViewController.m */, 189 | D27F18431D3B5878009D7482 /* Other Sources */, 190 | D27F18671D3B5E43009D7482 /* Resources */, 191 | ); 192 | path = HudDemoTV; 193 | sourceTree = ""; 194 | }; 195 | D27F18431D3B5878009D7482 /* Other Sources */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | D27F18441D3B5878009D7482 /* main.m */, 199 | ); 200 | name = "Other Sources"; 201 | sourceTree = ""; 202 | }; 203 | D27F18671D3B5E43009D7482 /* Resources */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | D2D75D5123A8193000485497 /* Launch.storyboard */, 207 | D27F184C1D3B5878009D7482 /* Main.storyboard */, 208 | D27F18511D3B5878009D7482 /* Info.plist */, 209 | D274948A1D3B74AA00ABEB66 /* Images.xcassets */, 210 | ); 211 | name = Resources; 212 | sourceTree = ""; 213 | }; 214 | D28CBB391A87A6B00052DCEC /* MBProgressHUD */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | D22F7D7F0F85241C00550BB3 /* MBProgressHUD.h */, 218 | D22F7D800F85241C00550BB3 /* MBProgressHUD.m */, 219 | ); 220 | name = MBProgressHUD; 221 | sourceTree = ""; 222 | }; 223 | D2B174101C5E3A3D00021915 /* HudTests */ = { 224 | isa = PBXGroup; 225 | children = ( 226 | D2B174111C5E3A3D00021915 /* HudTests.m */, 227 | D2B174131C5E3A3D00021915 /* Info.plist */, 228 | ); 229 | path = HudTests; 230 | sourceTree = ""; 231 | }; 232 | /* End PBXGroup section */ 233 | 234 | /* Begin PBXNativeTarget section */ 235 | 1D6058900D05DD3D006BFB54 /* HudDemo */ = { 236 | isa = PBXNativeTarget; 237 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HudDemo" */; 238 | buildPhases = ( 239 | 1D60588D0D05DD3D006BFB54 /* Resources */, 240 | 1D60588E0D05DD3D006BFB54 /* Sources */, 241 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 242 | ); 243 | buildRules = ( 244 | ); 245 | dependencies = ( 246 | ); 247 | name = HudDemo; 248 | productName = HudDemo; 249 | productReference = 1D6058910D05DD3D006BFB54 /* HudDemo.app */; 250 | productType = "com.apple.product-type.application"; 251 | }; 252 | D27F18401D3B5878009D7482 /* HudDemoTV */ = { 253 | isa = PBXNativeTarget; 254 | buildConfigurationList = D27F18541D3B5878009D7482 /* Build configuration list for PBXNativeTarget "HudDemoTV" */; 255 | buildPhases = ( 256 | D27F183D1D3B5878009D7482 /* Sources */, 257 | D27F183E1D3B5878009D7482 /* Frameworks */, 258 | D27F183F1D3B5878009D7482 /* Resources */, 259 | ); 260 | buildRules = ( 261 | ); 262 | dependencies = ( 263 | ); 264 | name = HudDemoTV; 265 | productName = HudDemoTV; 266 | productReference = D27F18411D3B5878009D7482 /* HudDemoTV.app */; 267 | productType = "com.apple.product-type.application"; 268 | }; 269 | D2B1740E1C5E3A3D00021915 /* HudTests */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = D2B174161C5E3A3D00021915 /* Build configuration list for PBXNativeTarget "HudTests" */; 272 | buildPhases = ( 273 | D2B1740B1C5E3A3D00021915 /* Sources */, 274 | D2B1740C1C5E3A3D00021915 /* Frameworks */, 275 | D2B1740D1C5E3A3D00021915 /* Resources */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | D2B174151C5E3A3D00021915 /* PBXTargetDependency */, 281 | ); 282 | name = HudTests; 283 | productName = HudTests; 284 | productReference = D2B1740F1C5E3A3D00021915 /* HudTests.xctest */; 285 | productType = "com.apple.product-type.bundle.unit-test"; 286 | }; 287 | /* End PBXNativeTarget section */ 288 | 289 | /* Begin PBXProject section */ 290 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 291 | isa = PBXProject; 292 | attributes = { 293 | CLASSPREFIX = MB; 294 | LastUpgradeCheck = 0930; 295 | ORGANIZATIONNAME = "Matej Bukovinski"; 296 | TargetAttributes = { 297 | D27F18401D3B5878009D7482 = { 298 | CreatedOnToolsVersion = 7.3.1; 299 | }; 300 | D2B1740E1C5E3A3D00021915 = { 301 | CreatedOnToolsVersion = 7.2; 302 | TestTargetID = 1D6058900D05DD3D006BFB54; 303 | }; 304 | }; 305 | }; 306 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */; 307 | compatibilityVersion = "Xcode 3.2"; 308 | developmentRegion = en; 309 | hasScannedForEncodings = 1; 310 | knownRegions = ( 311 | en, 312 | Base, 313 | ); 314 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 315 | projectDirPath = ""; 316 | projectRoot = ""; 317 | targets = ( 318 | 1D6058900D05DD3D006BFB54 /* HudDemo */, 319 | D27F18401D3B5878009D7482 /* HudDemoTV */, 320 | D2B1740E1C5E3A3D00021915 /* HudTests */, 321 | ); 322 | }; 323 | /* End PBXProject section */ 324 | 325 | /* Begin PBXResourcesBuildPhase section */ 326 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 327 | isa = PBXResourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | D27F18641D3B5E21009D7482 /* Main.storyboard in Resources */, 331 | D2EEB3811B55967200F59EC1 /* Images.xcassets in Resources */, 332 | D27F18631D3B5E21009D7482 /* Launch.storyboard in Resources */, 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | D27F183F1D3B5878009D7482 /* Resources */ = { 337 | isa = PBXResourcesBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | D27F184E1D3B5878009D7482 /* Main.storyboard in Resources */, 341 | D274948B1D3B74AA00ABEB66 /* Images.xcassets in Resources */, 342 | D2D75D5323A8193100485497 /* Launch.storyboard in Resources */, 343 | ); 344 | runOnlyForDeploymentPostprocessing = 0; 345 | }; 346 | D2B1740D1C5E3A3D00021915 /* Resources */ = { 347 | isa = PBXResourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | /* End PBXResourcesBuildPhase section */ 354 | 355 | /* Begin PBXSourcesBuildPhase section */ 356 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 357 | isa = PBXSourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | D27F185B1D3B5DFF009D7482 /* MBHudDemoViewController.m in Sources */, 361 | D22F7D810F85241C00550BB3 /* MBProgressHUD.m in Sources */, 362 | D27F185E1D3B5E0D009D7482 /* main.m in Sources */, 363 | D27F185A1D3B5DFF009D7482 /* MBHudDemoAppDelegate.m in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | D27F183D1D3B5878009D7482 /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | D27F184B1D3B5878009D7482 /* MBHudDemoTVViewController.m in Sources */, 372 | D27F18481D3B5878009D7482 /* MBHudDemoTVAppDelegate.m in Sources */, 373 | D27F18451D3B5878009D7482 /* main.m in Sources */, 374 | D27F18551D3B5AAF009D7482 /* MBProgressHUD.m in Sources */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | D2B1740B1C5E3A3D00021915 /* Sources */ = { 379 | isa = PBXSourcesBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | D2B174121C5E3A3D00021915 /* HudTests.m in Sources */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | /* End PBXSourcesBuildPhase section */ 387 | 388 | /* Begin PBXTargetDependency section */ 389 | D2B174151C5E3A3D00021915 /* PBXTargetDependency */ = { 390 | isa = PBXTargetDependency; 391 | target = 1D6058900D05DD3D006BFB54 /* HudDemo */; 392 | targetProxy = D2B174141C5E3A3D00021915 /* PBXContainerItemProxy */; 393 | }; 394 | /* End PBXTargetDependency section */ 395 | 396 | /* Begin PBXVariantGroup section */ 397 | D27F184C1D3B5878009D7482 /* Main.storyboard */ = { 398 | isa = PBXVariantGroup; 399 | children = ( 400 | D27F184D1D3B5878009D7482 /* Base */, 401 | ); 402 | name = Main.storyboard; 403 | sourceTree = ""; 404 | }; 405 | D27F185F1D3B5E21009D7482 /* Launch.storyboard */ = { 406 | isa = PBXVariantGroup; 407 | children = ( 408 | D27F18601D3B5E21009D7482 /* en */, 409 | ); 410 | name = Launch.storyboard; 411 | sourceTree = ""; 412 | }; 413 | D27F18611D3B5E21009D7482 /* Main.storyboard */ = { 414 | isa = PBXVariantGroup; 415 | children = ( 416 | D27F18621D3B5E21009D7482 /* en */, 417 | ); 418 | name = Main.storyboard; 419 | sourceTree = ""; 420 | }; 421 | D2D75D5123A8193000485497 /* Launch.storyboard */ = { 422 | isa = PBXVariantGroup; 423 | children = ( 424 | D2D75D5223A8193000485497 /* Base */, 425 | ); 426 | name = Launch.storyboard; 427 | sourceTree = ""; 428 | }; 429 | /* End PBXVariantGroup section */ 430 | 431 | /* Begin XCBuildConfiguration section */ 432 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | CODE_SIGN_ENTITLEMENTS = HudDemo/HudDemo.entitlements; 438 | COPY_PHASE_STRIP = NO; 439 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 440 | GCC_DYNAMIC_NO_PIC = NO; 441 | GCC_OPTIMIZATION_LEVEL = 0; 442 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 443 | GCC_PREFIX_HEADER = HudDemo/HudDemo_Prefix.pch; 444 | INFOPLIST_FILE = HudDemo/Info.plist; 445 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 446 | PRODUCT_BUNDLE_IDENTIFIER = "com.bukovinski.${PRODUCT_NAME:identifier}"; 447 | PRODUCT_NAME = HudDemo; 448 | SUPPORTS_MACCATALYST = YES; 449 | TARGETED_DEVICE_FAMILY = "1,2"; 450 | }; 451 | name = Debug; 452 | }; 453 | 1D6058950D05DD3E006BFB54 /* Release */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | ALWAYS_SEARCH_USER_PATHS = NO; 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 458 | CODE_SIGN_ENTITLEMENTS = HudDemo/HudDemo.entitlements; 459 | COPY_PHASE_STRIP = YES; 460 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 461 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 462 | GCC_PREFIX_HEADER = HudDemo/HudDemo_Prefix.pch; 463 | INFOPLIST_FILE = HudDemo/Info.plist; 464 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 465 | PRODUCT_BUNDLE_IDENTIFIER = "com.bukovinski.${PRODUCT_NAME:identifier}"; 466 | PRODUCT_NAME = HudDemo; 467 | SDKROOT = iphoneos; 468 | SUPPORTS_MACCATALYST = YES; 469 | TARGETED_DEVICE_FAMILY = "1,2"; 470 | }; 471 | name = Release; 472 | }; 473 | C01FCF4F08A954540054247B /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 477 | CLANG_ENABLE_OBJC_ARC = YES; 478 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 479 | CLANG_WARN_BOOL_CONVERSION = YES; 480 | CLANG_WARN_COMMA = YES; 481 | CLANG_WARN_CONSTANT_CONVERSION = YES; 482 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 483 | CLANG_WARN_EMPTY_BODY = YES; 484 | CLANG_WARN_ENUM_CONVERSION = YES; 485 | CLANG_WARN_INFINITE_RECURSION = YES; 486 | CLANG_WARN_INT_CONVERSION = YES; 487 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 488 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 489 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 490 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 491 | CLANG_WARN_STRICT_PROTOTYPES = YES; 492 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 493 | CLANG_WARN_UNREACHABLE_CODE = YES; 494 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 495 | ENABLE_STRICT_OBJC_MSGSEND = YES; 496 | ENABLE_TESTABILITY = YES; 497 | GCC_C_LANGUAGE_STANDARD = c99; 498 | GCC_NO_COMMON_BLOCKS = YES; 499 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 500 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 501 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 502 | GCC_WARN_UNDECLARED_SELECTOR = YES; 503 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 504 | GCC_WARN_UNUSED_FUNCTION = YES; 505 | GCC_WARN_UNUSED_VARIABLE = YES; 506 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 507 | ONLY_ACTIVE_ARCH = YES; 508 | SDKROOT = iphoneos; 509 | }; 510 | name = Debug; 511 | }; 512 | C01FCF5008A954540054247B /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 516 | CLANG_ENABLE_OBJC_ARC = YES; 517 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 518 | CLANG_WARN_BOOL_CONVERSION = YES; 519 | CLANG_WARN_COMMA = YES; 520 | CLANG_WARN_CONSTANT_CONVERSION = YES; 521 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 522 | CLANG_WARN_EMPTY_BODY = YES; 523 | CLANG_WARN_ENUM_CONVERSION = YES; 524 | CLANG_WARN_INFINITE_RECURSION = YES; 525 | CLANG_WARN_INT_CONVERSION = YES; 526 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 527 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 528 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 529 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 530 | CLANG_WARN_STRICT_PROTOTYPES = YES; 531 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 532 | CLANG_WARN_UNREACHABLE_CODE = YES; 533 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 534 | ENABLE_STRICT_OBJC_MSGSEND = YES; 535 | GCC_C_LANGUAGE_STANDARD = c99; 536 | GCC_NO_COMMON_BLOCKS = YES; 537 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 538 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 539 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 540 | GCC_WARN_UNDECLARED_SELECTOR = YES; 541 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 542 | GCC_WARN_UNUSED_FUNCTION = YES; 543 | GCC_WARN_UNUSED_VARIABLE = YES; 544 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 545 | SDKROOT = iphoneos; 546 | }; 547 | name = Release; 548 | }; 549 | D27F18521D3B5878009D7482 /* Debug */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | ALWAYS_SEARCH_USER_PATHS = NO; 553 | CLANG_ANALYZER_NONNULL = YES; 554 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 555 | CLANG_CXX_LIBRARY = "libc++"; 556 | CLANG_ENABLE_MODULES = YES; 557 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 558 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 559 | CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; 560 | COPY_PHASE_STRIP = NO; 561 | DEBUG_INFORMATION_FORMAT = dwarf; 562 | GCC_C_LANGUAGE_STANDARD = gnu99; 563 | GCC_DYNAMIC_NO_PIC = NO; 564 | GCC_OPTIMIZATION_LEVEL = 0; 565 | GCC_PREPROCESSOR_DEFINITIONS = ( 566 | "DEBUG=1", 567 | "$(inherited)", 568 | ); 569 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 570 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 571 | INFOPLIST_FILE = HudDemoTV/Info.plist; 572 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 573 | MTL_ENABLE_DEBUG_INFO = YES; 574 | PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudDemoTV; 575 | PRODUCT_NAME = "$(TARGET_NAME)"; 576 | SDKROOT = appletvos; 577 | TARGETED_DEVICE_FAMILY = 3; 578 | TVOS_DEPLOYMENT_TARGET = 9.0; 579 | }; 580 | name = Debug; 581 | }; 582 | D27F18531D3B5878009D7482 /* Release */ = { 583 | isa = XCBuildConfiguration; 584 | buildSettings = { 585 | ALWAYS_SEARCH_USER_PATHS = NO; 586 | CLANG_ANALYZER_NONNULL = YES; 587 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 588 | CLANG_CXX_LIBRARY = "libc++"; 589 | CLANG_ENABLE_MODULES = YES; 590 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 591 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 592 | CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE; 593 | COPY_PHASE_STRIP = NO; 594 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 595 | ENABLE_NS_ASSERTIONS = NO; 596 | GCC_C_LANGUAGE_STANDARD = gnu99; 597 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 598 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 599 | INFOPLIST_FILE = HudDemoTV/Info.plist; 600 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 601 | MTL_ENABLE_DEBUG_INFO = NO; 602 | PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudDemoTV; 603 | PRODUCT_NAME = "$(TARGET_NAME)"; 604 | SDKROOT = appletvos; 605 | TARGETED_DEVICE_FAMILY = 3; 606 | TVOS_DEPLOYMENT_TARGET = 9.0; 607 | VALIDATE_PRODUCT = YES; 608 | }; 609 | name = Release; 610 | }; 611 | D2B174171C5E3A3D00021915 /* Debug */ = { 612 | isa = XCBuildConfiguration; 613 | buildSettings = { 614 | ALWAYS_SEARCH_USER_PATHS = NO; 615 | BUNDLE_LOADER = "$(TEST_HOST)"; 616 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 617 | CLANG_CXX_LIBRARY = "libc++"; 618 | CLANG_ENABLE_MODULES = YES; 619 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 620 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 621 | COPY_PHASE_STRIP = NO; 622 | DEBUG_INFORMATION_FORMAT = dwarf; 623 | GCC_C_LANGUAGE_STANDARD = gnu99; 624 | GCC_DYNAMIC_NO_PIC = NO; 625 | GCC_OPTIMIZATION_LEVEL = 0; 626 | GCC_PREPROCESSOR_DEFINITIONS = ( 627 | "DEBUG=1", 628 | "$(inherited)", 629 | ); 630 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 631 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 632 | INFOPLIST_FILE = HudTests/Info.plist; 633 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 634 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 635 | MTL_ENABLE_DEBUG_INFO = YES; 636 | PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudTests; 637 | PRODUCT_NAME = "$(TARGET_NAME)"; 638 | TARGETED_DEVICE_FAMILY = "1,2"; 639 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo"; 640 | }; 641 | name = Debug; 642 | }; 643 | D2B174181C5E3A3D00021915 /* Release */ = { 644 | isa = XCBuildConfiguration; 645 | buildSettings = { 646 | ALWAYS_SEARCH_USER_PATHS = NO; 647 | BUNDLE_LOADER = "$(TEST_HOST)"; 648 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 649 | CLANG_CXX_LIBRARY = "libc++"; 650 | CLANG_ENABLE_MODULES = YES; 651 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 652 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 653 | COPY_PHASE_STRIP = NO; 654 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 655 | ENABLE_NS_ASSERTIONS = NO; 656 | GCC_C_LANGUAGE_STANDARD = gnu99; 657 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 658 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 659 | INFOPLIST_FILE = HudTests/Info.plist; 660 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 661 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 662 | MTL_ENABLE_DEBUG_INFO = NO; 663 | PRODUCT_BUNDLE_IDENTIFIER = com.bukovinski.HudTests; 664 | PRODUCT_NAME = "$(TARGET_NAME)"; 665 | TARGETED_DEVICE_FAMILY = "1,2"; 666 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HudDemo.app/HudDemo"; 667 | VALIDATE_PRODUCT = YES; 668 | }; 669 | name = Release; 670 | }; 671 | /* End XCBuildConfiguration section */ 672 | 673 | /* Begin XCConfigurationList section */ 674 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HudDemo" */ = { 675 | isa = XCConfigurationList; 676 | buildConfigurations = ( 677 | 1D6058940D05DD3E006BFB54 /* Debug */, 678 | 1D6058950D05DD3E006BFB54 /* Release */, 679 | ); 680 | defaultConfigurationIsVisible = 0; 681 | defaultConfigurationName = Release; 682 | }; 683 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HudDemo" */ = { 684 | isa = XCConfigurationList; 685 | buildConfigurations = ( 686 | C01FCF4F08A954540054247B /* Debug */, 687 | C01FCF5008A954540054247B /* Release */, 688 | ); 689 | defaultConfigurationIsVisible = 0; 690 | defaultConfigurationName = Release; 691 | }; 692 | D27F18541D3B5878009D7482 /* Build configuration list for PBXNativeTarget "HudDemoTV" */ = { 693 | isa = XCConfigurationList; 694 | buildConfigurations = ( 695 | D27F18521D3B5878009D7482 /* Debug */, 696 | D27F18531D3B5878009D7482 /* Release */, 697 | ); 698 | defaultConfigurationIsVisible = 0; 699 | defaultConfigurationName = Release; 700 | }; 701 | D2B174161C5E3A3D00021915 /* Build configuration list for PBXNativeTarget "HudTests" */ = { 702 | isa = XCConfigurationList; 703 | buildConfigurations = ( 704 | D2B174171C5E3A3D00021915 /* Debug */, 705 | D2B174181C5E3A3D00021915 /* Release */, 706 | ); 707 | defaultConfigurationIsVisible = 0; 708 | defaultConfigurationName = Release; 709 | }; 710 | /* End XCConfigurationList section */ 711 | }; 712 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 713 | } 714 | -------------------------------------------------------------------------------- /Demo/HudDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Demo/HudDemo.xcodeproj/xcshareddata/xcschemes/HudDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 78 | 80 | 86 | 87 | 88 | 89 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Demo/HudDemo.xcodeproj/xcshareddata/xcschemes/HudDemoTV.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Demo/HudDemo.xcodeproj/xcshareddata/xcschemes/HudTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 21 | 22 | 23 | 24 | 26 | 32 | 33 | 34 | 35 | 36 | 46 | 48 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Demo/HudDemo/HudDemo.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/HudDemo/HudDemo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HudDemo' target in the 'HudDemo' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/AppStore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/AppStore.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-Small@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-Small@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-Small-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "Icon.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "Icon@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "Icon-60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "Icon-60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-20.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-41.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-Small-1.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-Small@2x-1.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-Small-40.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-Small-40@2x-1.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-Small-50.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "Icon-Small-50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "Icon-72.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "Icon-72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "Icon-76.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "Icon-76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "Icon-167.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "size" : "1024x1024", 149 | "idiom" : "ios-marketing", 150 | "filename" : "AppStore.png", 151 | "scale" : "1x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-167.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-41.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-72.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-1.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-50.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark@2x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemo/Images.xcassets/Checkmark.imageset/Checkmark@3x.png -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/Checkmark.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Checkmark.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Checkmark@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Checkmark@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Demo/HudDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIcons 12 | 13 | CFBundleIcons~ipad 14 | 15 | CFBundleIdentifier 16 | $(PRODUCT_BUNDLE_IDENTIFIER) 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | ${PRODUCT_NAME} 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.0 25 | CFBundleSignature 26 | ???? 27 | CFBundleVersion 28 | 1.0 29 | LSRequiresIPhoneOS 30 | 31 | UILaunchStoryboardName 32 | Launch 33 | UIMainStoryboardFile 34 | Main 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Demo/HudDemo/MBHudDemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoAppDelegate.h 3 | // HudDemo 4 | // 5 | // Created by Matej Bukovinski on 2.4.09. 6 | // Copyright © 2009-2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MBHudDemoAppDelegate : NSObject 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Demo/HudDemo/MBHudDemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoAppDelegate.m 3 | // HudDemo 4 | // 5 | // Created by Matej Bukovinski on 2.4.09. 6 | // Copyright © 2009-2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import "MBHudDemoAppDelegate.h" 10 | #import "MBHudDemoViewController.h" 11 | 12 | 13 | @implementation MBHudDemoAppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 16 | self.window.tintColor = [UIColor colorWithRed:.337f green:.57f blue:.731f alpha:1.f]; 17 | return YES; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Demo/HudDemo/MBHudDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HudDemoViewController.h 3 | // HudDemo 4 | // 5 | // Created by Matej Bukovinski on 30.9.09. 6 | // Copyright © 2009-2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface MBHudDemoViewController : UITableViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Demo/HudDemo/MBHudDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoViewController.m 3 | // HudDemo 4 | // 5 | // Created by Matej Bukovinski on 30.9.09. 6 | // Copyright © 2009-2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import "MBHudDemoViewController.h" 10 | #import "MBProgressHUD.h" 11 | #import 12 | 13 | @interface MBExample : NSObject 14 | 15 | @property (nonatomic, copy) NSString *title; 16 | @property (nonatomic, assign) SEL selector; 17 | 18 | @end 19 | 20 | 21 | @implementation MBExample 22 | 23 | + (instancetype)exampleWithTitle:(NSString *)title selector:(SEL)selector { 24 | MBExample *example = [[self class] new]; 25 | example.title = title; 26 | example.selector = selector; 27 | return example; 28 | } 29 | 30 | @end 31 | 32 | 33 | @interface MBHudDemoViewController () 34 | 35 | @property (nonatomic, strong) NSArray *> *examples; 36 | // Atomic, because it may be canceled from main thread, flag is read on a background thread 37 | @property (atomic, assign) BOOL canceled; 38 | 39 | @end 40 | 41 | 42 | @implementation MBHudDemoViewController 43 | 44 | #pragma mark - Lifecycle 45 | 46 | - (void)awakeFromNib { 47 | [super awakeFromNib]; 48 | self.examples = 49 | @[@[[MBExample exampleWithTitle:@"Indeterminate mode" selector:@selector(indeterminateExample)], 50 | [MBExample exampleWithTitle:@"With label" selector:@selector(labelExample)], 51 | [MBExample exampleWithTitle:@"With details label" selector:@selector(detailsLabelExample)]], 52 | @[[MBExample exampleWithTitle:@"Determinate mode" selector:@selector(determinateExample)], 53 | [MBExample exampleWithTitle:@"Annular determinate mode" selector:@selector(annularDeterminateExample)], 54 | [MBExample exampleWithTitle:@"Bar determinate mode" selector:@selector(barDeterminateExample)]], 55 | @[[MBExample exampleWithTitle:@"Text only" selector:@selector(textExample)], 56 | [MBExample exampleWithTitle:@"Custom view" selector:@selector(customViewExample)], 57 | [MBExample exampleWithTitle:@"With action button" selector:@selector(cancelationExample)], 58 | [MBExample exampleWithTitle:@"Mode switching" selector:@selector(modeSwitchingExample)]], 59 | @[[MBExample exampleWithTitle:@"On window" selector:@selector(windowExample)], 60 | [MBExample exampleWithTitle:@"NSURLSession" selector:@selector(networkingExample)], 61 | [MBExample exampleWithTitle:@"Determinate with NSProgress" selector:@selector(determinateNSProgressExample)], 62 | [MBExample exampleWithTitle:@"Dim background" selector:@selector(dimBackgroundExample)], 63 | [MBExample exampleWithTitle:@"Colored" selector:@selector(colorExample)]] 64 | ]; 65 | } 66 | 67 | #pragma mark - Examples 68 | 69 | - (void)indeterminateExample { 70 | // Show the HUD on the root view (self.view is a scrollable table view and thus not suitable, 71 | // as the HUD would move with the content as we scroll). 72 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 73 | 74 | // Fire off an asynchronous task, giving UIKit the opportunity to redraw wit the HUD added to the 75 | // view hierarchy. 76 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 77 | 78 | // Do something useful in the background 79 | [self doSomeWork]; 80 | 81 | // IMPORTANT - Dispatch back to the main thread. Always access UI 82 | // classes (including MBProgressHUD) on the main thread. 83 | dispatch_async(dispatch_get_main_queue(), ^{ 84 | [hud hideAnimated:YES]; 85 | }); 86 | }); 87 | } 88 | 89 | - (void)labelExample { 90 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 91 | 92 | // Set the label text. 93 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 94 | // You can also adjust other label properties if needed. 95 | // hud.label.font = [UIFont italicSystemFontOfSize:16.f]; 96 | 97 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 98 | [self doSomeWork]; 99 | dispatch_async(dispatch_get_main_queue(), ^{ 100 | [hud hideAnimated:YES]; 101 | }); 102 | }); 103 | } 104 | 105 | - (void)detailsLabelExample { 106 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 107 | 108 | // Set the label text. 109 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 110 | // Set the details label text. Let's make it multiline this time. 111 | hud.detailsLabel.text = NSLocalizedString(@"Parsing data\n(1/1)", @"HUD title"); 112 | 113 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 114 | [self doSomeWork]; 115 | dispatch_async(dispatch_get_main_queue(), ^{ 116 | [hud hideAnimated:YES]; 117 | }); 118 | }); 119 | } 120 | 121 | - (void)windowExample { 122 | // Covers the entire screen. Similar to using the root view controller view. 123 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view.window animated:YES]; 124 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 125 | [self doSomeWork]; 126 | dispatch_async(dispatch_get_main_queue(), ^{ 127 | [hud hideAnimated:YES]; 128 | }); 129 | }); 130 | } 131 | 132 | - (void)determinateExample { 133 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 134 | 135 | // Set the determinate mode to show task progress. 136 | hud.mode = MBProgressHUDModeDeterminate; 137 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 138 | 139 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 140 | // Do something useful in the background and update the HUD periodically. 141 | [self doSomeWorkWithProgress]; 142 | dispatch_async(dispatch_get_main_queue(), ^{ 143 | [hud hideAnimated:YES]; 144 | }); 145 | }); 146 | } 147 | 148 | - (void)determinateNSProgressExample { 149 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 150 | 151 | // Set the determinate mode to show task progress. 152 | hud.mode = MBProgressHUDModeDeterminate; 153 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 154 | 155 | // Set up NSProgress 156 | NSProgress *progressObject = [NSProgress progressWithTotalUnitCount:100]; 157 | hud.progressObject = progressObject; 158 | 159 | // Configure a cancel button. 160 | [hud.button setTitle:NSLocalizedString(@"Cancel", @"HUD cancel button title") forState:UIControlStateNormal]; 161 | [hud.button addTarget:progressObject action:@selector(cancel) forControlEvents:UIControlEventTouchUpInside]; 162 | 163 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 164 | // Do something useful in the background and update the HUD periodically. 165 | [self doSomeWorkWithProgressObject:progressObject]; 166 | dispatch_async(dispatch_get_main_queue(), ^{ 167 | [hud hideAnimated:YES]; 168 | }); 169 | }); 170 | } 171 | 172 | - (void)annularDeterminateExample { 173 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 174 | 175 | // Set the annular determinate mode to show task progress. 176 | hud.mode = MBProgressHUDModeAnnularDeterminate; 177 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 178 | 179 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 180 | // Do something useful in the background and update the HUD periodically. 181 | [self doSomeWorkWithProgress]; 182 | dispatch_async(dispatch_get_main_queue(), ^{ 183 | [hud hideAnimated:YES]; 184 | }); 185 | }); 186 | } 187 | 188 | - (void)barDeterminateExample { 189 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 190 | 191 | // Set the bar determinate mode to show task progress. 192 | hud.mode = MBProgressHUDModeDeterminateHorizontalBar; 193 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 194 | 195 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 196 | // Do something useful in the background and update the HUD periodically. 197 | [self doSomeWorkWithProgress]; 198 | dispatch_async(dispatch_get_main_queue(), ^{ 199 | [hud hideAnimated:YES]; 200 | }); 201 | }); 202 | } 203 | 204 | - (void)customViewExample { 205 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 206 | 207 | // Set the custom view mode to show any view. 208 | hud.mode = MBProgressHUDModeCustomView; 209 | // Set an image view with a checkmark. 210 | UIImage *image = [[UIImage imageNamed:@"Checkmark"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 211 | hud.customView = [[UIImageView alloc] initWithImage:image]; 212 | // Looks a bit nicer if we make it square. 213 | hud.square = YES; 214 | // Optional label text. 215 | hud.label.text = NSLocalizedString(@"Done", @"HUD done title"); 216 | 217 | [hud hideAnimated:YES afterDelay:3.f]; 218 | } 219 | 220 | - (void)textExample { 221 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 222 | 223 | // Set the text mode to show only text. 224 | hud.mode = MBProgressHUDModeText; 225 | hud.label.text = NSLocalizedString(@"Message here!", @"HUD message title"); 226 | // Move to bottm center. 227 | hud.offset = CGPointMake(0.f, MBProgressMaxOffset); 228 | 229 | [hud hideAnimated:YES afterDelay:3.f]; 230 | } 231 | 232 | - (void)cancelationExample { 233 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 234 | 235 | // Set the determinate mode to show task progress. 236 | hud.mode = MBProgressHUDModeDeterminate; 237 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 238 | 239 | // Configure the button. 240 | [hud.button setTitle:NSLocalizedString(@"Cancel", @"HUD cancel button title") forState:UIControlStateNormal]; 241 | [hud.button addTarget:self action:@selector(cancelWork:) forControlEvents:UIControlEventTouchUpInside]; 242 | 243 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 244 | // Do something useful in the background and update the HUD periodically. 245 | [self doSomeWorkWithProgress]; 246 | dispatch_async(dispatch_get_main_queue(), ^{ 247 | [hud hideAnimated:YES]; 248 | }); 249 | }); 250 | } 251 | 252 | - (void)modeSwitchingExample { 253 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 254 | 255 | // Set some text to show the initial status. 256 | hud.label.text = NSLocalizedString(@"Preparing...", @"HUD preparing title"); 257 | // Will look best, if we set a minimum size. 258 | hud.minSize = CGSizeMake(150.f, 100.f); 259 | 260 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 261 | // Do something useful in the background and update the HUD periodically. 262 | [self doSomeWorkWithMixedProgress:hud]; 263 | dispatch_async(dispatch_get_main_queue(), ^{ 264 | [hud hideAnimated:YES]; 265 | }); 266 | }); 267 | } 268 | 269 | - (void)networkingExample { 270 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 271 | 272 | // Set some text to show the initial status. 273 | hud.label.text = NSLocalizedString(@"Preparing...", @"HUD preparing title"); 274 | // Will look best, if we set a minimum size. 275 | hud.minSize = CGSizeMake(150.f, 100.f); 276 | 277 | [self doSomeNetworkWorkWithProgress]; 278 | } 279 | 280 | - (void)dimBackgroundExample { 281 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 282 | 283 | // Change the background view style and color. 284 | hud.backgroundView.style = MBProgressHUDBackgroundStyleSolidColor; 285 | hud.backgroundView.color = [UIColor colorWithWhite:0.f alpha:0.1f]; 286 | 287 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 288 | [self doSomeWork]; 289 | dispatch_async(dispatch_get_main_queue(), ^{ 290 | [hud hideAnimated:YES]; 291 | }); 292 | }); 293 | } 294 | 295 | - (void)colorExample { 296 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES]; 297 | hud.contentColor = [UIColor colorWithRed:0.f green:0.6f blue:0.7f alpha:1.f]; 298 | 299 | // Set the label text. 300 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 301 | 302 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 303 | [self doSomeWork]; 304 | dispatch_async(dispatch_get_main_queue(), ^{ 305 | [hud hideAnimated:YES]; 306 | }); 307 | }); 308 | } 309 | 310 | #pragma mark - Tasks 311 | 312 | - (void)doSomeWork { 313 | // Simulate by just waiting. 314 | sleep(3.); 315 | } 316 | 317 | - (void)doSomeWorkWithProgressObject:(NSProgress *)progressObject { 318 | // This just increases the progress indicator in a loop. 319 | while (progressObject.fractionCompleted < 1.0f) { 320 | if (progressObject.isCancelled) break; 321 | [progressObject becomeCurrentWithPendingUnitCount:1]; 322 | [progressObject resignCurrent]; 323 | usleep(50000); 324 | } 325 | } 326 | 327 | - (void)doSomeWorkWithProgress { 328 | self.canceled = NO; 329 | // This just increases the progress indicator in a loop. 330 | float progress = 0.0f; 331 | while (progress < 1.0f) { 332 | if (self.canceled) break; 333 | progress += 0.01f; 334 | dispatch_async(dispatch_get_main_queue(), ^{ 335 | // Instead we could have also passed a reference to the HUD 336 | // to the HUD to myProgressTask as a method parameter. 337 | [MBProgressHUD HUDForView:self.navigationController.view].progress = progress; 338 | }); 339 | usleep(50000); 340 | } 341 | } 342 | 343 | - (void)doSomeWorkWithMixedProgress:(MBProgressHUD *)hud { 344 | // Indeterminate mode 345 | sleep(2); 346 | // Switch to determinate mode 347 | dispatch_async(dispatch_get_main_queue(), ^{ 348 | hud.mode = MBProgressHUDModeDeterminate; 349 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 350 | }); 351 | float progress = 0.0f; 352 | while (progress < 1.0f) { 353 | progress += 0.01f; 354 | dispatch_async(dispatch_get_main_queue(), ^{ 355 | hud.progress = progress; 356 | }); 357 | usleep(50000); 358 | } 359 | // Back to indeterminate mode 360 | dispatch_async(dispatch_get_main_queue(), ^{ 361 | hud.mode = MBProgressHUDModeIndeterminate; 362 | hud.label.text = NSLocalizedString(@"Cleaning up...", @"HUD cleanining up title"); 363 | }); 364 | sleep(2); 365 | dispatch_sync(dispatch_get_main_queue(), ^{ 366 | UIImage *image = [[UIImage imageNamed:@"Checkmark"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 367 | UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 368 | hud.customView = imageView; 369 | hud.mode = MBProgressHUDModeCustomView; 370 | hud.label.text = NSLocalizedString(@"Completed", @"HUD completed title"); 371 | }); 372 | sleep(2); 373 | } 374 | 375 | - (void)doSomeNetworkWorkWithProgress { 376 | NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration]; 377 | NSURLSession *session = [NSURLSession sessionWithConfiguration:sessionConfig delegate:self delegateQueue:nil]; 378 | NSURL *URL = [NSURL URLWithString:@"https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1425/sample_iPod.m4v.zip"]; 379 | NSURLSessionDownloadTask *task = [session downloadTaskWithURL:URL]; 380 | [task resume]; 381 | } 382 | 383 | - (void)cancelWork:(id)sender { 384 | self.canceled = YES; 385 | } 386 | 387 | #pragma mark - UITableViewDelegate 388 | 389 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 390 | return self.examples.count; 391 | } 392 | 393 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 394 | return self.examples[section].count; 395 | } 396 | 397 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 398 | MBExample *example = self.examples[indexPath.section][indexPath.row]; 399 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MBExampleCell" forIndexPath:indexPath]; 400 | cell.textLabel.text = example.title; 401 | cell.textLabel.textColor = self.view.tintColor; 402 | cell.textLabel.textAlignment = NSTextAlignmentCenter; 403 | cell.selectedBackgroundView = [UIView new]; 404 | cell.selectedBackgroundView.backgroundColor = [cell.textLabel.textColor colorWithAlphaComponent:0.1f]; 405 | return cell; 406 | } 407 | 408 | #pragma mark - UITableViewDelegate 409 | 410 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 411 | MBExample *example = self.examples[indexPath.section][indexPath.row]; 412 | #pragma clang diagnostic push 413 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 414 | [self performSelector:example.selector]; 415 | #pragma clang diagnostic pop 416 | 417 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 418 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 419 | }); 420 | } 421 | 422 | #pragma mark - NSURLSessionDelegate 423 | 424 | - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location { 425 | // Do something with the data at location... 426 | 427 | // Update the UI on the main thread 428 | dispatch_async(dispatch_get_main_queue(), ^{ 429 | MBProgressHUD *hud = [MBProgressHUD HUDForView:self.navigationController.view]; 430 | UIImage *image = [[UIImage imageNamed:@"Checkmark"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 431 | UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 432 | hud.customView = imageView; 433 | hud.mode = MBProgressHUDModeCustomView; 434 | hud.label.text = NSLocalizedString(@"Completed", @"HUD completed title"); 435 | [hud hideAnimated:YES afterDelay:3.f]; 436 | }); 437 | } 438 | 439 | - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite { 440 | float progress = (float)totalBytesWritten / (float)totalBytesExpectedToWrite; 441 | 442 | // Update the UI on the main thread 443 | dispatch_async(dispatch_get_main_queue(), ^{ 444 | MBProgressHUD *hud = [MBProgressHUD HUDForView:self.navigationController.view]; 445 | hud.mode = MBProgressHUDModeDeterminate; 446 | hud.progress = progress; 447 | }); 448 | } 449 | 450 | @end 451 | -------------------------------------------------------------------------------- /Demo/HudDemo/en.lproj/Launch.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Demo/HudDemo/en.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Demo/HudDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HudDemo 4 | // 5 | // Created by Matej Bukovinski on 2.4.09. 6 | // Copyright bukovinski.com 2009-2016. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBHudDemoAppDelegate.h" 11 | 12 | int main(int argc, char *argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MBHudDemoAppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/Base.lproj/Launch.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "gradient-fill-6-copy.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/gradient-fill-6-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/gradient-fill-6-copy.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Back.imagestacklayer" 8 | } 9 | ], 10 | "info" : { 11 | "version" : 1, 12 | "author" : "xcode" 13 | } 14 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "vector-smart-object.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/vector-smart-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/vector-smart-object.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "gradient-fill-6-copy.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/gradient-fill-6-copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/gradient-fill-6-copy.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Back.imagestacklayer" 8 | } 9 | ], 10 | "info" : { 11 | "version" : 1, 12 | "author" : "xcode" 13 | } 14 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "vector-smart-object.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/vector-smart-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/vector-smart-object.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - Large.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon - Small.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "1920x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image.imageset", 19 | "role" : "top-shelf-image" 20 | } 21 | ], 22 | "info" : { 23 | "version" : 1, 24 | "author" : "xcode" 25 | } 26 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/Top Shelf Image.imageset/AppleTV-TopShelf-1920x720.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/Icons.brandassets/Top Shelf Image.imageset/AppleTV-TopShelf-1920x720.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/Icons.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "filename" : "AppleTV-TopShelf-1920x720.png", 6 | "scale" : "1x" 7 | } 8 | ], 9 | "info" : { 10 | "version" : 1, 11 | "author" : "xcode" 12 | } 13 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/LaunchImage.launchimage/AppleTV-Launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matej/MBProgressHUD/267eb57b28591456fbd7fb0199312eec2f636fb9/Demo/HudDemoTV/Images.xcassets/LaunchImage.launchimage/AppleTV-Launch.png -------------------------------------------------------------------------------- /Demo/HudDemoTV/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "filename" : "AppleTV-Launch.png", 7 | "extent" : "full-screen", 8 | "minimum-system-version" : "9.0", 9 | "scale" : "1x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Demo/HudDemoTV/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIcons 10 | 11 | CFBundleIcons~ipad 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | LSRequiresIPhoneOS 28 | 29 | UILaunchStoryboardName 30 | Launch 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | arm64 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/MBHudDemoTVAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoTV.h 3 | // HudDemoTV 4 | // 5 | // Created by Matej Bukovinski on 17. 07. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MBHudDemoTVAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/MBHudDemoTVAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoTV.m 3 | // HudDemoTV 4 | // 5 | // Created by Matej Bukovinski on 17. 07. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import "MBHudDemoTVAppDelegate.h" 10 | 11 | @implementation MBHudDemoTVAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 14 | return YES; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/MBHudDemoTVViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoTVViewController.h 3 | // HudDemoTV 4 | // 5 | // Created by Matej Bukovinski on 17. 07. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MBHudDemoTVViewController : UIViewController 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/MBHudDemoTVViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MBHudDemoTVViewController.m 3 | // HudDemoTV 4 | // 5 | // Created by Matej Bukovinski on 17. 07. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import "MBHudDemoTVViewController.h" 10 | #import "MBProgressHUD.h" 11 | 12 | @implementation MBHudDemoTVViewController 13 | 14 | - (IBAction)showHud:(UIButton *)sender { 15 | sender.enabled = NO; 16 | 17 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 18 | 19 | // Set the determinate mode to show task progress. 20 | hud.mode = MBProgressHUDModeDeterminate; 21 | hud.label.text = NSLocalizedString(@"Loading...", @"HUD loading title"); 22 | 23 | dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ 24 | // Do something useful in the background and update the HUD periodically. 25 | [self doSomeWorkWithProgress]; 26 | dispatch_async(dispatch_get_main_queue(), ^{ 27 | [hud hideAnimated:YES]; 28 | sender.enabled = YES; 29 | }); 30 | }); 31 | } 32 | 33 | - (void)doSomeWorkWithProgress { 34 | // This just increases the progress indicator in a loop. 35 | float progress = 0.0f; 36 | while (progress < 1.0f) { 37 | progress += 0.01f; 38 | dispatch_async(dispatch_get_main_queue(), ^{ 39 | // Instead we could have also passed a reference to the HUD 40 | // to the HUD to myProgressTask as a method parameter. 41 | [MBProgressHUD HUDForView:self.view].progress = progress; 42 | }); 43 | usleep(50000); 44 | } 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Demo/HudDemoTV/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HudDemoTV 4 | // 5 | // Created by Matej Bukovinski on 17. 07. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBHudDemoTVAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MBHudDemoTVAppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Demo/HudTests/HudTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HudTests.m 3 | // HudTests 4 | // 5 | // Created by Matej Bukovinski on 31. 01. 16. 6 | // Copyright © 2016 Matej Bukovinski. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MBProgressHUD.h" 11 | 12 | 13 | #define weakify(var) __weak typeof(var) weak_##var = var; 14 | 15 | #define strongify(var) \ 16 | _Pragma("clang diagnostic push") \ 17 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 18 | __strong typeof(var) var = weak_##var; \ 19 | _Pragma("clang diagnostic pop") 20 | 21 | #define MBTestHUDIsVisible(hud, rootView) \ 22 | do { \ 23 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); \ 24 | XCTAssertEqual(hud.alpha, 1.f, @"The HUD should be visible."); \ 25 | XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \ 26 | XCTAssertEqual(hud.bezelView.alpha, 1.f, @"The HUD should be visible."); \ 27 | } while (0) 28 | 29 | #define MBTestHUDIsHiden(hud, rootView) \ 30 | do { \ 31 | XCTAssertEqual(hud.alpha, 0.f, @"The hud should be faded out."); \ 32 | } while (0) 33 | 34 | #define MBTestHUDIsHidenAndRemoved(hud, rootView) \ 35 | do { \ 36 | XCTAssertFalse([rootView.subviews containsObject:hud], @"The HUD should not be part of the view hierarchy."); \ 37 | MBTestHUDIsHiden(hud, rootView); \ 38 | XCTAssertNil(hud.superview, @"The HUD should not have a superview."); \ 39 | } while (0) 40 | 41 | @interface HudTests : XCTestCase 42 | 43 | @property (nonatomic) XCTestExpectation *hideExpectation; 44 | @property (nonatomic, copy) dispatch_block_t hideChecks; 45 | 46 | @end 47 | 48 | 49 | @implementation HudTests 50 | 51 | #pragma mark - Initialization 52 | 53 | - (void)testInitializers { 54 | XCTAssertNotNil([[MBProgressHUD alloc] initWithView:[UIView new]]); 55 | UIView *nilView = nil; 56 | XCTAssertThrows([[MBProgressHUD alloc] initWithView:nilView]); 57 | XCTAssertNotNil([[MBProgressHUD alloc] initWithFrame:CGRectZero]); 58 | NSKeyedUnarchiver *dummyUnarchiver; 59 | #if !TARGET_OS_MACCATALYST 60 | if (@available(iOS 11.0, *)) { 61 | #endif 62 | dummyUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:[NSData data] error:nil]; 63 | #if !TARGET_OS_MACCATALYST 64 | } else { 65 | dummyUnarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:[NSData data]]; 66 | } 67 | #endif 68 | XCTAssertNotNil([[MBProgressHUD alloc] initWithCoder:dummyUnarchiver]); 69 | } 70 | 71 | #pragma mark - Convenience 72 | 73 | - (void)testNonAnimatedConvenienceHUDPresentation { 74 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 75 | UIView *rootView = rootViewController.view; 76 | 77 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:NO]; 78 | 79 | XCTAssertNotNil(hud, @"A HUD should be created."); 80 | MBTestHUDIsVisible(hud, rootView); 81 | 82 | XCTAssertEqual(hud.bezelView.alpha, 1.f, @"The HUD should be visible."); 83 | XCTAssertFalse([hud.bezelView.layer.animationKeys containsObject:@"opacity"], @"The opacity should NOT be animated."); 84 | 85 | XCTAssertEqualObjects([MBProgressHUD HUDForView:rootView], hud, @"The HUD should be found via the convenience operation."); 86 | 87 | XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed."); 88 | 89 | MBTestHUDIsHidenAndRemoved(hud, rootView); 90 | 91 | XCTAssertFalse([MBProgressHUD hideHUDForView:rootView animated:NO], @"A subsequent HUD hide operation should fail."); 92 | } 93 | 94 | - (void)testAnimatedConvenienceHUDPresentation { 95 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 96 | UIView *rootView = rootViewController.view; 97 | 98 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 99 | 100 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:YES]; 101 | hud.delegate = self; 102 | 103 | XCTAssertNotNil(hud, @"A HUD should be created."); 104 | MBTestHUDIsVisible(hud, rootView); 105 | 106 | XCTAssertEqual(hud.bezelView.alpha, 1.f, @"The HUD should be visible."); 107 | XCTAssertTrue([hud.bezelView.layer.animationKeys containsObject:@"opacity"], @"The opacity should be animated."); 108 | 109 | XCTAssertEqualObjects([MBProgressHUD HUDForView:rootView], hud, @"The HUD should be found via the convenience operation."); 110 | 111 | XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:YES], @"The HUD should be found and removed."); 112 | 113 | XCTAssertTrue([rootView.subviews containsObject:hud], @"The HUD should still be part of the view hierarchy."); 114 | XCTAssertEqual(hud.alpha, 1.f, @"The hud should still be visible."); 115 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); 116 | XCTAssertEqual(hud.bezelView.alpha, 0.f, @"The HUD bezel should be animated out."); 117 | XCTAssertTrue([hud.bezelView.layer.animationKeys containsObject:@"opacity"], @"The opacity should be animated."); 118 | 119 | weakify(self); 120 | self.hideChecks = ^{ 121 | strongify(self); 122 | MBTestHUDIsHidenAndRemoved(hud, rootView); 123 | 124 | XCTAssertFalse([MBProgressHUD hideHUDForView:rootView animated:YES], @"A subsequent HUD hide operation should fail."); 125 | }; 126 | 127 | [self waitForExpectationsWithTimeout:5. handler:nil]; 128 | } 129 | 130 | - (void)testCompletionBlock { 131 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 132 | UIView *rootView = rootViewController.view; 133 | 134 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 135 | XCTestExpectation *completionExpectation = [self expectationWithDescription:@"The completionBlock: should have been called."]; 136 | 137 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:YES]; 138 | hud.delegate = self; 139 | hud.completionBlock = ^{ 140 | [completionExpectation fulfill]; 141 | }; 142 | 143 | [hud hideAnimated:YES]; 144 | 145 | [self waitForExpectationsWithTimeout:5. handler:nil]; 146 | } 147 | 148 | #pragma mark - Modes 149 | 150 | - (void)testRoundDeterminate { 151 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 152 | UIView *rootView = rootViewController.view; 153 | 154 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 155 | hud.mode = MBProgressHUDModeDeterminate; 156 | [rootView addSubview:hud]; 157 | [hud showAnimated:NO]; 158 | 159 | MBTestHUDIsVisible(hud, rootView); 160 | XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBRoundProgressView class]]); 161 | 162 | XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed."); 163 | MBTestHUDIsHidenAndRemoved(hud, rootView); 164 | } 165 | 166 | - (void)testRoundAnnularDeterminate { 167 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 168 | UIView *rootView = rootViewController.view; 169 | 170 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 171 | hud.mode = MBProgressHUDModeAnnularDeterminate; 172 | [rootView addSubview:hud]; 173 | [hud showAnimated:NO]; 174 | 175 | MBTestHUDIsVisible(hud, rootView); 176 | XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBRoundProgressView class]]); 177 | 178 | XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed."); 179 | MBTestHUDIsHidenAndRemoved(hud, rootView); 180 | } 181 | 182 | - (void)testDeterminateHorizontalBar { 183 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 184 | UIView *rootView = rootViewController.view; 185 | 186 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 187 | hud.mode = MBProgressHUDModeDeterminateHorizontalBar; 188 | [rootView addSubview:hud]; 189 | [hud showAnimated:NO]; 190 | 191 | MBTestHUDIsVisible(hud, rootView); 192 | XCTAssertNotNil([self view:hud firstSubviewOfClass:[MBBarProgressView class]]); 193 | 194 | XCTAssertTrue([MBProgressHUD hideHUDForView:rootView animated:NO], @"The HUD should be found and removed."); 195 | MBTestHUDIsHidenAndRemoved(hud, rootView); 196 | 197 | } 198 | 199 | #pragma mark - Customization 200 | 201 | - (void)testEffectViewOrderAfterSettingBlurStyle { 202 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 203 | UIView *rootView = rootViewController.view; 204 | 205 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 206 | 207 | [hud.bezelView.subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { 208 | XCTAssert(![view isKindOfClass:UIVisualEffectView.class] || idx == 0, @"Just the first subview should be a visual effect view."); 209 | }]; 210 | 211 | hud.bezelView.blurEffectStyle = UIBlurEffectStyleDark; 212 | 213 | [hud.bezelView.subviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { 214 | XCTAssert(![view isKindOfClass:UIVisualEffectView.class] || idx == 0, @"Just the first subview should be a visual effect view even after changing the blurEffectStyle."); 215 | }]; 216 | } 217 | 218 | #pragma mark - Delay 219 | 220 | - (void)testDelayedHide { 221 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 222 | UIView *rootView = rootViewController.view; 223 | 224 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 225 | 226 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:NO]; 227 | hud.delegate = self; 228 | 229 | XCTAssertNotNil(hud, @"A HUD should be created."); 230 | 231 | [hud hideAnimated:NO afterDelay:2]; 232 | 233 | MBTestHUDIsVisible(hud, rootView); 234 | 235 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 236 | MBTestHUDIsVisible(hud, rootView); 237 | }); 238 | 239 | XCTestExpectation *hideCheckExpectation = [self expectationWithDescription:@"Hide check"]; 240 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 241 | // After the grace time passes, the HUD should still not be shown. 242 | MBTestHUDIsHidenAndRemoved(hud, rootView); 243 | [hideCheckExpectation fulfill]; 244 | }); 245 | 246 | [self waitForExpectationsWithTimeout:5. handler:nil]; 247 | 248 | MBTestHUDIsHidenAndRemoved(hud, rootView); 249 | } 250 | 251 | - (void)testDelayedHideDoesNotRace { 252 | // https://github.com/jdg/MBProgressHUD/issues/503 253 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 254 | UIView *rootView = rootViewController.view; 255 | 256 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 257 | [rootView addSubview:hud]; 258 | 259 | [hud showAnimated:YES]; 260 | [hud hideAnimated:YES afterDelay:0.3]; 261 | MBTestHUDIsVisible(hud, rootView); 262 | 263 | XCTestExpectation *hideCheckExpectation = [self expectationWithDescription:@"Hide check"]; 264 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ 265 | [hud showAnimated:YES]; 266 | [hud hideAnimated:YES afterDelay:0.3]; 267 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 268 | MBTestHUDIsHiden(hud, rootView); 269 | [hideCheckExpectation fulfill]; 270 | }); 271 | }); 272 | 273 | [self waitForExpectationsWithTimeout:5. handler:nil]; 274 | 275 | [hud removeFromSuperview]; 276 | MBTestHUDIsHidenAndRemoved(hud, rootView); 277 | } 278 | 279 | #pragma mark - Ruse 280 | 281 | - (void)testNonAnimatedHudReuse { 282 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 283 | UIView *rootView = rootViewController.view; 284 | 285 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 286 | [rootView addSubview:hud]; 287 | [hud showAnimated:NO]; 288 | 289 | XCTAssertNotNil(hud, @"A HUD should be created."); 290 | 291 | [hud hideAnimated:NO]; 292 | [hud showAnimated:NO]; 293 | 294 | MBTestHUDIsVisible(hud, rootView); 295 | 296 | [hud hideAnimated:NO]; 297 | [hud removeFromSuperview]; 298 | } 299 | 300 | - (void)testUnfinishedHidingAnimation { 301 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 302 | UIView *rootView = rootViewController.view; 303 | 304 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:rootView animated:NO]; 305 | 306 | [hud hideAnimated:YES]; 307 | 308 | // Cancel all animations. It will cause `UIView+animate...` to call completionBlock with `finished = NO`. 309 | // It's same as if you call `[hud hideAnimated:YES]` while the app is in background. 310 | [hud.bezelView.layer removeAllAnimations]; 311 | [hud.backgroundView.layer removeAllAnimations]; 312 | 313 | XCTestExpectation *hideCheckExpectation = [self expectationWithDescription:@"Hide check"]; 314 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 315 | // After the grace time passes, the HUD should still not be shown. 316 | MBTestHUDIsHidenAndRemoved(hud, rootView); 317 | [hideCheckExpectation fulfill]; 318 | }); 319 | 320 | [self waitForExpectationsWithTimeout:5. handler:nil]; 321 | 322 | MBTestHUDIsHidenAndRemoved(hud, rootView); 323 | } 324 | 325 | - (void)testAnimatedImmediateHudReuse { 326 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 327 | UIView *rootView = rootViewController.view; 328 | 329 | XCTestExpectation *hideExpectation = [self expectationWithDescription:@"The hud should have been hidden."]; 330 | 331 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 332 | [rootView addSubview:hud]; 333 | [hud showAnimated:YES]; 334 | 335 | XCTAssertNotNil(hud, @"A HUD should be created."); 336 | 337 | [hud hideAnimated:YES]; 338 | [hud showAnimated:YES]; 339 | 340 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 341 | MBTestHUDIsVisible(hud, rootView); 342 | 343 | [hud hideAnimated:NO]; 344 | [hud removeFromSuperview]; 345 | 346 | [hideExpectation fulfill]; 347 | }); 348 | 349 | [self waitForExpectationsWithTimeout:5. handler:nil]; 350 | } 351 | 352 | #pragma mark - Min show time 353 | 354 | - (void)testMinShowTime { 355 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 356 | UIView *rootView = rootViewController.view; 357 | 358 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 359 | 360 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 361 | hud.delegate = self; 362 | hud.removeFromSuperViewOnHide = YES; 363 | hud.minShowTime = 2.; 364 | [rootView addSubview:hud]; 365 | [hud showAnimated:YES]; 366 | 367 | XCTAssertNotNil(hud, @"A HUD should be created."); 368 | 369 | [hud hideAnimated:YES]; 370 | 371 | __block BOOL checkedAfterOneSecond = NO; 372 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 373 | // Check that the hud is still visible 374 | MBTestHUDIsVisible(hud, rootView); 375 | checkedAfterOneSecond = YES; 376 | }); 377 | 378 | weakify(self); 379 | self.hideChecks = ^{ 380 | strongify(self); 381 | XCTAssertTrue(checkedAfterOneSecond); 382 | }; 383 | 384 | [self waitForExpectationsWithTimeout:5. handler:nil]; 385 | 386 | MBTestHUDIsHidenAndRemoved(hud, rootView); 387 | } 388 | 389 | #pragma mark - Grace time 390 | 391 | - (void)testGraceTime { 392 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 393 | UIView *rootView = rootViewController.view; 394 | 395 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 396 | 397 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 398 | hud.delegate = self; 399 | hud.removeFromSuperViewOnHide = YES; 400 | hud.graceTime = 2.; 401 | [rootView addSubview:hud]; 402 | [hud showAnimated:YES]; 403 | 404 | XCTAssertNotNil(hud, @"A HUD should be created."); 405 | 406 | // The HUD should be added to the view but still hidden 407 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); \ 408 | XCTAssertEqual(hud.alpha, 0.f, @"The HUD should not be visible."); \ 409 | XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \ 410 | XCTAssertEqual(hud.bezelView.alpha, 0.f, @"The HUD should not be visible."); \ 411 | 412 | 413 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 414 | // The HUD should be added to the view but still hidden 415 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); \ 416 | XCTAssertEqual(hud.alpha, 0.f, @"The HUD should not be visible."); \ 417 | XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \ 418 | XCTAssertEqual(hud.bezelView.alpha, 0.f, @"The HUD should not be visible."); \ 419 | }); 420 | 421 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 422 | // After the grace time passes, the HUD should be shown. 423 | MBTestHUDIsVisible(hud, rootView); 424 | [hud hideAnimated:YES]; 425 | }); 426 | 427 | [self waitForExpectationsWithTimeout:5. handler:nil]; 428 | 429 | MBTestHUDIsHidenAndRemoved(hud, rootView); 430 | } 431 | 432 | - (void)testHideBeforeGraceTimeElapsed { 433 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 434 | UIView *rootView = rootViewController.view; 435 | 436 | self.hideExpectation = [self expectationWithDescription:@"The hudWasHidden: delegate should have been called."]; 437 | 438 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 439 | hud.delegate = self; 440 | hud.removeFromSuperViewOnHide = YES; 441 | hud.graceTime = 2.; 442 | [rootView addSubview:hud]; 443 | [hud showAnimated:YES]; 444 | 445 | XCTAssertNotNil(hud, @"A HUD should be created."); 446 | 447 | // The HUD should be added to the view but still hidden 448 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); \ 449 | XCTAssertEqual(hud.alpha, 0.f, @"The HUD should not be visible."); \ 450 | XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \ 451 | XCTAssertEqual(hud.bezelView.alpha, 0.f, @"The HUD should not be visible."); \ 452 | 453 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 454 | // The HUD should be added to the view but still hidden 455 | XCTAssertEqualObjects(hud.superview, rootView, @"The hud should be added to the view."); \ 456 | XCTAssertEqual(hud.alpha, 0.f, @"The HUD should not be visible."); \ 457 | XCTAssertFalse(hud.hidden, @"The HUD should be visible."); \ 458 | XCTAssertEqual(hud.bezelView.alpha, 0.f, @"The HUD should not be visible."); \ 459 | [hud hideAnimated:YES]; 460 | }); 461 | 462 | XCTestExpectation *hideCheckExpectation = [self expectationWithDescription:@"Hide check"]; 463 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 464 | // After the grace time passes, the HUD should still not be shown. 465 | MBTestHUDIsHidenAndRemoved(hud, rootView); 466 | [hideCheckExpectation fulfill]; 467 | }); 468 | 469 | [self waitForExpectationsWithTimeout:5. handler:nil]; 470 | 471 | MBTestHUDIsHidenAndRemoved(hud, rootView); 472 | } 473 | 474 | #pragma mark - Customization 475 | 476 | - (void)testShape { 477 | UIViewController *rootViewController = UIApplication.sharedApplication.windows.firstObject.rootViewController; 478 | UIView *rootView = rootViewController.view; 479 | 480 | MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:rootView]; 481 | hud.removeFromSuperViewOnHide = YES; 482 | hud.offset = CGPointMake(50, 50); 483 | hud.square = YES; 484 | hud.label.text = @"Some long text..."; 485 | [rootView addSubview:hud]; 486 | [hud showAnimated:NO]; 487 | 488 | [hud setNeedsLayout]; 489 | [hud layoutIfNeeded]; 490 | 491 | CGRect frame = hud.bezelView.frame; 492 | XCTAssertEqual(frame.size.width, frame.size.height); 493 | 494 | [hud hideAnimated:NO]; 495 | 496 | MBTestHUDIsHidenAndRemoved(hud, rootView); 497 | } 498 | 499 | #pragma mark - MBProgressHUDDelegate 500 | 501 | - (void)hudWasHidden:(MBProgressHUD *)hud { 502 | if (self.hideChecks) self.hideChecks(); 503 | self.hideChecks = nil; 504 | 505 | [self.hideExpectation fulfill]; 506 | self.hideExpectation = nil; 507 | } 508 | 509 | #pragma mark - Helpers 510 | 511 | - (nullable UIView *)view:(UIView *)view firstSubviewOfClass:(Class)clazz { 512 | for (__unsafe_unretained UIView *subview in view.subviews) { 513 | if ([subview isKindOfClass:clazz]) { 514 | return subview; 515 | } 516 | } 517 | __unsafe_unretained UIView *theView; 518 | for (__unsafe_unretained UIView *subview in view.subviews) { 519 | theView = [self view:subview firstSubviewOfClass:clazz]; 520 | if (theView) { break; } 521 | } 522 | return theView; 523 | } 524 | 525 | @end 526 | -------------------------------------------------------------------------------- /Demo/HudTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Framework-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Framework-tvOS-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2009-2020 Matej Bukovinski 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /MBProgressHUD-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'MBProgressHUD' target in the 'MBProgressHUD' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_8_0 8 | #warning "This project uses features only available in iOS SDK 8.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #import 15 | #endif 16 | -------------------------------------------------------------------------------- /MBProgressHUD.h: -------------------------------------------------------------------------------- 1 | // 2 | // MBProgressHUD.h 3 | // Version 1.2.0 4 | // Created by Matej Bukovinski on 2.4.09. 5 | // 6 | 7 | // This code is distributed under the terms and conditions of the MIT license. 8 | 9 | // Copyright © 2009-2020 Matej Bukovinski 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a copy 12 | // of this software and associated documentation files (the "Software"), to deal 13 | // in the Software without restriction, including without limitation the rights 14 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | // copies of the Software, and to permit persons to whom the Software is 16 | // furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included in 19 | // all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | // THE SOFTWARE. 28 | 29 | #import 30 | #import 31 | #import 32 | 33 | @class MBBackgroundView; 34 | @protocol MBProgressHUDDelegate; 35 | 36 | 37 | extern CGFloat const MBProgressMaxOffset; 38 | 39 | typedef NS_ENUM(NSInteger, MBProgressHUDMode) { 40 | /// UIActivityIndicatorView. 41 | MBProgressHUDModeIndeterminate, 42 | /// A round, pie-chart like, progress view. 43 | MBProgressHUDModeDeterminate, 44 | /// Horizontal progress bar. 45 | MBProgressHUDModeDeterminateHorizontalBar, 46 | /// Ring-shaped progress view. 47 | MBProgressHUDModeAnnularDeterminate, 48 | /// Shows a custom view. 49 | MBProgressHUDModeCustomView, 50 | /// Shows only labels. 51 | MBProgressHUDModeText 52 | }; 53 | 54 | typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) { 55 | /// Opacity animation 56 | MBProgressHUDAnimationFade, 57 | /// Opacity + scale animation (zoom in when appearing zoom out when disappearing) 58 | MBProgressHUDAnimationZoom, 59 | /// Opacity + scale animation (zoom out style) 60 | MBProgressHUDAnimationZoomOut, 61 | /// Opacity + scale animation (zoom in style) 62 | MBProgressHUDAnimationZoomIn 63 | }; 64 | 65 | typedef NS_ENUM(NSInteger, MBProgressHUDBackgroundStyle) { 66 | /// Solid color background 67 | MBProgressHUDBackgroundStyleSolidColor, 68 | /// UIVisualEffectView or UIToolbar.layer background view 69 | MBProgressHUDBackgroundStyleBlur 70 | }; 71 | 72 | typedef void (^MBProgressHUDCompletionBlock)(void); 73 | 74 | 75 | NS_ASSUME_NONNULL_BEGIN 76 | 77 | 78 | /** 79 | * Displays a simple HUD window containing a progress indicator and two optional labels for short messages. 80 | * 81 | * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class. 82 | * The MBProgressHUD window spans over the entire space given to it by the initWithFrame: constructor and catches all 83 | * user input on this region, thereby preventing the user operations on components below the view. 84 | * 85 | * @note To still allow touches to pass through the HUD, you can set hud.userInteractionEnabled = NO. 86 | * @attention MBProgressHUD is a UI class and should therefore only be accessed on the main thread. 87 | */ 88 | @interface MBProgressHUD : UIView 89 | 90 | /** 91 | * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:. 92 | * 93 | * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. 94 | * 95 | * @param view The view that the HUD will be added to 96 | * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use 97 | * animations while appearing. 98 | * @return A reference to the created HUD. 99 | * 100 | * @see hideHUDForView:animated: 101 | * @see animationType 102 | */ 103 | + (instancetype)showHUDAddedTo:(UIView *)view animated:(BOOL)animated; 104 | 105 | /// @name Showing and hiding 106 | 107 | /** 108 | * Finds the top-most HUD subview that hasn't finished and hides it. The counterpart to this method is showHUDAddedTo:animated:. 109 | * 110 | * @note This method sets removeFromSuperViewOnHide. The HUD will automatically be removed from the view hierarchy when hidden. 111 | * 112 | * @param view The view that is going to be searched for a HUD subview. 113 | * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use 114 | * animations while disappearing. 115 | * @return YES if a HUD was found and removed, NO otherwise. 116 | * 117 | * @see showHUDAddedTo:animated: 118 | * @see animationType 119 | */ 120 | + (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated; 121 | 122 | /** 123 | * Finds the top-most HUD subview that hasn't finished and returns it. 124 | * 125 | * @param view The view that is going to be searched. 126 | * @return A reference to the last HUD subview discovered. 127 | */ 128 | + (nullable MBProgressHUD *)HUDForView:(UIView *)view NS_SWIFT_NAME(forView(_:)); 129 | 130 | /** 131 | * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with 132 | * view.bounds as the parameter. 133 | * 134 | * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as 135 | * the HUD's superview (i.e., the view that the HUD will be added to). 136 | */ 137 | - (instancetype)initWithView:(UIView *)view; 138 | 139 | /** 140 | * Displays the HUD. 141 | * 142 | * @note You need to make sure that the main thread completes its run loop soon after this method call so that 143 | * the user interface can be updated. Call this method when your task is already set up to be executed in a new thread 144 | * (e.g., when using something like NSOperation or making an asynchronous call like NSURLRequest). 145 | * 146 | * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use 147 | * animations while appearing. 148 | * 149 | * @see animationType 150 | */ 151 | - (void)showAnimated:(BOOL)animated; 152 | 153 | /** 154 | * Hides the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to 155 | * hide the HUD when your task completes. 156 | * 157 | * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use 158 | * animations while disappearing. 159 | * 160 | * @see animationType 161 | */ 162 | - (void)hideAnimated:(BOOL)animated; 163 | 164 | /** 165 | * Hides the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to 166 | * hide the HUD when your task completes. 167 | * 168 | * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use 169 | * animations while disappearing. 170 | * @param delay Delay in seconds until the HUD is hidden. 171 | * 172 | * @see animationType 173 | */ 174 | - (void)hideAnimated:(BOOL)animated afterDelay:(NSTimeInterval)delay; 175 | 176 | /** 177 | * The HUD delegate object. Receives HUD state notifications. 178 | */ 179 | @property (weak, nonatomic) id delegate; 180 | 181 | /** 182 | * Called after the HUD is hidden. 183 | */ 184 | @property (copy, nullable) MBProgressHUDCompletionBlock completionBlock; 185 | 186 | /** 187 | * Grace period is the time (in seconds) that the invoked method may be run without 188 | * showing the HUD. If the task finishes before the grace time runs out, the HUD will 189 | * not be shown at all. 190 | * This may be used to prevent HUD display for very short tasks. 191 | * Defaults to 0 (no grace time). 192 | * @note The graceTime needs to be set before the hud is shown. You thus can't use `showHUDAddedTo:animated:`, 193 | * but instead need to alloc / init the HUD, configure the grace time and than show it manually. 194 | */ 195 | @property (assign, nonatomic) NSTimeInterval graceTime; 196 | 197 | /** 198 | * The minimum time (in seconds) that the HUD is shown. 199 | * This avoids the problem of the HUD being shown and than instantly hidden. 200 | * Defaults to 0 (no minimum show time). 201 | */ 202 | @property (assign, nonatomic) NSTimeInterval minShowTime; 203 | 204 | /** 205 | * Removes the HUD from its parent view when hidden. 206 | * Defaults to NO. 207 | */ 208 | @property (assign, nonatomic) BOOL removeFromSuperViewOnHide; 209 | 210 | /// @name Appearance 211 | 212 | /** 213 | * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate. 214 | */ 215 | @property (assign, nonatomic) MBProgressHUDMode mode; 216 | 217 | /** 218 | * A color that gets forwarded to all labels and supported indicators. Also sets the tintColor 219 | * for custom views on iOS 7+. Set to nil to manage color individually. 220 | * Defaults to semi-translucent black on iOS 7 and later and white on earlier iOS versions. 221 | */ 222 | @property (strong, nonatomic, nullable) UIColor *contentColor UI_APPEARANCE_SELECTOR; 223 | 224 | /** 225 | * The animation type that should be used when the HUD is shown and hidden. 226 | */ 227 | @property (assign, nonatomic) MBProgressHUDAnimation animationType UI_APPEARANCE_SELECTOR; 228 | 229 | /** 230 | * The bezel offset relative to the center of the view. You can use MBProgressMaxOffset 231 | * and -MBProgressMaxOffset to move the HUD all the way to the screen edge in each direction. 232 | * E.g., CGPointMake(0.f, MBProgressMaxOffset) would position the HUD centered on the bottom edge. 233 | */ 234 | @property (assign, nonatomic) CGPoint offset UI_APPEARANCE_SELECTOR; 235 | 236 | /** 237 | * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). 238 | * This also represents the minimum bezel distance to the edge of the HUD view. 239 | * Defaults to 20.f 240 | */ 241 | @property (assign, nonatomic) CGFloat margin UI_APPEARANCE_SELECTOR; 242 | 243 | /** 244 | * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size). 245 | */ 246 | @property (assign, nonatomic) CGSize minSize UI_APPEARANCE_SELECTOR; 247 | 248 | /** 249 | * Force the HUD dimensions to be equal if possible. 250 | */ 251 | @property (assign, nonatomic, getter = isSquare) BOOL square UI_APPEARANCE_SELECTOR; 252 | 253 | /** 254 | * When enabled, the bezel center gets slightly affected by the device accelerometer data. 255 | * Defaults to NO. 256 | * 257 | * @note This can cause main thread checker assertions on certain devices. https://github.com/jdg/MBProgressHUD/issues/552 258 | */ 259 | @property (assign, nonatomic, getter=areDefaultMotionEffectsEnabled) BOOL defaultMotionEffectsEnabled UI_APPEARANCE_SELECTOR; 260 | 261 | /// @name Progress 262 | 263 | /** 264 | * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. 265 | */ 266 | @property (assign, nonatomic) float progress; 267 | 268 | /// @name ProgressObject 269 | 270 | /** 271 | * The NSProgress object feeding the progress information to the progress indicator. 272 | */ 273 | @property (strong, nonatomic, nullable) NSProgress *progressObject; 274 | 275 | /// @name Views 276 | 277 | /** 278 | * The view containing the labels and indicator (or customView). 279 | */ 280 | @property (strong, nonatomic, readonly) MBBackgroundView *bezelView; 281 | 282 | /** 283 | * View covering the entire HUD area, placed behind bezelView. 284 | */ 285 | @property (strong, nonatomic, readonly) MBBackgroundView *backgroundView; 286 | 287 | /** 288 | * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView. 289 | * The view should implement intrinsicContentSize for proper sizing. For best results use approximately 37 by 37 pixels. 290 | */ 291 | @property (strong, nonatomic, nullable) UIView *customView; 292 | 293 | /** 294 | * A label that holds an optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit 295 | * the entire text. 296 | */ 297 | @property (strong, nonatomic, readonly) UILabel *label; 298 | 299 | /** 300 | * A label that holds an optional details message displayed below the labelText message. The details text can span multiple lines. 301 | */ 302 | @property (strong, nonatomic, readonly) UILabel *detailsLabel; 303 | 304 | /** 305 | * A button that is placed below the labels. Visible only if a target / action is added and a title is assigned.. 306 | */ 307 | @property (strong, nonatomic, readonly) UIButton *button; 308 | 309 | @end 310 | 311 | 312 | @protocol MBProgressHUDDelegate 313 | 314 | @optional 315 | 316 | /** 317 | * Called after the HUD was fully hidden from the screen. 318 | */ 319 | - (void)hudWasHidden:(MBProgressHUD *)hud; 320 | 321 | @end 322 | 323 | 324 | /** 325 | * A progress view for showing definite progress by filling up a circle (pie chart). 326 | */ 327 | @interface MBRoundProgressView : UIView 328 | 329 | /** 330 | * Progress (0.0 to 1.0) 331 | */ 332 | @property (nonatomic, assign) float progress; 333 | 334 | /** 335 | * Indicator progress color. 336 | * Defaults to white [UIColor whiteColor]. 337 | */ 338 | @property (nonatomic, strong) UIColor *progressTintColor; 339 | 340 | /** 341 | * Indicator background (non-progress) color. 342 | * Only applicable on iOS versions older than iOS 7. 343 | * Defaults to translucent white (alpha 0.1). 344 | */ 345 | @property (nonatomic, strong) UIColor *backgroundTintColor; 346 | 347 | /* 348 | * Display mode - NO = round or YES = annular. Defaults to round. 349 | */ 350 | @property (nonatomic, assign, getter = isAnnular) BOOL annular; 351 | 352 | @end 353 | 354 | 355 | /** 356 | * A flat bar progress view. 357 | */ 358 | @interface MBBarProgressView : UIView 359 | 360 | /** 361 | * Progress (0.0 to 1.0) 362 | */ 363 | @property (nonatomic, assign) float progress; 364 | 365 | /** 366 | * Bar border line color. 367 | * Defaults to white [UIColor whiteColor]. 368 | */ 369 | @property (nonatomic, strong) UIColor *lineColor; 370 | 371 | /** 372 | * Bar background color. 373 | * Defaults to clear [UIColor clearColor]; 374 | */ 375 | @property (nonatomic, strong) UIColor *progressRemainingColor; 376 | 377 | /** 378 | * Bar progress color. 379 | * Defaults to white [UIColor whiteColor]. 380 | */ 381 | @property (nonatomic, strong) UIColor *progressColor; 382 | 383 | @end 384 | 385 | 386 | @interface MBBackgroundView : UIView 387 | 388 | /** 389 | * The background style. 390 | * Defaults to MBProgressHUDBackgroundStyleBlur. 391 | */ 392 | @property (nonatomic) MBProgressHUDBackgroundStyle style; 393 | 394 | /** 395 | * The blur effect style, when using MBProgressHUDBackgroundStyleBlur. 396 | * Defaults to UIBlurEffectStyleLight. 397 | */ 398 | @property (nonatomic) UIBlurEffectStyle blurEffectStyle; 399 | 400 | /** 401 | * The background color or the blur tint color. 402 | * 403 | * Defaults to nil on iOS 13 and later and 404 | * `[UIColor colorWithWhite:0.8f alpha:0.6f]` 405 | * on older systems. 406 | */ 407 | @property (nonatomic, strong, nullable) UIColor *color; 408 | 409 | @end 410 | 411 | NS_ASSUME_NONNULL_END 412 | -------------------------------------------------------------------------------- /MBProgressHUD.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MBProgressHUD" 3 | s.version = "1.2.0" 4 | s.summary = "An iOS activity indicator view." 5 | s.description = <<-DESC 6 | MBProgressHUD is an iOS drop-in class that displays a translucent HUD 7 | with an indicator and/or labels while work is being done in a background thread. 8 | The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD 9 | with some additional features. 10 | DESC 11 | s.homepage = "http://www.bukovinski.com" 12 | s.license = { :type => 'MIT', :file => 'LICENSE' } 13 | s.author = { 'Matej Bukovinski' => 'matej@bukovinski.com' } 14 | s.source = { :git => "https://github.com/matej/MBProgressHUD.git", :tag => s.version.to_s } 15 | s.ios.deployment_target = '8.0' 16 | s.tvos.deployment_target = '9.0' 17 | s.source_files = '*.{h,m}' 18 | s.frameworks = "CoreGraphics", "QuartzCore" 19 | s.requires_arc = true 20 | end 21 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1315DD7617804CBC0032507D /* MBProgressHUD.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; }; 11 | 1777D3E71D757B690037C7F1 /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 1777D3E81D757B6E0037C7F1 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; }; 13 | 1D104D931ACA371400973364 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; }; 14 | 1D104D941ACA373100973364 /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = D286A7511518C70F00E13FB8 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | D286A74D1518C70F00E13FB8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A74C1518C70F00E13FB8 /* Foundation.framework */; }; 16 | D286A7531518C70F00E13FB8 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D286A7521518C70F00E13FB8 /* MBProgressHUD.m */; }; 17 | D286A75E1518C89600E13FB8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A75D1518C89600E13FB8 /* UIKit.framework */; }; 18 | D286A76F1518CAAD00E13FB8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXCopyFilesBuildPhase section */ 22 | 1315DD7517804C970032507D /* CopyFiles */ = { 23 | isa = PBXCopyFilesBuildPhase; 24 | buildActionMask = 2147483647; 25 | dstPath = "include/${PRODUCT_NAME}"; 26 | dstSubfolderSpec = 16; 27 | files = ( 28 | 1315DD7617804CBC0032507D /* MBProgressHUD.h in CopyFiles */, 29 | ); 30 | runOnlyForDeploymentPostprocessing = 0; 31 | }; 32 | /* End PBXCopyFilesBuildPhase section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 1315DD73178045000032507D /* MBProgressHUD-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MBProgressHUD-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 36 | 1777D3DF1D757AF50037C7F1 /* MBProgressHUD.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MBProgressHUD.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 1777D3E21D757AF50037C7F1 /* Framework-tvOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Framework-tvOS-Info.plist"; sourceTree = SOURCE_ROOT; }; 38 | 1D104D7A1ACA36CC00973364 /* MBProgressHUD.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MBProgressHUD.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 1D104D951ACA376200973364 /* Framework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Framework-Info.plist"; sourceTree = SOURCE_ROOT; }; 40 | D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMBProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | D286A74C1518C70F00E13FB8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 | D286A7511518C70F00E13FB8 /* MBProgressHUD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = SOURCE_ROOT; }; 43 | D286A7521518C70F00E13FB8 /* MBProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = SOURCE_ROOT; }; 44 | D286A75D1518C89600E13FB8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 45 | D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | 1777D3DB1D757AF50037C7F1 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | 1D104D761ACA36CC00973364 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | D286A7461518C70F00E13FB8 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | D286A75E1518C89600E13FB8 /* UIKit.framework in Frameworks */, 68 | D286A74D1518C70F00E13FB8 /* Foundation.framework in Frameworks */, 69 | D286A76F1518CAAD00E13FB8 /* CoreGraphics.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 1315DD72178044770032507D /* Supporting Files */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 1D104D951ACA376200973364 /* Framework-Info.plist */, 80 | 1777D3E21D757AF50037C7F1 /* Framework-tvOS-Info.plist */, 81 | 1315DD73178045000032507D /* MBProgressHUD-Prefix.pch */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | D286A73E1518C70E00E13FB8 = { 87 | isa = PBXGroup; 88 | children = ( 89 | D286A74E1518C70F00E13FB8 /* MBProgressHUD */, 90 | D286A74B1518C70F00E13FB8 /* Frameworks */, 91 | D286A74A1518C70F00E13FB8 /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | D286A74A1518C70F00E13FB8 /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */, 99 | 1D104D7A1ACA36CC00973364 /* MBProgressHUD.framework */, 100 | 1777D3DF1D757AF50037C7F1 /* MBProgressHUD.framework */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | D286A74B1518C70F00E13FB8 /* Frameworks */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | D286A75D1518C89600E13FB8 /* UIKit.framework */, 109 | D286A74C1518C70F00E13FB8 /* Foundation.framework */, 110 | D286A76E1518CAAD00E13FB8 /* CoreGraphics.framework */, 111 | ); 112 | name = Frameworks; 113 | sourceTree = ""; 114 | }; 115 | D286A74E1518C70F00E13FB8 /* MBProgressHUD */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | D286A7511518C70F00E13FB8 /* MBProgressHUD.h */, 119 | D286A7521518C70F00E13FB8 /* MBProgressHUD.m */, 120 | 1315DD72178044770032507D /* Supporting Files */, 121 | ); 122 | name = MBProgressHUD; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXHeadersBuildPhase section */ 128 | 1777D3DC1D757AF50037C7F1 /* Headers */ = { 129 | isa = PBXHeadersBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | 1777D3E71D757B690037C7F1 /* MBProgressHUD.h in Headers */, 133 | ); 134 | runOnlyForDeploymentPostprocessing = 0; 135 | }; 136 | 1D104D771ACA36CC00973364 /* Headers */ = { 137 | isa = PBXHeadersBuildPhase; 138 | buildActionMask = 2147483647; 139 | files = ( 140 | 1D104D941ACA373100973364 /* MBProgressHUD.h in Headers */, 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | /* End PBXHeadersBuildPhase section */ 145 | 146 | /* Begin PBXNativeTarget section */ 147 | 1777D3DE1D757AF50037C7F1 /* MBProgressHUD Framework tvOS */ = { 148 | isa = PBXNativeTarget; 149 | buildConfigurationList = 1777D3E61D757AF50037C7F1 /* Build configuration list for PBXNativeTarget "MBProgressHUD Framework tvOS" */; 150 | buildPhases = ( 151 | 1777D3DA1D757AF50037C7F1 /* Sources */, 152 | 1777D3DB1D757AF50037C7F1 /* Frameworks */, 153 | 1777D3DC1D757AF50037C7F1 /* Headers */, 154 | 1777D3DD1D757AF50037C7F1 /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = "MBProgressHUD Framework tvOS"; 161 | productName = "MBProgressHUD Framework tvOS"; 162 | productReference = 1777D3DF1D757AF50037C7F1 /* MBProgressHUD.framework */; 163 | productType = "com.apple.product-type.framework"; 164 | }; 165 | 1D104D791ACA36CC00973364 /* MBProgressHUD Framework */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 1D104D8D1ACA36CC00973364 /* Build configuration list for PBXNativeTarget "MBProgressHUD Framework" */; 168 | buildPhases = ( 169 | 1D104D751ACA36CC00973364 /* Sources */, 170 | 1D104D761ACA36CC00973364 /* Frameworks */, 171 | 1D104D771ACA36CC00973364 /* Headers */, 172 | 1D104D781ACA36CC00973364 /* Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | ); 178 | name = "MBProgressHUD Framework"; 179 | productName = "MBProgressHUD Framework"; 180 | productReference = 1D104D7A1ACA36CC00973364 /* MBProgressHUD.framework */; 181 | productType = "com.apple.product-type.framework"; 182 | }; 183 | D286A7481518C70F00E13FB8 /* MBProgressHUD Static Library */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = D286A7561518C70F00E13FB8 /* Build configuration list for PBXNativeTarget "MBProgressHUD Static Library" */; 186 | buildPhases = ( 187 | D286A7451518C70F00E13FB8 /* Sources */, 188 | D286A7461518C70F00E13FB8 /* Frameworks */, 189 | 1315DD7517804C970032507D /* CopyFiles */, 190 | ); 191 | buildRules = ( 192 | ); 193 | dependencies = ( 194 | ); 195 | name = "MBProgressHUD Static Library"; 196 | productName = MBProgressHUD; 197 | productReference = D286A7491518C70F00E13FB8 /* libMBProgressHUD.a */; 198 | productType = "com.apple.product-type.library.static"; 199 | }; 200 | /* End PBXNativeTarget section */ 201 | 202 | /* Begin PBXProject section */ 203 | D286A7401518C70E00E13FB8 /* Project object */ = { 204 | isa = PBXProject; 205 | attributes = { 206 | CLASSPREFIX = MB; 207 | LastUpgradeCheck = 1120; 208 | ORGANIZATIONNAME = "Matej Bukovinski"; 209 | TargetAttributes = { 210 | 1777D3DE1D757AF50037C7F1 = { 211 | CreatedOnToolsVersion = 8.0; 212 | ProvisioningStyle = Automatic; 213 | }; 214 | 1D104D791ACA36CC00973364 = { 215 | CreatedOnToolsVersion = 6.2; 216 | }; 217 | }; 218 | }; 219 | buildConfigurationList = D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */; 220 | compatibilityVersion = "Xcode 3.2"; 221 | developmentRegion = en; 222 | hasScannedForEncodings = 0; 223 | knownRegions = ( 224 | en, 225 | Base, 226 | ); 227 | mainGroup = D286A73E1518C70E00E13FB8; 228 | productRefGroup = D286A74A1518C70F00E13FB8 /* Products */; 229 | projectDirPath = ""; 230 | projectRoot = ""; 231 | targets = ( 232 | D286A7481518C70F00E13FB8 /* MBProgressHUD Static Library */, 233 | 1D104D791ACA36CC00973364 /* MBProgressHUD Framework */, 234 | 1777D3DE1D757AF50037C7F1 /* MBProgressHUD Framework tvOS */, 235 | ); 236 | }; 237 | /* End PBXProject section */ 238 | 239 | /* Begin PBXResourcesBuildPhase section */ 240 | 1777D3DD1D757AF50037C7F1 /* Resources */ = { 241 | isa = PBXResourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | 1D104D781ACA36CC00973364 /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | /* End PBXResourcesBuildPhase section */ 255 | 256 | /* Begin PBXSourcesBuildPhase section */ 257 | 1777D3DA1D757AF50037C7F1 /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 1777D3E81D757B6E0037C7F1 /* MBProgressHUD.m in Sources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | 1D104D751ACA36CC00973364 /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 1D104D931ACA371400973364 /* MBProgressHUD.m in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | D286A7451518C70F00E13FB8 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | D286A7531518C70F00E13FB8 /* MBProgressHUD.m in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXSourcesBuildPhase section */ 282 | 283 | /* Begin XCBuildConfiguration section */ 284 | 1777D3E41D757AF50037C7F1 /* Debug */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | CLANG_ANALYZER_NONNULL = YES; 288 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 291 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 292 | CLANG_WARN_INFINITE_RECURSION = YES; 293 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 294 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 295 | CODE_SIGN_IDENTITY = ""; 296 | CURRENT_PROJECT_VERSION = 1; 297 | DEBUG_INFORMATION_FORMAT = dwarf; 298 | DEFINES_MODULE = YES; 299 | DEVELOPMENT_TEAM = ""; 300 | DYLIB_COMPATIBILITY_VERSION = 1; 301 | DYLIB_CURRENT_VERSION = 1; 302 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 303 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 304 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 305 | INFOPLIST_FILE = "Framework-tvOS-Info.plist"; 306 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 308 | MARKETING_VERSION = 1.2; 309 | MTL_ENABLE_DEBUG_INFO = YES; 310 | PRODUCT_BUNDLE_IDENTIFIER = com.matej.MBProgressHUD; 311 | PRODUCT_NAME = MBProgressHUD; 312 | SDKROOT = appletvos; 313 | SKIP_INSTALL = YES; 314 | TARGETED_DEVICE_FAMILY = 3; 315 | TVOS_DEPLOYMENT_TARGET = 9.0; 316 | VERSIONING_SYSTEM = "apple-generic"; 317 | VERSION_INFO_PREFIX = ""; 318 | }; 319 | name = Debug; 320 | }; 321 | 1777D3E51D757AF50037C7F1 /* Release */ = { 322 | isa = XCBuildConfiguration; 323 | buildSettings = { 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_ENABLE_MODULES = YES; 327 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 328 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 329 | CLANG_WARN_INFINITE_RECURSION = YES; 330 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 331 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 332 | CODE_SIGN_IDENTITY = ""; 333 | COPY_PHASE_STRIP = NO; 334 | CURRENT_PROJECT_VERSION = 1; 335 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 336 | DEFINES_MODULE = YES; 337 | DEVELOPMENT_TEAM = ""; 338 | DYLIB_COMPATIBILITY_VERSION = 1; 339 | DYLIB_CURRENT_VERSION = 1; 340 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 341 | ENABLE_NS_ASSERTIONS = NO; 342 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 344 | INFOPLIST_FILE = "Framework-tvOS-Info.plist"; 345 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 347 | MARKETING_VERSION = 1.2; 348 | MTL_ENABLE_DEBUG_INFO = NO; 349 | PRODUCT_BUNDLE_IDENTIFIER = com.matej.MBProgressHUD; 350 | PRODUCT_NAME = MBProgressHUD; 351 | SDKROOT = appletvos; 352 | SKIP_INSTALL = YES; 353 | TARGETED_DEVICE_FAMILY = 3; 354 | TVOS_DEPLOYMENT_TARGET = 9.0; 355 | VERSIONING_SYSTEM = "apple-generic"; 356 | VERSION_INFO_PREFIX = ""; 357 | }; 358 | name = Release; 359 | }; 360 | 1D104D8E1ACA36CC00973364 /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | APPLICATION_EXTENSION_API_ONLY = YES; 364 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 365 | CLANG_ENABLE_MODULES = YES; 366 | CLANG_ENABLE_OBJC_ARC = YES; 367 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_STRICT_PROTOTYPES = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 371 | CURRENT_PROJECT_VERSION = 1; 372 | DEFINES_MODULE = YES; 373 | DEVELOPMENT_TEAM = ""; 374 | DYLIB_COMPATIBILITY_VERSION = 1; 375 | DYLIB_CURRENT_VERSION = 1; 376 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 383 | INFOPLIST_FILE = "Framework-Info.plist"; 384 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 386 | MARKETING_VERSION = 1.2; 387 | MTL_ENABLE_DEBUG_INFO = YES; 388 | PRODUCT_BUNDLE_IDENTIFIER = "com.matej.$(PRODUCT_NAME:rfc1034identifier)"; 389 | PRODUCT_NAME = MBProgressHUD; 390 | SKIP_INSTALL = YES; 391 | TARGETED_DEVICE_FAMILY = "1,2"; 392 | VERSIONING_SYSTEM = "apple-generic"; 393 | VERSION_INFO_PREFIX = ""; 394 | }; 395 | name = Debug; 396 | }; 397 | 1D104D8F1ACA36CC00973364 /* Release */ = { 398 | isa = XCBuildConfiguration; 399 | buildSettings = { 400 | APPLICATION_EXTENSION_API_ONLY = YES; 401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 406 | CLANG_WARN_STRICT_PROTOTYPES = YES; 407 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 408 | COPY_PHASE_STRIP = NO; 409 | CURRENT_PROJECT_VERSION = 1; 410 | DEFINES_MODULE = YES; 411 | DEVELOPMENT_TEAM = ""; 412 | DYLIB_COMPATIBILITY_VERSION = 1; 413 | DYLIB_CURRENT_VERSION = 1; 414 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 415 | ENABLE_NS_ASSERTIONS = NO; 416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 418 | INFOPLIST_FILE = "Framework-Info.plist"; 419 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 421 | MARKETING_VERSION = 1.2; 422 | MTL_ENABLE_DEBUG_INFO = NO; 423 | PRODUCT_BUNDLE_IDENTIFIER = "com.matej.$(PRODUCT_NAME:rfc1034identifier)"; 424 | PRODUCT_NAME = MBProgressHUD; 425 | SKIP_INSTALL = YES; 426 | TARGETED_DEVICE_FAMILY = "1,2"; 427 | VERSIONING_SYSTEM = "apple-generic"; 428 | VERSION_INFO_PREFIX = ""; 429 | }; 430 | name = Release; 431 | }; 432 | D286A7541518C70F00E13FB8 /* Debug */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 437 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 438 | CLANG_CXX_LIBRARY = "libc++"; 439 | CLANG_ENABLE_OBJC_ARC = YES; 440 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 441 | CLANG_WARN_BOOL_CONVERSION = YES; 442 | CLANG_WARN_COMMA = YES; 443 | CLANG_WARN_CONSTANT_CONVERSION = YES; 444 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 445 | CLANG_WARN_EMPTY_BODY = YES; 446 | CLANG_WARN_ENUM_CONVERSION = YES; 447 | CLANG_WARN_INFINITE_RECURSION = YES; 448 | CLANG_WARN_INT_CONVERSION = YES; 449 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 450 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 451 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 452 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 453 | CLANG_WARN_STRICT_PROTOTYPES = YES; 454 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 455 | CLANG_WARN_UNREACHABLE_CODE = YES; 456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 457 | COPY_PHASE_STRIP = NO; 458 | ENABLE_STRICT_OBJC_MSGSEND = YES; 459 | ENABLE_TESTABILITY = YES; 460 | GCC_C_LANGUAGE_STANDARD = gnu99; 461 | GCC_DYNAMIC_NO_PIC = NO; 462 | GCC_NO_COMMON_BLOCKS = YES; 463 | GCC_OPTIMIZATION_LEVEL = 0; 464 | GCC_PREPROCESSOR_DEFINITIONS = ( 465 | "DEBUG=1", 466 | "$(inherited)", 467 | ); 468 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 469 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 471 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 472 | GCC_WARN_UNDECLARED_SELECTOR = YES; 473 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 474 | GCC_WARN_UNUSED_FUNCTION = YES; 475 | GCC_WARN_UNUSED_VARIABLE = YES; 476 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 477 | ONLY_ACTIVE_ARCH = YES; 478 | SDKROOT = iphoneos; 479 | }; 480 | name = Debug; 481 | }; 482 | D286A7551518C70F00E13FB8 /* Release */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | ALWAYS_SEARCH_USER_PATHS = NO; 486 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 487 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 488 | CLANG_CXX_LIBRARY = "libc++"; 489 | CLANG_ENABLE_OBJC_ARC = YES; 490 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 491 | CLANG_WARN_BOOL_CONVERSION = YES; 492 | CLANG_WARN_COMMA = YES; 493 | CLANG_WARN_CONSTANT_CONVERSION = YES; 494 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 495 | CLANG_WARN_EMPTY_BODY = YES; 496 | CLANG_WARN_ENUM_CONVERSION = YES; 497 | CLANG_WARN_INFINITE_RECURSION = YES; 498 | CLANG_WARN_INT_CONVERSION = YES; 499 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 500 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 501 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 502 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 503 | CLANG_WARN_STRICT_PROTOTYPES = YES; 504 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 505 | CLANG_WARN_UNREACHABLE_CODE = YES; 506 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 507 | COPY_PHASE_STRIP = YES; 508 | ENABLE_STRICT_OBJC_MSGSEND = YES; 509 | GCC_C_LANGUAGE_STANDARD = gnu99; 510 | GCC_NO_COMMON_BLOCKS = YES; 511 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 512 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 513 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 514 | GCC_WARN_UNDECLARED_SELECTOR = YES; 515 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 516 | GCC_WARN_UNUSED_FUNCTION = YES; 517 | GCC_WARN_UNUSED_VARIABLE = YES; 518 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 519 | SDKROOT = iphoneos; 520 | VALIDATE_PRODUCT = YES; 521 | }; 522 | name = Release; 523 | }; 524 | D286A7571518C70F00E13FB8 /* Debug */ = { 525 | isa = XCBuildConfiguration; 526 | buildSettings = { 527 | DSTROOT = /tmp/MBProgressHUD.dst; 528 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 529 | GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch"; 530 | OTHER_LDFLAGS = "-ObjC"; 531 | PRODUCT_NAME = MBProgressHUD; 532 | SKIP_INSTALL = YES; 533 | }; 534 | name = Debug; 535 | }; 536 | D286A7581518C70F00E13FB8 /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | buildSettings = { 539 | DSTROOT = /tmp/MBProgressHUD.dst; 540 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 541 | GCC_PREFIX_HEADER = "MBProgressHUD-Prefix.pch"; 542 | OTHER_LDFLAGS = "-ObjC"; 543 | PRODUCT_NAME = MBProgressHUD; 544 | SKIP_INSTALL = YES; 545 | }; 546 | name = Release; 547 | }; 548 | /* End XCBuildConfiguration section */ 549 | 550 | /* Begin XCConfigurationList section */ 551 | 1777D3E61D757AF50037C7F1 /* Build configuration list for PBXNativeTarget "MBProgressHUD Framework tvOS" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | 1777D3E41D757AF50037C7F1 /* Debug */, 555 | 1777D3E51D757AF50037C7F1 /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | 1D104D8D1ACA36CC00973364 /* Build configuration list for PBXNativeTarget "MBProgressHUD Framework" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | 1D104D8E1ACA36CC00973364 /* Debug */, 564 | 1D104D8F1ACA36CC00973364 /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | D286A7431518C70E00E13FB8 /* Build configuration list for PBXProject "MBProgressHUD" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | D286A7541518C70F00E13FB8 /* Debug */, 573 | D286A7551518C70F00E13FB8 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | D286A7561518C70F00E13FB8 /* Build configuration list for PBXNativeTarget "MBProgressHUD Static Library" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | D286A7571518C70F00E13FB8 /* Debug */, 582 | D286A7581518C70F00E13FB8 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | /* End XCConfigurationList section */ 588 | }; 589 | rootObject = D286A7401518C70E00E13FB8 /* Project object */; 590 | } 591 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/xcshareddata/xcschemes/MBProgressHUD Framework tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/xcshareddata/xcschemes/MBProgressHUD Framework.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /MBProgressHUD.xcodeproj/xcshareddata/xcschemes/MBProgressHUD.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /MBProgressHUD.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /MBProgressHUD.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.2 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "MBProgressHUD", 6 | products: [ 7 | .library(name: "MBProgressHUD", targets: ["MBProgressHUD"]) 8 | ], 9 | targets: [ 10 | .target( 11 | name: "MBProgressHUD", 12 | dependencies: [], 13 | path: ".", 14 | exclude: ["Demo"], 15 | sources: ["MBProgressHUD.h", "MBProgressHUD.m"], 16 | publicHeadersPath: "include" 17 | ) 18 | ] 19 | ) 20 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | # MBProgressHUD 2 | 3 | [![Build Status](https://travis-ci.org/matej/MBProgressHUD.svg?branch=master)](https://travis-ci.org/matej/MBProgressHUD) [![codecov.io](https://codecov.io/github/matej/MBProgressHUD/coverage.svg?branch=master)](https://codecov.io/github/matej/MBProgressHUD?branch=master) 4 | [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) [![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/MBProgressHUD.svg?style=flat)](https://cocoapods.org/pods/MBProgressHUD) [![License: MIT](https://img.shields.io/cocoapods/l/MBProgressHUD.svg?style=flat)](http://opensource.org/licenses/MIT) 5 | 6 | `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. 7 | 8 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/1-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/1.png) 9 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/2-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/2.png) 10 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/3-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/3.png) 11 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/4-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/4.png) 12 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/5-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/5.png) 13 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/6-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/6.png) 14 | [![](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/7-small.png)](https://raw.githubusercontent.com/wiki/matej/MBProgressHUD/Screenshots/7.png) 15 | 16 | **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. 17 | 18 | ## Requirements 19 | 20 | `MBProgressHUD` works on iOS 9.0+. It depends on the following Apple frameworks, which should already be included with most Xcode templates: 21 | 22 | * Foundation.framework 23 | * UIKit.framework 24 | * CoreGraphics.framework 25 | 26 | You will need the latest developer tools in order to build `MBProgressHUD`. Old Xcode versions might work, but compatibility will not be explicitly maintained. 27 | 28 | ## Adding MBProgressHUD to your project 29 | 30 | ### CocoaPods 31 | 32 | [CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project. 33 | 34 | 1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 1.2.0'` 35 | 2. Install the pod(s) by running `pod install`. 36 | 3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. 37 | 38 | ### Carthage 39 | 40 | 1. Add MBProgressHUD to your Cartfile. e.g., `github "jdg/MBProgressHUD" ~> 1.2.0` 41 | 2. Run `carthage update` 42 | 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. 43 | 44 | ### SwiftPM / Accio 45 | 46 | 1. Add the following to your `Package.swift`: 47 | ```swift 48 | .package(url: "https://github.com/jdg/MBProgressHUD.git", .upToNextMajor(from: "1.2.0")), 49 | ``` 50 | 2. Next, add `MBProgressHUD` to your App targets dependencies like so: 51 | ```swift 52 | .target(name: "App", dependencies: ["MBProgressHUD"]), 53 | ``` 54 | 3. Then open your project in Xcode 11+ (SwiftPM) or run `accio update` (Accio). 55 | 56 | ### Source files 57 | 58 | Alternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project. 59 | 60 | 1. Download the [latest code version](https://github.com/matej/MBProgressHUD/archive/master.zip) or add the repository as a git submodule to your git-tracked project. 61 | 2. Open your project in Xcode, then drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. 62 | 3. Include MBProgressHUD wherever you need it with `#import "MBProgressHUD.h"`. 63 | 64 | ### Static library 65 | 66 | You can also add MBProgressHUD as a static library to your project or workspace. 67 | 68 | 1. Download the [latest code version](https://github.com/matej/MBProgressHUD/downloads) or add the repository as a git submodule to your git-tracked project. 69 | 2. Open your project in Xcode, then drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the "Product Navigator view"). 70 | 3. Select your target and go to the Build phases tab. In the Link Binary With Libraries section select the add button. On the sheet find and add `libMBProgressHUD.a`. You might also need to add `MBProgressHUD` to the Target Dependencies list. 71 | 4. Include MBProgressHUD wherever you need it with `#import `. 72 | 73 | ## Usage 74 | 75 | The main guideline you need to follow when dealing with MBProgressHUD while running long-running tasks is keeping the main thread work-free, so the UI can be updated promptly. The recommended way of using MBProgressHUD is therefore to set it up on the main thread and then spinning the task, that you want to perform, off onto a new thread. 76 | 77 | ```objective-c 78 | [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 79 | dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ 80 | // Do something... 81 | dispatch_async(dispatch_get_main_queue(), ^{ 82 | [MBProgressHUD hideHUDForView:self.view animated:YES]; 83 | }); 84 | }); 85 | ``` 86 | 87 | 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. 88 | 89 | If you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns. 90 | 91 | ```objective-c 92 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 93 | hud.mode = MBProgressHUDModeAnnularDeterminate; 94 | hud.label.text = @"Loading"; 95 | [self doSomethingInBackgroundWithProgressCallback:^(float progress) { 96 | hud.progress = progress; 97 | } completionCallback:^{ 98 | [hud hideAnimated:YES]; 99 | }]; 100 | ``` 101 | 102 | You can also use a `NSProgress` object and MBProgressHUD will update itself when there is progress reported through that object. 103 | 104 | ```objective-c 105 | MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 106 | hud.mode = MBProgressHUDModeAnnularDeterminate; 107 | hud.label.text = @"Loading"; 108 | NSProgress *progress = [self doSomethingInBackgroundCompletion:^{ 109 | [hud hideAnimated:YES]; 110 | }]; 111 | hud.progressObject = progress; 112 | ``` 113 | 114 | Keep in mind that UI updates, inclining calls to MBProgressHUD should always be done on the main thread. 115 | 116 | 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. 117 | 118 | ```objective-c 119 | [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 120 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC); 121 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 122 | // Do something... 123 | [MBProgressHUD hideHUDForView:self.view animated:YES]; 124 | }); 125 | ``` 126 | 127 | You should be aware that any HUD updates issued inside the above block won't be displayed until the block completes. 128 | 129 | For more examples, including how to use MBProgressHUD with asynchronous operations such as NSURLConnection, take a look at the bundled demo project. Extensive API documentation is provided in the header file (MBProgressHUD.h). 130 | 131 | 132 | ## License 133 | 134 | This code is distributed under the terms and conditions of the [MIT license](LICENSE). 135 | 136 | ## Change-log 137 | 138 | A brief summary of each MBProgressHUD release can be found in the [CHANGELOG](CHANGELOG.mdown). 139 | -------------------------------------------------------------------------------- /include/MBProgressHUD/MBProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../MBProgressHUD.h -------------------------------------------------------------------------------- /include/module.modulemap: -------------------------------------------------------------------------------- 1 | module MBProgressHUD { 2 | umbrella header "MBProgressHUD/MBProgressHUD.h" 3 | export * 4 | module * { export * } 5 | } 6 | --------------------------------------------------------------------------------