From 48fd0e40524410580d33d8356f79501c3857cb44 Mon Sep 17 00:00:00 2001 From: Jonas Gessner Date: Thu, 14 May 2015 17:22:33 +0200 Subject: [PATCH] 1.2.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed #31 • Carthage support • Bug fix for CocoaPods --- JGProgressHUD.podspec | 26 ++--- .../JGProgressHUD Framework/Info.plist | 2 +- .../JGProgressHUD.xcodeproj/project.pbxproj | 90 +++++++------- .../JGProgressHUD Framework.xcscheme | 110 ++++++++++++++++++ .../JGProgressHUDErrorIndicatorView.m | 7 +- .../JGProgressHUDSuccessIndicatorView.m | 7 +- README.md | 27 ++++- 7 files changed, 199 insertions(+), 70 deletions(-) create mode 100644 JGProgressHUD/JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD Framework.xcscheme diff --git a/JGProgressHUD.podspec b/JGProgressHUD.podspec index 81dd644..583fc40 100644 --- a/JGProgressHUD.podspec +++ b/JGProgressHUD.podspec @@ -1,17 +1,17 @@ Pod::Spec.new do |s| - s.name = "JGProgressHUD" - s.version = "1.2.5" - s.summary = "Powerful and modern progress HUD for iOS." - s.homepage = "https://github.com/JonasGessner/JGProgressHUD" - s.license = { :type => "MIT", :file => "LICENSE.txt" } - s.author = "Jonas Gessner" - s.social_media_url = "http://twitter.com/JonasGessner" - s.platform = :ios, "5.0" - s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.2.5" } - s.source_files = "JGProgressHUD/JGProgressHUD/*.{h,m}" - s.resources = "JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle" - s.frameworks = "Foundation", "UIKit", "QuartzCore" - s.requires_arc = true + s.name = "JGProgressHUD" + s.version = "1.2.6" + s.summary = "Powerful and modern progress HUD for iOS." + s.homepage = "https://github.com/JonasGessner/JGProgressHUD" + s.license = { :type => "MIT", :file => "LICENSE.txt" } + s.author = "Jonas Gessner" + s.social_media_url = "http://twitter.com/JonasGessner" + s.platform = :ios, "5.0" + s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.2.6" } + s.source_files = "JGProgressHUD/JGProgressHUD/*.{h,m}" + s.resource = "JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle" + s.frameworks = "Foundation", "UIKit", "QuartzCore" + s.requires_arc = true end diff --git a/JGProgressHUD/JGProgressHUD Framework/Info.plist b/JGProgressHUD/JGProgressHUD Framework/Info.plist index 6808f7b..f15220b 100644 --- a/JGProgressHUD/JGProgressHUD Framework/Info.plist +++ b/JGProgressHUD/JGProgressHUD Framework/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.2.5 + 1.2.6 CFBundleSignature ???? CFBundleVersion diff --git a/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj b/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj index 6a53fde..e27aae0 100644 --- a/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj +++ b/JGProgressHUD/JGProgressHUD.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ 6B60B27619A3C34D00ED1A4E /* jg_hud_error@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27219A3C34D00ED1A4E /* jg_hud_error@2x.png */; }; 6B60B27719A3C34D00ED1A4E /* jg_hud_success.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27319A3C34D00ED1A4E /* jg_hud_success.png */; }; 6B60B27819A3C34D00ED1A4E /* jg_hud_success@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27419A3C34D00ED1A4E /* jg_hud_success@2x.png */; }; + 6B8435B61B04F44D004408CE /* JGProgressHUD Resources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B24019A3B3C500ED1A4E /* JGProgressHUD Resources.bundle */; }; 6BC01877197B2AA500DA4C49 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BC01876197B2AA500DA4C49 /* Foundation.framework */; }; 6BC018AC197B2ABF00DA4C49 /* JGProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC0189D197B2ABF00DA4C49 /* JGProgressHUD.m */; }; 6BC018AD197B2ABF00DA4C49 /* JGProgressHUDAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC0189F197B2ABF00DA4C49 /* JGProgressHUDAnimation.m */; }; @@ -26,22 +27,16 @@ 6BC018B3197B2ABF00DA4C49 /* JGProgressHUDRingIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC018AB197B2ABF00DA4C49 /* JGProgressHUDRingIndicatorView.m */; }; 6BC018B7197B2BC700DA4C49 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BC018B6197B2BC700DA4C49 /* UIKit.framework */; }; 6BC018B9197B2BCB00DA4C49 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BC018B8197B2BCB00DA4C49 /* QuartzCore.framework */; }; - 6BD1FA1D1AF1216800139990 /* jg_hud_error.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27119A3C34D00ED1A4E /* jg_hud_error.png */; }; - 6BD1FA1E1AF1216800139990 /* jg_hud_error@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27219A3C34D00ED1A4E /* jg_hud_error@2x.png */; }; - 6BD1FA1F1AF1216800139990 /* jg_hud_error@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B29118C19CA0D4500E93DF9 /* jg_hud_error@3x.png */; }; - 6BD1FA201AF1216800139990 /* jg_hud_success.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27319A3C34D00ED1A4E /* jg_hud_success.png */; }; - 6BD1FA211AF1216800139990 /* jg_hud_success@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B60B27419A3C34D00ED1A4E /* jg_hud_success@2x.png */; }; - 6BD1FA221AF1216800139990 /* jg_hud_success@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6B29118D19CA0D4500E93DF9 /* jg_hud_success@3x.png */; }; - 6BF7DC4B1AEE6D39000A0AE0 /* JGProgressHUD.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC0189C197B2ABF00DA4C49 /* JGProgressHUD.h */; }; - 6BF7DC4C1AEE6D39000A0AE0 /* JGProgressHUDAnimation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC0189E197B2ABF00DA4C49 /* JGProgressHUDAnimation.h */; }; - 6BF7DC4D1AEE6D39000A0AE0 /* JGProgressHUDFadeAnimation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018A0197B2ABF00DA4C49 /* JGProgressHUDFadeAnimation.h */; }; - 6BF7DC4E1AEE6D39000A0AE0 /* JGProgressHUDFadeZoomAnimation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018A2197B2ABF00DA4C49 /* JGProgressHUDFadeZoomAnimation.h */; }; - 6BF7DC4F1AEE6D39000A0AE0 /* JGProgressHUDIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018A6197B2ABF00DA4C49 /* JGProgressHUDIndicatorView.h */; }; - 6BF7DC501AEE6D39000A0AE0 /* JGProgressHUDIndeterminateIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018A4197B2ABF00DA4C49 /* JGProgressHUDIndeterminateIndicatorView.h */; }; - 6BF7DC511AEE6D39000A0AE0 /* JGProgressHUDPieIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018A8197B2ABF00DA4C49 /* JGProgressHUDPieIndicatorView.h */; }; - 6BF7DC521AEE6D39000A0AE0 /* JGProgressHUDRingIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BC018AA197B2ABF00DA4C49 /* JGProgressHUDRingIndicatorView.h */; }; - 6BF7DC531AEE6D39000A0AE0 /* JGProgressHUDSuccessIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6B60B25219A3B78B00ED1A4E /* JGProgressHUDSuccessIndicatorView.h */; }; - 6BF7DC541AEE6D39000A0AE0 /* JGProgressHUDErrorIndicatorView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6B60B25519A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.h */; }; + 6BF7DC4B1AEE6D39000A0AE0 /* JGProgressHUD.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC0189C197B2ABF00DA4C49 /* JGProgressHUD.h */; }; + 6BF7DC4C1AEE6D39000A0AE0 /* JGProgressHUDAnimation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC0189E197B2ABF00DA4C49 /* JGProgressHUDAnimation.h */; }; + 6BF7DC4D1AEE6D39000A0AE0 /* JGProgressHUDFadeAnimation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018A0197B2ABF00DA4C49 /* JGProgressHUDFadeAnimation.h */; }; + 6BF7DC4E1AEE6D39000A0AE0 /* JGProgressHUDFadeZoomAnimation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018A2197B2ABF00DA4C49 /* JGProgressHUDFadeZoomAnimation.h */; }; + 6BF7DC4F1AEE6D39000A0AE0 /* JGProgressHUDIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018A6197B2ABF00DA4C49 /* JGProgressHUDIndicatorView.h */; }; + 6BF7DC501AEE6D39000A0AE0 /* JGProgressHUDIndeterminateIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018A4197B2ABF00DA4C49 /* JGProgressHUDIndeterminateIndicatorView.h */; }; + 6BF7DC511AEE6D39000A0AE0 /* JGProgressHUDPieIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018A8197B2ABF00DA4C49 /* JGProgressHUDPieIndicatorView.h */; }; + 6BF7DC521AEE6D39000A0AE0 /* JGProgressHUDRingIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BC018AA197B2ABF00DA4C49 /* JGProgressHUDRingIndicatorView.h */; }; + 6BF7DC531AEE6D39000A0AE0 /* JGProgressHUDSuccessIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6B60B25219A3B78B00ED1A4E /* JGProgressHUDSuccessIndicatorView.h */; }; + 6BF7DC541AEE6D39000A0AE0 /* JGProgressHUDErrorIndicatorView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6B60B25519A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.h */; }; 6BF7DC731AEFD02A000A0AE0 /* JGProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC0189D197B2ABF00DA4C49 /* JGProgressHUD.m */; }; 6BF7DC741AEFD02A000A0AE0 /* JGProgressHUDAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC0189F197B2ABF00DA4C49 /* JGProgressHUDAnimation.m */; }; 6BF7DC751AEFD02A000A0AE0 /* JGProgressHUDFadeAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC018A1197B2ABF00DA4C49 /* JGProgressHUDFadeAnimation.m */; }; @@ -66,28 +61,39 @@ 6BF7DC8A1AEFD066000A0AE0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BC01876197B2AA500DA4C49 /* Foundation.framework */; }; 6BF7DC8B1AEFD072000A0AE0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BC018B8197B2BCB00DA4C49 /* QuartzCore.framework */; }; 6BF7DC931AEFD35D000A0AE0 /* JGProgressHUD-Defines.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF7DC921AEFD245000A0AE0 /* JGProgressHUD-Defines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6BF7DC941AEFD366000A0AE0 /* JGProgressHUD-Defines.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BF7DC921AEFD245000A0AE0 /* JGProgressHUD-Defines.h */; }; + 6BF7DC941AEFD366000A0AE0 /* JGProgressHUD-Defines.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 6BF7DC921AEFD245000A0AE0 /* JGProgressHUD-Defines.h */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 6B8435B71B04F454004408CE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6BC0186B197B2AA500DA4C49 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6B60B23F19A3B3C500ED1A4E; + remoteInfo = "JGProgressHUD Resources"; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ - 6BF7DC4A1AEE6D1D000A0AE0 /* CopyFiles */ = { + 6BF7DC4A1AEE6D1D000A0AE0 /* Copy Headers */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = include; dstSubfolderSpec = 16; files = ( - 6BF7DC4B1AEE6D39000A0AE0 /* JGProgressHUD.h in CopyFiles */, - 6BF7DC4C1AEE6D39000A0AE0 /* JGProgressHUDAnimation.h in CopyFiles */, - 6BF7DC4D1AEE6D39000A0AE0 /* JGProgressHUDFadeAnimation.h in CopyFiles */, - 6BF7DC4E1AEE6D39000A0AE0 /* JGProgressHUDFadeZoomAnimation.h in CopyFiles */, - 6BF7DC4F1AEE6D39000A0AE0 /* JGProgressHUDIndicatorView.h in CopyFiles */, - 6BF7DC941AEFD366000A0AE0 /* JGProgressHUD-Defines.h in CopyFiles */, - 6BF7DC501AEE6D39000A0AE0 /* JGProgressHUDIndeterminateIndicatorView.h in CopyFiles */, - 6BF7DC511AEE6D39000A0AE0 /* JGProgressHUDPieIndicatorView.h in CopyFiles */, - 6BF7DC521AEE6D39000A0AE0 /* JGProgressHUDRingIndicatorView.h in CopyFiles */, - 6BF7DC531AEE6D39000A0AE0 /* JGProgressHUDSuccessIndicatorView.h in CopyFiles */, - 6BF7DC541AEE6D39000A0AE0 /* JGProgressHUDErrorIndicatorView.h in CopyFiles */, - ); + 6BF7DC4B1AEE6D39000A0AE0 /* JGProgressHUD.h in Copy Headers */, + 6BF7DC4C1AEE6D39000A0AE0 /* JGProgressHUDAnimation.h in Copy Headers */, + 6BF7DC4D1AEE6D39000A0AE0 /* JGProgressHUDFadeAnimation.h in Copy Headers */, + 6BF7DC4E1AEE6D39000A0AE0 /* JGProgressHUDFadeZoomAnimation.h in Copy Headers */, + 6BF7DC4F1AEE6D39000A0AE0 /* JGProgressHUDIndicatorView.h in Copy Headers */, + 6BF7DC941AEFD366000A0AE0 /* JGProgressHUD-Defines.h in Copy Headers */, + 6BF7DC501AEE6D39000A0AE0 /* JGProgressHUDIndeterminateIndicatorView.h in Copy Headers */, + 6BF7DC511AEE6D39000A0AE0 /* JGProgressHUDPieIndicatorView.h in Copy Headers */, + 6BF7DC521AEE6D39000A0AE0 /* JGProgressHUDRingIndicatorView.h in Copy Headers */, + 6BF7DC531AEE6D39000A0AE0 /* JGProgressHUDSuccessIndicatorView.h in Copy Headers */, + 6BF7DC541AEE6D39000A0AE0 /* JGProgressHUDErrorIndicatorView.h in Copy Headers */, + ); + name = "Copy Headers"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -216,7 +222,7 @@ 6BC0189D197B2ABF00DA4C49 /* JGProgressHUD.m */, 6BF7DC921AEFD245000A0AE0 /* JGProgressHUD-Defines.h */, 6BC018B4197B2AC300DA4C49 /* Animations */, - 6BC018B5197B2ACB00DA4C49 /* Progress Indicators */, + 6BC018B5197B2ACB00DA4C49 /* Indicators */, 6B60B26819A3C20100ED1A4E /* Resources */, ); path = JGProgressHUD; @@ -244,7 +250,7 @@ name = Animations; sourceTree = ""; }; - 6BC018B5197B2ACB00DA4C49 /* Progress Indicators */ = { + 6BC018B5197B2ACB00DA4C49 /* Indicators */ = { isa = PBXGroup; children = ( 6BC018A6197B2ABF00DA4C49 /* JGProgressHUDIndicatorView.h */, @@ -260,7 +266,7 @@ 6B60B25519A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.h */, 6B60B25619A3BC3C00ED1A4E /* JGProgressHUDErrorIndicatorView.m */, ); - name = "Progress Indicators"; + name = Indicators; sourceTree = ""; }; 6BF7DC5B1AEFCFD9000A0AE0 /* JGProgressHUD Framework */ = { @@ -326,7 +332,7 @@ buildPhases = ( 6BC0186F197B2AA500DA4C49 /* Sources */, 6BC01870197B2AA500DA4C49 /* Frameworks */, - 6BF7DC4A1AEE6D1D000A0AE0 /* CopyFiles */, + 6BF7DC4A1AEE6D1D000A0AE0 /* Copy Headers */, ); buildRules = ( ); @@ -349,6 +355,7 @@ buildRules = ( ); dependencies = ( + 6B8435B81B04F454004408CE /* PBXTargetDependency */, ); name = "JGProgressHUD Framework"; productName = "JGProgressHUD Framework"; @@ -409,12 +416,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6BD1FA1D1AF1216800139990 /* jg_hud_error.png in Resources */, - 6BD1FA1E1AF1216800139990 /* jg_hud_error@2x.png in Resources */, - 6BD1FA1F1AF1216800139990 /* jg_hud_error@3x.png in Resources */, - 6BD1FA201AF1216800139990 /* jg_hud_success.png in Resources */, - 6BD1FA211AF1216800139990 /* jg_hud_success@2x.png in Resources */, - 6BD1FA221AF1216800139990 /* jg_hud_success@3x.png in Resources */, + 6B8435B61B04F44D004408CE /* JGProgressHUD Resources.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -464,6 +466,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 6B8435B81B04F454004408CE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6B60B23F19A3B3C500ED1A4E /* JGProgressHUD Resources */; + targetProxy = 6B8435B71B04F454004408CE /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 6B60B24519A3B3C500ED1A4E /* Debug */ = { isa = XCBuildConfiguration; diff --git a/JGProgressHUD/JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD Framework.xcscheme b/JGProgressHUD/JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD Framework.xcscheme new file mode 100644 index 0000000..0a28d6a --- /dev/null +++ b/JGProgressHUD/JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD Framework.xcscheme @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m index 93f8f1e..37ae131 100644 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m @@ -12,12 +12,9 @@ @implementation JGProgressHUDErrorIndicatorView - (instancetype)initWithContentView:(UIView *__unused)contentView { - NSBundle *fwBundle = [NSBundle bundleForClass:[JGProgressHUD class]]; - if ([fwBundle isEqual:[NSBundle mainBundle]]) { - fwBundle = nil; - } + NSBundle *resourceBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[JGProgressHUD class]] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]]; - NSString *imgPath = [(fwBundle ? : [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]]) pathForResource:@"jg_hud_error" ofType:@"png"]; + NSString *imgPath = [resourceBundle pathForResource:@"jg_hud_error" ofType:@"png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgPath]]; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m b/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m index 86271d0..ef1c7c6 100644 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m @@ -12,12 +12,9 @@ @implementation JGProgressHUDSuccessIndicatorView - (instancetype)initWithContentView:(UIView *__unused)contentView { - NSBundle *fwBundle = [NSBundle bundleForClass:[JGProgressHUD class]]; - if ([fwBundle isEqual:[NSBundle mainBundle]]) { - fwBundle = nil; - } + NSBundle *resourceBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[JGProgressHUD class]] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]]; - NSString *imgPath = [(fwBundle ? : [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"JGProgressHUD Resources" ofType:@"bundle"]]) pathForResource:@"jg_hud_success" ofType:@"png"]; + NSString *imgPath = [resourceBundle pathForResource:@"jg_hud_success" ofType:@"png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgPath]]; diff --git a/README.md b/README.md index 5a1bff0..a260c85 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ Simple, powerful and modern progress HUD for iOS.

- Overview ========== @@ -21,8 +20,10 @@ Overview
The JGProgressHUD Tests example project contains all kinds of different uses of JGProgressHUD. Check out the code and see how much JGProgressHUD can do!
-#####Current Version: 1.2.5 - +#####Current Version: 1.2.6 +[![GitHub license](https://img.shields.io/github/license/JonasGessner/JGProgressHUD.svg)]()
+[![CocoaPods](https://img.shields.io/cocoapods/v/JGProgressHUD.svg)]() +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ##Customization: ###Styles: @@ -56,12 +57,12 @@ Requirements • Deployment target of iOS 5.0 or higher.
• ARC. -• JGProgressHUD can also be used by projects written in Swift. You just need to import `JGProgressHUD.h` in the Objective-C bridging header. +• JGProgressHUD can also be used by projects written in Swift. See Installation for details. Documentation ================ Detailed documentation can be found on CocoaDocs.

-Each header file contains detailed documentation for each method call. To start, see JGProgressHUD.h. +Each method is well documented, making it easy to quickly get a great overview of JGProgressHUD. To start, see JGProgressHUD.h. Examples ================= @@ -74,7 +75,7 @@ HUD.textLabel.text = @"Loading"; ``` This displays a dark HUD with a spinner and the title "Loading", it is presented with a fade animation and is dismissed after 3 seconds with a fade animation.

-Note: You should preferably show the HUD in a UIViewController's view. +Important: You should always show HUDs in a UIViewController's view.

See the JGProgressHUD Tests project for more example implementations. @@ -88,6 +89,14 @@ pod 'JGProgressHUD'
OR:

+Carthage:
+Add this to your `Cartfile`: +``` +github "JonasGessner/JGProgressHUD" >= 1.2.6 +``` +
+OR: +

Framework (iOS >= 8.0 only):
1. Drag the `JGProgressHUD.xcodeproj` file into your Xcode project.
2. Add `JGProgressHUD.framework` to "Embedded Binaries" in the "General" tab of your project's target.
@@ -98,6 +107,10 @@ After you have included JGProgressHUD as framework simply import `JGProgressHUD. ```objc #import ``` +Swift projects: +```swift +import JGProgressHUD +```

OR:

@@ -113,6 +126,8 @@ After you have included JGProgressHUD as static library simply import `JGProgres ```objc #import "JGProgressHUD.h" ``` +Swift projects need to import JGProgressHUD in the Objective-C bridging header. +

####RubyMotion An example of JGProgressHUD in a RubyMotion project can be found [here](https://github.com/IconoclastLabs/rm-jgprogresshud-example).