├── .gitignore ├── .travis.yml ├── Example ├── FFGlobalAlertController.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── FFGlobalAlertController-Example.xcscheme ├── FFGlobalAlertController │ ├── FFAppDelegate.h │ ├── FFAppDelegate.m │ ├── FFGlobalAlertController-Info.plist │ ├── FFGlobalAlertController-Prefix.pch │ ├── FFViewController.h │ ├── FFViewController.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Main.storyboard │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── FFGlobalAlertController.podspec ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── UIAlertController+Window.h │ └── UIAlertController+Window.m ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | install: 12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 13 | script: 14 | - set -o pipefail && xcodebuild test -workspace Example/FFGlobalAlertController.xcworkspace -scheme FFGlobalAlertController-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c 15 | - pod lib lint --quick 16 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5B374FE7341B7158A422BD1E /* Pods_FFGlobalAlertController_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51078F7C3B9072ADEDB0CDE3 /* Pods_FFGlobalAlertController_Example.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* FFAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* FFAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* FFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* FFViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 7BE83D2525E2A8FFE161A222 /* Pods_FFGlobalAlertController_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34C52F5BE39515C2299FAA68 /* Pods_FFGlobalAlertController_Tests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 25 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 6003F582195388D10070C39A /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 6003F589195388D20070C39A; 34 | remoteInfo = FFGlobalAlertController; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1E5A2849DA2FE6312AB1E5AB /* Pods-FFGlobalAlertController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FFGlobalAlertController_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-FFGlobalAlertController_Example/Pods-FFGlobalAlertController_Example.release.xcconfig"; sourceTree = ""; }; 40 | 1F52B25145CE773CBC3C31CE /* Pods-FFGlobalAlertController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FFGlobalAlertController_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FFGlobalAlertController_Example/Pods-FFGlobalAlertController_Example.debug.xcconfig"; sourceTree = ""; }; 41 | 2E16685AABD84FF6D002FFA2 /* Pods-FFGlobalAlertController_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FFGlobalAlertController_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FFGlobalAlertController_Tests/Pods-FFGlobalAlertController_Tests.debug.xcconfig"; sourceTree = ""; }; 42 | 34C52F5BE39515C2299FAA68 /* Pods_FFGlobalAlertController_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FFGlobalAlertController_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 51078F7C3B9072ADEDB0CDE3 /* Pods_FFGlobalAlertController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FFGlobalAlertController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 6003F58A195388D20070C39A /* FFGlobalAlertController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = FFGlobalAlertController.app; path = FFGlobalAlertController_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 6003F595195388D20070C39A /* FFGlobalAlertController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FFGlobalAlertController-Info.plist"; sourceTree = ""; }; 49 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 50 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 6003F59B195388D20070C39A /* FFGlobalAlertController-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FFGlobalAlertController-Prefix.pch"; sourceTree = ""; }; 52 | 6003F59C195388D20070C39A /* FFAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FFAppDelegate.h; sourceTree = ""; }; 53 | 6003F59D195388D20070C39A /* FFAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFAppDelegate.m; sourceTree = ""; }; 54 | 6003F5A5195388D20070C39A /* FFViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FFViewController.h; sourceTree = ""; }; 55 | 6003F5A6195388D20070C39A /* FFViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFViewController.m; sourceTree = ""; }; 56 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 57 | 6003F5AE195388D20070C39A /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = Tests.xctest; path = FFGlobalAlertController_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 63 | 7B9A7761A4B05B459D0C7C76 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 64 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 65 | B110CA8AD7491232A3AB3CB8 /* Pods-FFGlobalAlertController_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FFGlobalAlertController_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FFGlobalAlertController_Tests/Pods-FFGlobalAlertController_Tests.release.xcconfig"; sourceTree = ""; }; 66 | CCB35E1E3C5425633B5961E6 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 67 | E1799243C9EF1525784F826A /* FFGlobalAlertController.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = FFGlobalAlertController.podspec; path = ../FFGlobalAlertController.podspec; sourceTree = ""; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 6003F587195388D20070C39A /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 76 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 77 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 78 | 5B374FE7341B7158A422BD1E /* Pods_FFGlobalAlertController_Example.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | 6003F5AB195388D20070C39A /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 87 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 88 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 89 | 7BE83D2525E2A8FFE161A222 /* Pods_FFGlobalAlertController_Tests.framework in Frameworks */, 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 541304C744E9E94DE4444D29 /* Pods */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 1F52B25145CE773CBC3C31CE /* Pods-FFGlobalAlertController_Example.debug.xcconfig */, 100 | 1E5A2849DA2FE6312AB1E5AB /* Pods-FFGlobalAlertController_Example.release.xcconfig */, 101 | 2E16685AABD84FF6D002FFA2 /* Pods-FFGlobalAlertController_Tests.debug.xcconfig */, 102 | B110CA8AD7491232A3AB3CB8 /* Pods-FFGlobalAlertController_Tests.release.xcconfig */, 103 | ); 104 | name = Pods; 105 | sourceTree = ""; 106 | }; 107 | 6003F581195388D10070C39A = { 108 | isa = PBXGroup; 109 | children = ( 110 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 111 | 6003F593195388D20070C39A /* Example for FFGlobalAlertController */, 112 | 6003F5B5195388D20070C39A /* Tests */, 113 | 6003F58C195388D20070C39A /* Frameworks */, 114 | 6003F58B195388D20070C39A /* Products */, 115 | 541304C744E9E94DE4444D29 /* Pods */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | 6003F58B195388D20070C39A /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6003F58A195388D20070C39A /* FFGlobalAlertController.app */, 123 | 6003F5AE195388D20070C39A /* Tests.xctest */, 124 | ); 125 | name = Products; 126 | sourceTree = ""; 127 | }; 128 | 6003F58C195388D20070C39A /* Frameworks */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 6003F58D195388D20070C39A /* Foundation.framework */, 132 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 133 | 6003F591195388D20070C39A /* UIKit.framework */, 134 | 6003F5AF195388D20070C39A /* XCTest.framework */, 135 | 51078F7C3B9072ADEDB0CDE3 /* Pods_FFGlobalAlertController_Example.framework */, 136 | 34C52F5BE39515C2299FAA68 /* Pods_FFGlobalAlertController_Tests.framework */, 137 | ); 138 | name = Frameworks; 139 | sourceTree = ""; 140 | }; 141 | 6003F593195388D20070C39A /* Example for FFGlobalAlertController */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 6003F59C195388D20070C39A /* FFAppDelegate.h */, 145 | 6003F59D195388D20070C39A /* FFAppDelegate.m */, 146 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 147 | 6003F5A5195388D20070C39A /* FFViewController.h */, 148 | 6003F5A6195388D20070C39A /* FFViewController.m */, 149 | 6003F5A8195388D20070C39A /* Images.xcassets */, 150 | 6003F594195388D20070C39A /* Supporting Files */, 151 | ); 152 | name = "Example for FFGlobalAlertController"; 153 | path = FFGlobalAlertController; 154 | sourceTree = ""; 155 | }; 156 | 6003F594195388D20070C39A /* Supporting Files */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 6003F595195388D20070C39A /* FFGlobalAlertController-Info.plist */, 160 | 6003F596195388D20070C39A /* InfoPlist.strings */, 161 | 6003F599195388D20070C39A /* main.m */, 162 | 6003F59B195388D20070C39A /* FFGlobalAlertController-Prefix.pch */, 163 | ); 164 | name = "Supporting Files"; 165 | sourceTree = ""; 166 | }; 167 | 6003F5B5195388D20070C39A /* Tests */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 6003F5BB195388D20070C39A /* Tests.m */, 171 | 6003F5B6195388D20070C39A /* Supporting Files */, 172 | ); 173 | path = Tests; 174 | sourceTree = ""; 175 | }; 176 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 180 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 181 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 182 | ); 183 | name = "Supporting Files"; 184 | sourceTree = ""; 185 | }; 186 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | E1799243C9EF1525784F826A /* FFGlobalAlertController.podspec */, 190 | 7B9A7761A4B05B459D0C7C76 /* README.md */, 191 | CCB35E1E3C5425633B5961E6 /* LICENSE */, 192 | ); 193 | name = "Podspec Metadata"; 194 | sourceTree = ""; 195 | }; 196 | /* End PBXGroup section */ 197 | 198 | /* Begin PBXNativeTarget section */ 199 | 6003F589195388D20070C39A /* FFGlobalAlertController_Example */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "FFGlobalAlertController_Example" */; 202 | buildPhases = ( 203 | 6E1BA7411AE25C6F7508CF75 /* Check Pods Manifest.lock */, 204 | 6003F586195388D20070C39A /* Sources */, 205 | 6003F587195388D20070C39A /* Frameworks */, 206 | 6003F588195388D20070C39A /* Resources */, 207 | 52E0382795ADF00C0D54C44C /* Embed Pods Frameworks */, 208 | 236AA8163CDB24AFEB9CE9F2 /* Copy Pods Resources */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | ); 214 | name = FFGlobalAlertController_Example; 215 | productName = FFGlobalAlertController; 216 | productReference = 6003F58A195388D20070C39A /* FFGlobalAlertController.app */; 217 | productType = "com.apple.product-type.application"; 218 | }; 219 | 6003F5AD195388D20070C39A /* FFGlobalAlertController_Tests */ = { 220 | isa = PBXNativeTarget; 221 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "FFGlobalAlertController_Tests" */; 222 | buildPhases = ( 223 | 83C544476EC62822EAD02596 /* Check Pods Manifest.lock */, 224 | 6003F5AA195388D20070C39A /* Sources */, 225 | 6003F5AB195388D20070C39A /* Frameworks */, 226 | 6003F5AC195388D20070C39A /* Resources */, 227 | 3CEC5D846EE3F46AA9502520 /* Embed Pods Frameworks */, 228 | 9939D9A2B386C51E4AB9FE13 /* Copy Pods Resources */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 234 | ); 235 | name = FFGlobalAlertController_Tests; 236 | productName = FFGlobalAlertControllerTests; 237 | productReference = 6003F5AE195388D20070C39A /* Tests.xctest */; 238 | productType = "com.apple.product-type.bundle.unit-test"; 239 | }; 240 | /* End PBXNativeTarget section */ 241 | 242 | /* Begin PBXProject section */ 243 | 6003F582195388D10070C39A /* Project object */ = { 244 | isa = PBXProject; 245 | attributes = { 246 | CLASSPREFIX = FF; 247 | LastUpgradeCheck = 0510; 248 | ORGANIZATIONNAME = "Eric Larson"; 249 | TargetAttributes = { 250 | 6003F5AD195388D20070C39A = { 251 | TestTargetID = 6003F589195388D20070C39A; 252 | }; 253 | }; 254 | }; 255 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "FFGlobalAlertController" */; 256 | compatibilityVersion = "Xcode 3.2"; 257 | developmentRegion = English; 258 | hasScannedForEncodings = 0; 259 | knownRegions = ( 260 | en, 261 | Base, 262 | ); 263 | mainGroup = 6003F581195388D10070C39A; 264 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 265 | projectDirPath = ""; 266 | projectRoot = ""; 267 | targets = ( 268 | 6003F589195388D20070C39A /* FFGlobalAlertController_Example */, 269 | 6003F5AD195388D20070C39A /* FFGlobalAlertController_Tests */, 270 | ); 271 | }; 272 | /* End PBXProject section */ 273 | 274 | /* Begin PBXResourcesBuildPhase section */ 275 | 6003F588195388D20070C39A /* Resources */ = { 276 | isa = PBXResourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 280 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 281 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | 6003F5AC195388D20070C39A /* Resources */ = { 286 | isa = PBXResourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | /* End PBXResourcesBuildPhase section */ 294 | 295 | /* Begin PBXShellScriptBuildPhase section */ 296 | 236AA8163CDB24AFEB9CE9F2 /* Copy Pods Resources */ = { 297 | isa = PBXShellScriptBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | inputPaths = ( 302 | ); 303 | name = "Copy Pods Resources"; 304 | outputPaths = ( 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | shellPath = /bin/sh; 308 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FFGlobalAlertController_Example/Pods-FFGlobalAlertController_Example-resources.sh\"\n"; 309 | showEnvVarsInLog = 0; 310 | }; 311 | 3CEC5D846EE3F46AA9502520 /* Embed Pods Frameworks */ = { 312 | isa = PBXShellScriptBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | inputPaths = ( 317 | ); 318 | name = "Embed Pods Frameworks"; 319 | outputPaths = ( 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | shellPath = /bin/sh; 323 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FFGlobalAlertController_Tests/Pods-FFGlobalAlertController_Tests-frameworks.sh\"\n"; 324 | showEnvVarsInLog = 0; 325 | }; 326 | 52E0382795ADF00C0D54C44C /* Embed Pods Frameworks */ = { 327 | isa = PBXShellScriptBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | ); 331 | inputPaths = ( 332 | ); 333 | name = "Embed Pods Frameworks"; 334 | outputPaths = ( 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | shellPath = /bin/sh; 338 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FFGlobalAlertController_Example/Pods-FFGlobalAlertController_Example-frameworks.sh\"\n"; 339 | showEnvVarsInLog = 0; 340 | }; 341 | 6E1BA7411AE25C6F7508CF75 /* Check Pods Manifest.lock */ = { 342 | isa = PBXShellScriptBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | ); 346 | inputPaths = ( 347 | ); 348 | name = "Check Pods Manifest.lock"; 349 | outputPaths = ( 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | shellPath = /bin/sh; 353 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 354 | showEnvVarsInLog = 0; 355 | }; 356 | 83C544476EC62822EAD02596 /* Check Pods Manifest.lock */ = { 357 | isa = PBXShellScriptBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | ); 361 | inputPaths = ( 362 | ); 363 | name = "Check Pods Manifest.lock"; 364 | outputPaths = ( 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | shellPath = /bin/sh; 368 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 369 | showEnvVarsInLog = 0; 370 | }; 371 | 9939D9A2B386C51E4AB9FE13 /* Copy Pods Resources */ = { 372 | isa = PBXShellScriptBuildPhase; 373 | buildActionMask = 2147483647; 374 | files = ( 375 | ); 376 | inputPaths = ( 377 | ); 378 | name = "Copy Pods Resources"; 379 | outputPaths = ( 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | shellPath = /bin/sh; 383 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FFGlobalAlertController_Tests/Pods-FFGlobalAlertController_Tests-resources.sh\"\n"; 384 | showEnvVarsInLog = 0; 385 | }; 386 | /* End PBXShellScriptBuildPhase section */ 387 | 388 | /* Begin PBXSourcesBuildPhase section */ 389 | 6003F586195388D20070C39A /* Sources */ = { 390 | isa = PBXSourcesBuildPhase; 391 | buildActionMask = 2147483647; 392 | files = ( 393 | 6003F59E195388D20070C39A /* FFAppDelegate.m in Sources */, 394 | 6003F5A7195388D20070C39A /* FFViewController.m in Sources */, 395 | 6003F59A195388D20070C39A /* main.m in Sources */, 396 | ); 397 | runOnlyForDeploymentPostprocessing = 0; 398 | }; 399 | 6003F5AA195388D20070C39A /* Sources */ = { 400 | isa = PBXSourcesBuildPhase; 401 | buildActionMask = 2147483647; 402 | files = ( 403 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 404 | ); 405 | runOnlyForDeploymentPostprocessing = 0; 406 | }; 407 | /* End PBXSourcesBuildPhase section */ 408 | 409 | /* Begin PBXTargetDependency section */ 410 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 411 | isa = PBXTargetDependency; 412 | target = 6003F589195388D20070C39A /* FFGlobalAlertController_Example */; 413 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 414 | }; 415 | /* End PBXTargetDependency section */ 416 | 417 | /* Begin PBXVariantGroup section */ 418 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 419 | isa = PBXVariantGroup; 420 | children = ( 421 | 6003F597195388D20070C39A /* en */, 422 | ); 423 | name = InfoPlist.strings; 424 | sourceTree = ""; 425 | }; 426 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 427 | isa = PBXVariantGroup; 428 | children = ( 429 | 6003F5B9195388D20070C39A /* en */, 430 | ); 431 | name = InfoPlist.strings; 432 | sourceTree = ""; 433 | }; 434 | /* End PBXVariantGroup section */ 435 | 436 | /* Begin XCBuildConfiguration section */ 437 | 6003F5BD195388D20070C39A /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 442 | CLANG_CXX_LIBRARY = "libc++"; 443 | CLANG_ENABLE_MODULES = YES; 444 | CLANG_ENABLE_OBJC_ARC = YES; 445 | CLANG_WARN_BOOL_CONVERSION = YES; 446 | CLANG_WARN_CONSTANT_CONVERSION = YES; 447 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 448 | CLANG_WARN_EMPTY_BODY = YES; 449 | CLANG_WARN_ENUM_CONVERSION = YES; 450 | CLANG_WARN_INT_CONVERSION = YES; 451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 454 | COPY_PHASE_STRIP = NO; 455 | GCC_C_LANGUAGE_STANDARD = gnu99; 456 | GCC_DYNAMIC_NO_PIC = NO; 457 | GCC_OPTIMIZATION_LEVEL = 0; 458 | GCC_PREPROCESSOR_DEFINITIONS = ( 459 | "DEBUG=1", 460 | "$(inherited)", 461 | ); 462 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 465 | GCC_WARN_UNDECLARED_SELECTOR = YES; 466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 467 | GCC_WARN_UNUSED_FUNCTION = YES; 468 | GCC_WARN_UNUSED_VARIABLE = YES; 469 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 470 | ONLY_ACTIVE_ARCH = YES; 471 | SDKROOT = iphoneos; 472 | TARGETED_DEVICE_FAMILY = "1,2"; 473 | }; 474 | name = Debug; 475 | }; 476 | 6003F5BE195388D20070C39A /* Release */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | ALWAYS_SEARCH_USER_PATHS = NO; 480 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 481 | CLANG_CXX_LIBRARY = "libc++"; 482 | CLANG_ENABLE_MODULES = YES; 483 | CLANG_ENABLE_OBJC_ARC = YES; 484 | CLANG_WARN_BOOL_CONVERSION = YES; 485 | CLANG_WARN_CONSTANT_CONVERSION = YES; 486 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 487 | CLANG_WARN_EMPTY_BODY = YES; 488 | CLANG_WARN_ENUM_CONVERSION = YES; 489 | CLANG_WARN_INT_CONVERSION = YES; 490 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 491 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 492 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 493 | COPY_PHASE_STRIP = YES; 494 | ENABLE_NS_ASSERTIONS = NO; 495 | GCC_C_LANGUAGE_STANDARD = gnu99; 496 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 497 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 498 | GCC_WARN_UNDECLARED_SELECTOR = YES; 499 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 500 | GCC_WARN_UNUSED_FUNCTION = YES; 501 | GCC_WARN_UNUSED_VARIABLE = YES; 502 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 503 | SDKROOT = iphoneos; 504 | TARGETED_DEVICE_FAMILY = "1,2"; 505 | VALIDATE_PRODUCT = YES; 506 | }; 507 | name = Release; 508 | }; 509 | 6003F5C0195388D20070C39A /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | baseConfigurationReference = 1F52B25145CE773CBC3C31CE /* Pods-FFGlobalAlertController_Example.debug.xcconfig */; 512 | buildSettings = { 513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 514 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 515 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 516 | GCC_PREFIX_HEADER = "FFGlobalAlertController/FFGlobalAlertController-Prefix.pch"; 517 | INFOPLIST_FILE = "FFGlobalAlertController/FFGlobalAlertController-Info.plist"; 518 | MODULE_NAME = ExampleApp; 519 | PRODUCT_NAME = "$(TARGET_NAME)"; 520 | WRAPPER_EXTENSION = app; 521 | }; 522 | name = Debug; 523 | }; 524 | 6003F5C1195388D20070C39A /* Release */ = { 525 | isa = XCBuildConfiguration; 526 | baseConfigurationReference = 1E5A2849DA2FE6312AB1E5AB /* Pods-FFGlobalAlertController_Example.release.xcconfig */; 527 | buildSettings = { 528 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 529 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 530 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 531 | GCC_PREFIX_HEADER = "FFGlobalAlertController/FFGlobalAlertController-Prefix.pch"; 532 | INFOPLIST_FILE = "FFGlobalAlertController/FFGlobalAlertController-Info.plist"; 533 | MODULE_NAME = ExampleApp; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | WRAPPER_EXTENSION = app; 536 | }; 537 | name = Release; 538 | }; 539 | 6003F5C3195388D20070C39A /* Debug */ = { 540 | isa = XCBuildConfiguration; 541 | baseConfigurationReference = 2E16685AABD84FF6D002FFA2 /* Pods-FFGlobalAlertController_Tests.debug.xcconfig */; 542 | buildSettings = { 543 | BUNDLE_LOADER = "$(TEST_HOST)"; 544 | FRAMEWORK_SEARCH_PATHS = ( 545 | "$(SDKROOT)/Developer/Library/Frameworks", 546 | "$(inherited)", 547 | "$(DEVELOPER_FRAMEWORKS_DIR)", 548 | ); 549 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 550 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 551 | GCC_PREPROCESSOR_DEFINITIONS = ( 552 | "DEBUG=1", 553 | "$(inherited)", 554 | ); 555 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FFGlobalAlertController_Example.app/FFGlobalAlertController_Example"; 558 | WRAPPER_EXTENSION = xctest; 559 | }; 560 | name = Debug; 561 | }; 562 | 6003F5C4195388D20070C39A /* Release */ = { 563 | isa = XCBuildConfiguration; 564 | baseConfigurationReference = B110CA8AD7491232A3AB3CB8 /* Pods-FFGlobalAlertController_Tests.release.xcconfig */; 565 | buildSettings = { 566 | BUNDLE_LOADER = "$(TEST_HOST)"; 567 | FRAMEWORK_SEARCH_PATHS = ( 568 | "$(SDKROOT)/Developer/Library/Frameworks", 569 | "$(inherited)", 570 | "$(DEVELOPER_FRAMEWORKS_DIR)", 571 | ); 572 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 573 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 574 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 575 | PRODUCT_NAME = "$(TARGET_NAME)"; 576 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FFGlobalAlertController_Example.app/FFGlobalAlertController_Example"; 577 | WRAPPER_EXTENSION = xctest; 578 | }; 579 | name = Release; 580 | }; 581 | /* End XCBuildConfiguration section */ 582 | 583 | /* Begin XCConfigurationList section */ 584 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "FFGlobalAlertController" */ = { 585 | isa = XCConfigurationList; 586 | buildConfigurations = ( 587 | 6003F5BD195388D20070C39A /* Debug */, 588 | 6003F5BE195388D20070C39A /* Release */, 589 | ); 590 | defaultConfigurationIsVisible = 0; 591 | defaultConfigurationName = Release; 592 | }; 593 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "FFGlobalAlertController_Example" */ = { 594 | isa = XCConfigurationList; 595 | buildConfigurations = ( 596 | 6003F5C0195388D20070C39A /* Debug */, 597 | 6003F5C1195388D20070C39A /* Release */, 598 | ); 599 | defaultConfigurationIsVisible = 0; 600 | defaultConfigurationName = Release; 601 | }; 602 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "FFGlobalAlertController_Tests" */ = { 603 | isa = XCConfigurationList; 604 | buildConfigurations = ( 605 | 6003F5C3195388D20070C39A /* Debug */, 606 | 6003F5C4195388D20070C39A /* Release */, 607 | ); 608 | defaultConfigurationIsVisible = 0; 609 | defaultConfigurationName = Release; 610 | }; 611 | /* End XCConfigurationList section */ 612 | }; 613 | rootObject = 6003F582195388D10070C39A /* Project object */; 614 | } 615 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController.xcodeproj/xcshareddata/xcschemes/FFGlobalAlertController-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // FFAppDelegate.h 3 | // FFGlobalAlertController 4 | // 5 | // Created by CocoaPods on 06/18/2015. 6 | // Copyright (c) 2014 Eric Larson. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface FFAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // FFAppDelegate.m 3 | // FFGlobalAlertController 4 | // 5 | // Created by CocoaPods on 06/18/2015. 6 | // Copyright (c) 2014 Eric Larson. All rights reserved. 7 | // 8 | 9 | #import "FFAppDelegate.h" 10 | 11 | @implementation FFAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFGlobalAlertController-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFGlobalAlertController-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FFViewController.h 3 | // FFGlobalAlertController 4 | // 5 | // Created by Eric Larson on 06/18/2015. 6 | // Copyright (c) 2015 ForeFlight. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface FFViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/FFViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FFViewController.m 3 | // FFGlobalAlertController 4 | // 5 | // Created by Eric Larson on 06/18/2015. 6 | // Copyright (c) 2015 ForeFlight. All rights reserved. 7 | // 8 | 9 | #import "FFViewController.h" 10 | #import "UIAlertController+Window.h" 11 | 12 | @interface FFViewController () 13 | 14 | @end 15 | 16 | @implementation FFViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | } 22 | 23 | - (IBAction)showAlert:(id)sender 24 | { 25 | static NSInteger alertCount = 1; 26 | 27 | NSString *message = [NSString stringWithFormat:@"This is your alert, you've show %ld alerts", (long)alertCount]; 28 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Global Alert" message:message preferredStyle:UIAlertControllerStyleAlert]; 29 | [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; 30 | [alert show]; 31 | alertCount++; 32 | 33 | // show a second Alert to simulate an Alert coming in from an unrelated part of your project 34 | if (alertCount % 2 == 0) { 35 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 36 | [self showAlert:nil]; 37 | }); 38 | } 39 | } 40 | 41 | - (IBAction)showAlertField:(id)sender 42 | { 43 | // need local variable for TextField to prevent retain cycle of Alert otherwise UIWindow 44 | // would not disappear after the Alert was dismissed 45 | __block UITextField *localTextField; 46 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Global Alert" message:@"Enter some text" preferredStyle:UIAlertControllerStyleAlert]; 47 | [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 48 | NSLog(@"do something with text:%@", localTextField.text); 49 | }]]; 50 | [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) { 51 | localTextField = textField; 52 | }]; 53 | [alert show]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 35 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/FFGlobalAlertController/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FFGlobalAlertController 4 | // 5 | // Created by Eric Larson on 06/18/2015. 6 | // Copyright (c) 2014 Eric Larson. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "FFAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([FFAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | use_frameworks! 3 | 4 | target 'FFGlobalAlertController_Example', :exclusive => true do 5 | pod "FFGlobalAlertController", :path => "../" 6 | end 7 | 8 | target 'FFGlobalAlertController_Tests', :exclusive => true do 9 | pod "FFGlobalAlertController", :path => "../" 10 | 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FFGlobalAlertControllerTests.m 3 | // FFGlobalAlertControllerTests 4 | // 5 | // Created by Eric Larson on 06/18/2015. 6 | // Copyright (c) 2015 Eric Larson. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /FFGlobalAlertController.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint FFGlobalAlertController.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "FFGlobalAlertController" 12 | s.version = "1.0.2" 13 | s.summary = "FFGlobalAlertController is a Category on UIAlertController that provides global show method in a second UIWindow." 14 | s.description = <<-DESC 15 | Provides a Show method that creates a UIWindow with a transparent UIViewController and presents the UIAlertController on it. 16 | Useful for something like networking code that needs to show an Alert but has no idea what the current view controllers on screen. 17 | DESC 18 | s.homepage = "https://github.com/agilityvision/FFGlobalAlertController" 19 | s.license = 'MIT' 20 | s.author = { "Eric Larson" => "eric@agilityvision.com" } 21 | s.source = { :git => "https://github.com/agilityvision/FFGlobalAlertController.git", :tag => s.version.to_s } 22 | s.social_media_url = 'https://twitter.com/agilityvision' 23 | 24 | s.platform = :ios, '8.0' 25 | s.requires_arc = true 26 | 27 | s.source_files = 'Pod/Classes/**/*' 28 | s.resource_bundles = { 29 | 'FFGlobalAlertController' => ['Pod/Assets/*.png'] 30 | } 31 | 32 | # s.public_header_files = 'Pod/Classes/**/*.h' 33 | s.frameworks = 'UIKit' 34 | end 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Eric Larson 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. 20 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilityvision/FFGlobalAlertController/ee69d96acfa2c788e48c4ea9162b208735fad11e/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agilityvision/FFGlobalAlertController/ee69d96acfa2c788e48c4ea9162b208735fad11e/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/UIAlertController+Window.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertController+Window.h 3 | // FFM 4 | // 5 | // Created by Eric Larson on 6/17/15. 6 | // Copyright (c) 2015 ForeFlight, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIAlertController (Window) 12 | 13 | - (void)show; 14 | - (void)show:(BOOL)animated; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Pod/Classes/UIAlertController+Window.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertController+Window.m 3 | // FFM 4 | // 5 | // Created by Eric Larson on 6/17/15. 6 | // Copyright (c) 2015 ForeFlight, LLC. All rights reserved. 7 | // 8 | 9 | #import "UIAlertController+Window.h" 10 | #import 11 | 12 | @interface UIAlertController (Private) 13 | 14 | @property (nonatomic, strong) UIWindow *alertWindow; 15 | 16 | @end 17 | 18 | @implementation UIAlertController (Private) 19 | 20 | @dynamic alertWindow; 21 | 22 | - (void)setAlertWindow:(UIWindow *)alertWindow { 23 | objc_setAssociatedObject(self, @selector(alertWindow), alertWindow, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 24 | } 25 | 26 | - (UIWindow *)alertWindow { 27 | return objc_getAssociatedObject(self, @selector(alertWindow)); 28 | } 29 | 30 | @end 31 | 32 | @implementation UIAlertController (Window) 33 | 34 | - (void)show { 35 | [self show:YES]; 36 | } 37 | 38 | - (void)show:(BOOL)animated { 39 | self.alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 40 | self.alertWindow.rootViewController = [[UIViewController alloc] init]; 41 | self.alertWindow.windowLevel = UIWindowLevelAlert + 1; 42 | [self.alertWindow makeKeyAndVisible]; 43 | [self.alertWindow.rootViewController presentViewController:self animated:animated completion:nil]; 44 | } 45 | 46 | - (void)viewDidDisappear:(BOOL)animated { 47 | [super viewDidDisappear:animated]; 48 | 49 | // precaution to insure window gets destroyed 50 | self.alertWindow.hidden = YES; 51 | self.alertWindow = nil; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FFGlobalAlertController 2 | 3 | [![CI Status](http://img.shields.io/travis/Eric Larson/FFGlobalAlertController.svg?style=flat)](https://travis-ci.org/Eric Larson/FFGlobalAlertController) 4 | [![Version](https://img.shields.io/cocoapods/v/FFGlobalAlertController.svg?style=flat)](http://cocoapods.org/pods/FFGlobalAlertController) 5 | [![License](https://img.shields.io/cocoapods/l/FFGlobalAlertController.svg?style=flat)](http://cocoapods.org/pods/FFGlobalAlertController) 6 | [![Platform](https://img.shields.io/cocoapods/p/FFGlobalAlertController.svg?style=flat)](http://cocoapods.org/pods/FFGlobalAlertController) 7 | 8 | ## Background 9 | 10 | We had an existing app that we replaced all the UIAlertView with the new UIAlertController in iOS 8. The key difference being you have to specify the UIViewController to present it from. When your data model or networking code or some other singleton needs to display an alert this poses a problem because they typically have no idea about the current UIViewController. Our first solution was to get the rootViewController from the app delegate and go from there. But there were too many edge cases where this didn't work. 11 | 12 | I took the opportunity at WWDC 2015 to ask an Apple engineer the best practice in this situation and he recommended displaying the UIAlertController in a UIWindow with a empty transparent ViewController. I didn't want to sublcass it because then I would have to change all my code to use the subclass. So I created this category on UIAlertController. 13 | 14 | ## Usage 15 | 16 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 17 | 18 | To display a basic UIAlertController: 19 | ```objc 20 | #import "UIAlertController+Window.h" 21 | 22 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Global Alert" message:@"The message" preferredStyle:UIAlertControllerStyleAlert]; 23 | [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; 24 | [alert show]; 25 | ``` 26 | 27 | To display a UIAlertController with a text field, you must use a local variable to reference the UITextField in the action handler, instead of referencing via the alert. Otherwise a retain cycle will be created and the UIWindow will not be dealloc and will stay on screen blocking touches. 28 | ```objc 29 | __block UITextField *localTextField; 30 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Global Alert" message:@"Enter some text" preferredStyle:UIAlertControllerStyleAlert]; 31 | [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { 32 | NSLog(@"do something with text:%@", localTextField.text); 33 | }]]; 34 | [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) { 35 | localTextField = textField; 36 | }]; 37 | [alert show]; 38 | ``` 39 | 40 | ## Requirements 41 | 42 | iOS 8 obviously since this is for UIAlertController that was introduced in iOS 8. 43 | 44 | ## Installation 45 | 46 | FFGlobalAlertController is available through [CocoaPods](http://cocoapods.org). To install 47 | it, simply add the following line to your Podfile: 48 | 49 | ```ruby 50 | pod "FFGlobalAlertController" 51 | ``` 52 | 53 | ```objc 54 | #import "UIAlertController+Window.h" 55 | ``` 56 | 57 | ## Author 58 | 59 | Eric Larson, eric@agilityvision.com 60 | 61 | ## License 62 | 63 | FFGlobalAlertController is available under the MIT license. See the LICENSE file for more info. 64 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------