From f1da78d562de40b5aa8b238d3f9bbc5fdb0d66c5 Mon Sep 17 00:00:00 2001 From: Jonas Gessner Date: Fri, 5 Aug 2016 16:26:13 +0200 Subject: [PATCH] Bug fixes --- .../project.pbxproj | 8 +- .../AppIcon.appiconset/Contents.json | 5 + .../Images.xcassets/Contents.json | 6 + .../LaunchImage.launchimage/Contents.json | 148 ------------------ .../Default-568h@2x Kopie.png | Bin 18594 -> 0 bytes .../Default-568h@2x.png | Bin 18594 -> 0 bytes .../Default-667h@2x-1.png | Bin 22930 -> 0 bytes .../Default-736h@3x.png | Bin 55936 -> 0 bytes .../Default@2x Kopie.png | Bin 16024 -> 0 bytes .../LaunchImage.launchimage/Default@2x.png | Bin 16024 -> 0 bytes .../JGProgressHUD Tests-Info.plist | 2 + .../JGProgressHUD Tests/JGViewController.m | 9 +- .../Launch Screen.storyboard | 50 ++++++ JGProgressHUD.podspec | 4 +- JGProgressHUD/JGProgressHUD/JGProgressHUD.h | 2 +- JGProgressHUD/JGProgressHUD/JGProgressHUD.m | 84 ++++++---- 16 files changed, 134 insertions(+), 184 deletions(-) create mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/Contents.json delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Contents.json delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x Kopie.png delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-667h@2x-1.png delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-736h@3x.png delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default@2x Kopie.png delete mode 100644 Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default@2x.png create mode 100644 Examples/JGProgressHUD Tests/Launch Screen.storyboard diff --git a/Examples/JGProgressHUD Tests.xcodeproj/project.pbxproj b/Examples/JGProgressHUD Tests.xcodeproj/project.pbxproj index 6895270..0775518 100644 --- a/Examples/JGProgressHUD Tests.xcodeproj/project.pbxproj +++ b/Examples/JGProgressHUD Tests.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 6B0687591B776965002C584E /* JGProgressHUD.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6B0687511B77692F002C584E /* JGProgressHUD.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 6B1297821AF124BD00EECA97 /* JGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC018D7197BF28100DA4C49 /* JGAppDelegate.m */; }; 6B1297831AF124BD00EECA97 /* JGViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC018E0197BF28100DA4C49 /* JGViewController.m */; }; + 6B1EE4031D2FCEA6000C3CFD /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6B1EE4021D2FCEA6000C3CFD /* Launch Screen.storyboard */; }; 6B48F0D31AF12789006EDEB5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BC018D3197BF28100DA4C49 /* main.m */; }; 6B48F0DA1AF12991006EDEB5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6BC018E2197BF28100DA4C49 /* Images.xcassets */; }; 6B48F0DC1AF129A0006EDEB5 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6BC018D0197BF28100DA4C49 /* InfoPlist.strings */; }; @@ -88,6 +89,7 @@ /* Begin PBXFileReference section */ 6B0687461B77692F002C584E /* JGProgressHUD.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JGProgressHUD.xcodeproj; path = ../../JGProgressHUD.xcodeproj; sourceTree = ""; }; 6B1297541AF1245200EECA97 /* JGProgressHUD Tests - Framework.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "JGProgressHUD Tests - Framework.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6B1EE4021D2FCEA6000C3CFD /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; 6BC018C4197BF28100DA4C49 /* JGProgressHUD Tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "JGProgressHUD Tests.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 6BC018C7197BF28100DA4C49 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 6BC018C9197BF28100DA4C49 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -175,6 +177,7 @@ 6BC018DF197BF28100DA4C49 /* JGViewController.h */, 6BC018E0197BF28100DA4C49 /* JGViewController.m */, 6BC018E2197BF28100DA4C49 /* Images.xcassets */, + 6B1EE4021D2FCEA6000C3CFD /* Launch Screen.storyboard */, 6BC018CE197BF28100DA4C49 /* Supporting Files */, ); path = "JGProgressHUD Tests"; @@ -312,6 +315,7 @@ files = ( 6BC018E3197BF28100DA4C49 /* Images.xcassets in Resources */, 6BC018D2197BF28100DA4C49 /* InfoPlist.strings in Resources */, + 6B1EE4031D2FCEA6000C3CFD /* Launch Screen.storyboard in Resources */, 6B0687571B77695B002C584E /* JGProgressHUD Resources.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -375,7 +379,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_WARN_UNREACHABLE_CODE = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -399,7 +402,6 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_WARN_UNREACHABLE_CODE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; @@ -500,7 +502,6 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JGProgressHUD Tests/JGProgressHUD Tests-Prefix.pch"; INFOPLIST_FILE = "JGProgressHUD Tests/JGProgressHUD Tests-Info.plist"; @@ -518,7 +519,6 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "JGProgressHUD Tests/JGProgressHUD Tests-Prefix.pch"; INFOPLIST_FILE = "JGProgressHUD Tests/JGProgressHUD Tests-Info.plist"; diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/JGProgressHUD Tests/Images.xcassets/AppIcon.appiconset/Contents.json index b10503e..cf98d29 100644 --- a/Examples/JGProgressHUD Tests/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Examples/JGProgressHUD Tests/Images.xcassets/AppIcon.appiconset/Contents.json @@ -94,6 +94,11 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" } ], "info" : { diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/Contents.json b/Examples/JGProgressHUD Tests/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Examples/JGProgressHUD Tests/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Contents.json b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index f1a1488..0000000 --- a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "images" : [ - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "736h", - "filename" : "Default-736h@3x.png", - "minimum-system-version" : "8.0", - "orientation" : "portrait", - "scale" : "3x" - }, - { - "orientation" : "landscape", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "8.0", - "subtype" : "736h", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "667h", - "filename" : "Default-667h@2x-1.png", - "minimum-system-version" : "8.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "filename" : "Default@2x Kopie.png", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "retina4", - "filename" : "Default-568h@2x.png", - "minimum-system-version" : "7.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "filename" : "Default@2x.png", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "filename" : "Default-568h@2x Kopie.png", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x Kopie.png b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x Kopie.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R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KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9fS`ixvS;&$x8J@slQFSel)6zJN=?13FB7H(lQjRkSy8x_-S~tvu2gzn1oS+dLcF#eqtq$ z%tf9TTvX?`)R@}3uBI;jzS-=ZR-Td&MHaS&;!0?Ni*#$#`n*~CcQK)Q9vAQ~TUpnI!j)a2biYK^R)M~A5wUDZhx?ULMX z3x1P&qt=trOY6P2U67L=m=U?F|5#Uj(eCueNTZaHs_ceWiHeET+j+tp3Jt9g(ekqP z2WOvfR{qV+9r+o4J5?qK>7;;^+I7tGv-i)es$X_D=EoKF+S?zsyj^oRFElP}c}JT< zd8SUs-?O?}2YD#ngKbnHgzHBcboxK_2r9l(?eNCl-pEzkJm}fY?WC*jnS?VBE4EpY zO$fEejz6fU;W2Kl>JeQBZBl-%Irg`obSlg*@4QB;Dd1H7^Oi5wvt4d{RZ!8Og?^aE z)k0$1g+V3fd(gdQ3d&q2q-FL*uy#}|bc^=VhFsl0jBgUGJ+-s3U8MK9A!YJJMxpci z5hJ%|{DwV48fZn0{n5l$N_KcSb#NKE4plB`9I6Zt=Z!~-zw0{9tg$L&Ju1F0X)Cy8 zKF;(&lJ>x)Jw(=;p~sF(Sd9VWGwFE2rnyS9!f^DZ8+aCLq zQ};>lcJ1GDLqjm6Hd>|Eabno@P`~Bn(~6^aD_#yoEH(a?Nm1S<;S+hSxI5d16^<1lEM3NPFi zkqPrpL)+ zgnseFikg`gJVBha1&7C4;O6>h=dt~`ND+;Zd?W(4v2JIb7Pt>Td42%M-Ju-XAH#Pns762L}K3 zDhvsRqN0Ni(1UrishD2YvV?4*h2iFj$+&N||Fn$4n|^NSU+o?~jq`0jVQt8T9l{7b zXiwwODFh2V!Q6sqP9S>WH$oOf$N~=d0-bqTlD61!=`&0eAP-F>XN?*|gtOXX{ zQVTWyYo4ZK0GAw!GHf|pz9`D;-bbb*5LBX*{bnz|+)$@&P9|ORM2o?95{;ejvo&r- zq8cBhTN6nn)7~W>54U)%-F_-b?YKdfk5I8MHcuzBD5)!;yv#Z&R&^y=@=>VTIMy#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-667h@2x-1.png b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-667h@2x-1.png deleted file mode 100644 index 85467c9071d03f3cfe126c678c014bc6bfc387d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22930 zcmeHPX;c%*7H*aS#0^wL1+`_-H#$im$QDD4z(evxL_q~bAwbYbl8#9*37`Qta9lxD zHpMsUDCz);C@KmH;&Vj>ML~j?fjA&Rgb@&d>25GYj`QpNnsbVCa!9K0SNGoPzPGBr zs;*r=-U~+?PBDZaXf(sqeHjF4t03qH2LnB{5EJw>s$}s-~|$_-X4|es+%U^)+P$ zi8(T7rI^w) z4l8~tu`{1O*2%Z&Um=HgpRCHC{nom)*Uq+^GpgNuYrf?YLerFM52KcDYDr^0^S`#l zr@!1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gU1_>E)dfokzt7!WN&TIWntYh=%>Np1RqR+5g8bUV#8)I_68FU ze3A!dSzv03P3OUUS{INAfJDGT0gwoQM8G*rKq3GV0S^U0A^;Kr3k5(T01^RTfdV7~ zAQ7-o03-q+5%8sSKq3GV0S^U0A^;KrkO=CXIbbIOAQ1qG07wKZCE_zDuoD502!KQY zB*I`i06P%?i7?nTfSm|{L;xfLAQ8Tf6v68ZU?;-Bvj9j0Kq3GV0gwoQL>S;u&~^YM z0w56pi2z6h^}E*pyqySRI#xMDknsrYEC75B9VE4Z4i3Dd1-4g#?NwO+{?AKlAd!LN zKfswM;Gh?RXFM1EHq)Yz@2i;ZADRlDY0O_Qmka{t)&zGLDD`H63j0*o)-^tnfR#7u=K zTM)S{O&l#hiuAk4zNrL?JJ+4s|F}mePnWJVQ{|wdHRX*iDV<^R+Hb4#cvJD^Wl>|V zEmG1ekX3APMvCU;1;y0$*Jpk!h#o;0gB~1++Wk@Hb&vMWm{!=2ot(<}x3_z?Yw*^; E083X1h5!Hn diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default-736h@3x.png deleted file mode 100644 index 83f92aa2040c24bbc414560b41343c99fdc034a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55936 zcmeHQX;f3!77l}mIDl2bu|yDSMF^k>#t_0#fz|;9Er@^tg2a%)BtjS@IHE;G9H}5f zr7EJJ0uhnPhlS^J2u?+af=V$8gu!S85qLKtz!lSrOSAo={gt;X1trL^BN3BvkrsNPS@5#j=VX%>Q@X#ql4mQ-#qIl#k_ z-u`+rD)V36w`}xVJle7K`wBOA?ap#94Y_-CZXul=agTU@PYSKb<`=u21``|3KXgnK z8iSPc&=Z|{xLf3F4 z(0>9)?@zNl&%cQKoJ-OxNo_S}D+|q*Ja3%M_ObF^cyO{~-{C;5yuH^Fr3|NwyHaMH zOuo&r|BF~KKST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M?`{mbkU3`QEqVz$%ty^MWKd%6hmj40ot zy58i73|&`nV%(yLEm+en~Rj zo)~$xT)BVA+&79W8rX^{r zFM5KyZrPT1(G9&X>-tpPc{TO+*&Tn`_2rcPI5<$0r^`>rRtM{-7@oRXh8c;w;|m4*(wkJ^*|G_yF($-~+%1fDZs4_)2`>jN6_0gL?re zyBKs>xe4+S>{SBuYk1om$iI+(A^-kA<=^Mb zu+~G!wyv?{B!108OD~Plckjy=`y2K2>a?6Eso1D$*J4971e9wv3vF$>#&2UrCQRh4 zW3uiS4%60~s<}&`c3%^%uqri%jJu=1R2#I%sXK~dLsZIYeaMW^aJW2+ZqPpTLgHotq&6!m4>9Y`TF^j4@Cm|k5ps@-5$zK&1mzI-n2%l@3Z73PcAG9sXBD2hL>e z&XIcoK(#YeJEPvSfi(cE0Z^+#sCI^G=V6%y)&Q^ufHeRrTf!OuC6hq4vvO|0gGYGq z2oD}ni(-UOLbbCJ5%Ay<9y|^+YN&RW*KdL70HOnk4yZ~-5FLg?B!~_mI)Lc#4~q^Y z$+O$PY@keCMxLV;sD7a%=~lBb4jES zj;f8q6nm$t-Y5*(BNH3^GZftb4}b@ypo&C0h$jjP1n~jlgVFC`vKekB(?!> zfH%M!+5>IG19TPo;05)Y zU8HyQ8HawUdt?o*awGtqj#{qX5Z|NzEA!2w*>yT1vz0ouU|98 z$t6c5AOHROp|qqrOs{yT}IxVxAk&(@AJJC2oo!wt2gYme%DY9BeZ_oxMdU%&UoMOE7*q?^E0t-h6&=lzyG8 zN>{&D)*5)){?w-S&DXbaxwGlat=D^n-9;b6N=7ltuG9IcTzjdi?uF{KAR2`h+(M;= z^wbvBrRqkxh+-}^RD}H@kV+&yriGGh6}M!2lz!p*+L-rs?<@1S_4ag+ofdGa>{e>n RS`6~z_QOi&9LJ42{tItRLd^gG diff --git a/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage/Default@2x Kopie.png b/Examples/JGProgressHUD Tests/Images.xcassets/LaunchImage.launchimage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HUD Tests/JGViewController.m index 028fdf5..0782db9 100644 --- a/Examples/JGProgressHUD Tests/JGViewController.m +++ b/Examples/JGProgressHUD Tests/JGViewController.m @@ -153,6 +153,13 @@ - (void)showCancellableHUD { sH.indicatorView = [[JGProgressHUDIndeterminateIndicatorView alloc] initWithHUDStyle:sH.style]; sH.textLabel.text = @"Loading very long..."; [h.HUDView.layer removeAnimationForKey:@"glow"]; + + if (_shadow) { + h.HUDView.layer.shadowColor = [UIColor blackColor].CGColor; + h.HUDView.layer.shadowOffset = CGSizeZero; + h.HUDView.layer.shadowOpacity = 0.4f; + h.HUDView.layer.shadowRadius = 8.0f; + } } }); } @@ -191,7 +198,7 @@ - (void)showNormalHUD { HUD.marginInsets = UIEdgeInsetsMake(0.0f, 0.0f, 10.0f, 0.0f); - [HUD dismissAfterDelay:3.0]; + [HUD dismissAfterDelay:4.0]; } - (void)showPieHUD { diff --git a/Examples/JGProgressHUD Tests/Launch Screen.storyboard b/Examples/JGProgressHUD Tests/Launch Screen.storyboard new file mode 100644 index 0000000..fb77f55 --- /dev/null +++ b/Examples/JGProgressHUD Tests/Launch Screen.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JGProgressHUD.podspec b/JGProgressHUD.podspec index 34812d6..04cf2e3 100644 --- a/JGProgressHUD.podspec +++ b/JGProgressHUD.podspec @@ -1,14 +1,14 @@ Pod::Spec.new do |s| s.name = "JGProgressHUD" - s.version = "1.3.5" + s.version = "1.3.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, "6.0" - s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.3.5" } + s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v1.3.6" } s.source_files = "JGProgressHUD/JGProgressHUD/*.{h,m}" s.resource = "JGProgressHUD/JGProgressHUD/JGProgressHUD Resources.bundle" s.frameworks = "Foundation", "UIKit", "QuartzCore" diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD.h b/JGProgressHUD/JGProgressHUD/JGProgressHUD.h index 01be0b9..e11dc69 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUD.h +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUD.h @@ -200,7 +200,7 @@ @property (nonatomic, assign) NSTimeInterval layoutChangeAnimationDuration; /** - If the HUD is visible on screen. + @return Whether the HUD is visible on screen. */ @property (nonatomic, assign, readonly, getter = isVisible) BOOL visible; diff --git a/JGProgressHUD/JGProgressHUD/JGProgressHUD.m b/JGProgressHUD/JGProgressHUD/JGProgressHUD.m index 059b08f..d453800 100755 --- a/JGProgressHUD/JGProgressHUD/JGProgressHUD.m +++ b/JGProgressHUD/JGProgressHUD/JGProgressHUD.m @@ -48,13 +48,18 @@ @interface JGProgressHUD () { BOOL _dismissAfterTransitionFinished; BOOL _dismissAfterTransitionFinishedWithAnimation; + BOOL _observeTraitCollectionChange; + BOOL _presentingFull; + CFAbsoluteTime _displayTimestamp; JGProgressHUDIndicatorView *_indicatorViewAfterTransitioning; - UIView *_HUDViewHost; + UIView *_hostForActualHUDView; } +@property (nonatomic, strong, readonly) UIView *actualHUDView; + @end @interface JGProgressHUDAnimation (Private) @@ -66,6 +71,7 @@ @interface JGProgressHUDAnimation (Private) @implementation JGProgressHUD @synthesize HUDView = _HUDView; +@synthesize actualHUDView = _actualHUDView; @synthesize textLabel = _textLabel; @synthesize detailTextLabel = _detailTextLabel; @synthesize indicatorView = _indicatorView; @@ -118,6 +124,7 @@ - (instancetype)initWithStyle:(JGProgressHUDStyle)style { if (self) { _style = style; _voiceOverEnabled = YES; + _observeTraitCollectionChange = NO; self.hidden = YES; self.backgroundColor = [UIColor clearColor]; @@ -131,11 +138,15 @@ - (instancetype)initWithStyle:(JGProgressHUDStyle)style { _indicatorView = [[JGProgressHUDIndeterminateIndicatorView alloc] initWithHUDStyle:self.style]; - _HUDViewHost = [[UIView alloc] init]; - _HUDViewHost.backgroundColor = [UIColor clearColor]; - _HUDViewHost.clipsToBounds = YES; + _HUDView = [[UIView alloc] init]; + _HUDView.backgroundColor = [UIColor clearColor]; + + _hostForActualHUDView = [[UIView alloc] init]; + _hostForActualHUDView.backgroundColor = [UIColor clearColor]; + _hostForActualHUDView.clipsToBounds = YES; - [self addSubview:_HUDViewHost]; + [_HUDView addSubview:_hostForActualHUDView]; + [self addSubview:_HUDView]; self.cornerRadius = 10.0f; } @@ -205,8 +216,9 @@ - (void)setHUDViewFrameCenterWithSize:(CGSize)size { break; } - _HUDViewHost.frame = JGProgressHUD_CGRectIntegral(frame); - self.HUDView.frame = _HUDViewHost.bounds; + _HUDView.frame = JGProgressHUD_CGRectIntegral(frame); + _hostForActualHUDView.frame = _HUDView.bounds; + self.actualHUDView.frame = _hostForActualHUDView.bounds; } - (void)updateHUDAnimated:(BOOL)animated animateIndicatorViewFrame:(BOOL)animateIndicator { @@ -334,7 +346,23 @@ - (CGRect)fullFrameInView:(UIView *)view { } - (void)applyCornerRadius { - _HUDViewHost.layer.cornerRadius = self.cornerRadius; + _HUDView.layer.cornerRadius = self.cornerRadius; + _hostForActualHUDView.layer.cornerRadius = self.cornerRadius; +} + +- (void)traitCollectionDidChange:(__unused UITraitCollection *)previousTraitCollection { + if (_presentingFull && _observeTraitCollectionChange) { + [self updateFrame]; + } +} + +- (void)updateFrame { + if (self.targetView && !CGRectEqualToRect(self.bounds, self.targetView.bounds)) { + [UIView animateWithDuration:(iPad ? 0.4 : 0.3) delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{ + self.frame = [self fullFrameInView:self.targetView]; + [self updateHUDAnimated:NO animateIndicatorViewFrame:YES]; + } completion:nil]; + } } #pragma mark - Showing @@ -377,6 +405,8 @@ - (void)showInView:(UIView *)view { - (void)showInView:(UIView *)view animated:(BOOL)animated { CGRect frame = [self fullFrameInView:view]; + _presentingFull = YES; + // !!!: Use UIApplicationDidChangeStatusBarFrameNotification since UIDeviceOrientationDidChangeNotification still gives the old bounds in orientationChanged selector for self.targetView on iPad unless it is called after a delay. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged) name:UIApplicationDidChangeStatusBarFrameNotification object:nil]; @@ -409,6 +439,7 @@ - (void)showInRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated { [self updateHUDAnimated:NO animateIndicatorViewFrame:YES]; _transitioning = YES; + _observeTraitCollectionChange = YES; _displayTimestamp = CFAbsoluteTimeGetCurrent(); @@ -432,9 +463,11 @@ - (void)cleanUpAfterDismissal { [self removeObservers]; + _presentingFull = NO; _transitioning = NO; _dismissAfterTransitionFinished = NO; _dismissAfterTransitionFinishedWithAnimation = NO; + _observeTraitCollectionChange = NO; if ([self.delegate respondsToSelector:@selector(progressHUD:didDismissFromView:)]) { [self.delegate progressHUD:self didDismissFromView:self.targetView]; @@ -542,12 +575,7 @@ - (void)keyboardFrameChanged:(NSNotification *)notification { } - (void)orientationChanged { - if (self.targetView && !CGRectEqualToRect(self.bounds, self.targetView.bounds)) { - [UIView animateWithDuration:(iPad ? 0.4 : 0.3) delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{ - self.frame = [self fullFrameInView:self.targetView]; - [self updateHUDAnimated:NO animateIndicatorViewFrame:YES]; - } completion:nil]; - } + [self updateFrame]; } - (void)updateMotionOnHUDView { @@ -555,14 +583,14 @@ - (void)updateMotionOnHUDView { BOOL reduceMotionEnabled = (iOS8 && UIAccessibilityIsReduceMotionEnabled()); BOOL wantsParallax = ((self.parallaxMode == JGProgressHUDParallaxModeDevice && !reduceMotionEnabled) || self.parallaxMode == JGProgressHUDParallaxModeAlwaysOn); - BOOL hasParallax = (_HUDViewHost.motionEffects.count > 0); + BOOL hasParallax = (_HUDView.motionEffects.count > 0); if (wantsParallax == hasParallax) { return; } if (!wantsParallax) { - _HUDViewHost.motionEffects = @[]; + _HUDView.motionEffects = @[]; } else { UIInterpolatingMotionEffect *x = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; @@ -577,7 +605,7 @@ - (void)updateMotionOnHUDView { y.minimumRelativeValue = @(-maxMovement); y.maximumRelativeValue = @(maxMovement); - _HUDViewHost.motionEffects = @[x, y]; + _HUDView.motionEffects = @[x, y]; } } } @@ -597,8 +625,8 @@ - (BOOL)isVisible { return (self.superview != nil); } -- (UIView *)HUDView { - if (!_HUDView) { +- (UIView *)actualHUDView { + if (!_actualHUDView) { if (iOS8) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateMotionOnHUDView) name:UIAccessibilityReduceMotionStatusDidChangeNotification object:nil]; @@ -616,25 +644,25 @@ - (UIView *)HUDView { UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:effect]; - _HUDView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + _actualHUDView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; } else { - _HUDView = [[UIView alloc] init]; + _actualHUDView = [[UIView alloc] init]; if (self.style == JGProgressHUDStyleDark) { - _HUDView.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.8f]; + _actualHUDView.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.8f]; } else if (self.style == JGProgressHUDStyleLight) { - _HUDView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.75f]; + _actualHUDView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.75f]; } else { - _HUDView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.95f]; + _actualHUDView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.95f]; } } [self updateMotionOnHUDView]; - [_HUDViewHost addSubview:_HUDView]; + [_hostForActualHUDView addSubview:_actualHUDView]; if (self.indicatorView) { [self.contentView addSubview:self.indicatorView]; @@ -643,15 +671,15 @@ - (UIView *)HUDView { [self.contentView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)]]; } - return _HUDView; + return _actualHUDView; } - (UIView *)contentView { if (iOS8) { - return ((UIVisualEffectView *)self.HUDView).contentView; + return ((UIVisualEffectView *)self.actualHUDView).contentView; } else { - return self.HUDView; + return self.actualHUDView; } }