├── .gitignore ├── .travis.yml ├── DemoProject_Objective-C ├── JNAPushPopCompletionBlockExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── JNAPushPopCompletionBlockExample.xcscheme ├── JNAPushPopCompletionBlockExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ ├── ViewController1.h │ ├── ViewController1.m │ ├── ViewController2.h │ ├── ViewController2.m │ ├── ViewController3.h │ ├── ViewController3.m │ ├── ViewController4.h │ ├── ViewController4.m │ ├── ViewController5.h │ ├── ViewController5.m │ └── main.m ├── JNAPushPopCompletionBlockExampleTests │ ├── Info.plist │ └── JNAPushPopCompletionBlockExampleTests.m └── JNAPushPopCompletionBlockExampleUITests │ ├── Info.plist │ └── JNAPushPopCompletionBlockExampleUITests.m ├── JNAPushPopCompletionBlock.podspec ├── JNAPushPopCompletionBlock_Objective-C ├── UINavigationController+JNAPushPopCompletionBlock.h └── UINavigationController+JNAPushPopCompletionBlock.m ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8 3 | script: 4 | - cd DemoProject_Objective-C/ 5 | - xcodebuild CODE_SIGNING_REQUIRED=NO 6 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 61D36FE81DB25F6E00A040B9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D36FE71DB25F6E00A040B9 /* main.m */; }; 11 | 61D36FEB1DB25F6E00A040B9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D36FEA1DB25F6E00A040B9 /* AppDelegate.m */; }; 12 | 61D36FEE1DB25F6E00A040B9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D36FED1DB25F6E00A040B9 /* ViewController.m */; }; 13 | 61D36FF11DB25F6E00A040B9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61D36FEF1DB25F6E00A040B9 /* Main.storyboard */; }; 14 | 61D36FF31DB25F6E00A040B9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 61D36FF21DB25F6E00A040B9 /* Assets.xcassets */; }; 15 | 61D36FF61DB25F6E00A040B9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61D36FF41DB25F6E00A040B9 /* LaunchScreen.storyboard */; }; 16 | 61D370011DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370001DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.m */; }; 17 | 61D3700C1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D3700B1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.m */; }; 18 | 61D3702A1DB2616300A040B9 /* ViewController1.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370211DB2616300A040B9 /* ViewController1.m */; }; 19 | 61D3702B1DB2616300A040B9 /* ViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370231DB2616300A040B9 /* ViewController2.m */; }; 20 | 61D3702C1DB2616300A040B9 /* ViewController3.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370251DB2616300A040B9 /* ViewController3.m */; }; 21 | 61D3702D1DB2616300A040B9 /* ViewController4.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370271DB2616300A040B9 /* ViewController4.m */; }; 22 | 61D3702E1DB2616300A040B9 /* ViewController5.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370291DB2616300A040B9 /* ViewController5.m */; }; 23 | 61D370321DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 61D370311DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 61D36FFD1DB25F6E00A040B9 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 61D36FDB1DB25F6E00A040B9 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 61D36FE21DB25F6E00A040B9; 32 | remoteInfo = JNAPushPopCompletionBlockExample; 33 | }; 34 | 61D370081DB25F6E00A040B9 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 61D36FDB1DB25F6E00A040B9 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 61D36FE21DB25F6E00A040B9; 39 | remoteInfo = JNAPushPopCompletionBlockExample; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 61D36FE31DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JNAPushPopCompletionBlockExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 61D36FE71DB25F6E00A040B9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = main.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 46 | 61D36FE91DB25F6E00A040B9 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppDelegate.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 47 | 61D36FEA1DB25F6E00A040B9 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = AppDelegate.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 48 | 61D36FEC1DB25F6E00A040B9 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 49 | 61D36FED1DB25F6E00A040B9 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 50 | 61D36FF01DB25F6E00A040B9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 61D36FF21DB25F6E00A040B9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 61D36FF51DB25F6E00A040B9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 61D36FF71DB25F6E00A040B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 61D36FFC1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JNAPushPopCompletionBlockExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 61D370001DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JNAPushPopCompletionBlockExampleTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 56 | 61D370021DB25F6E00A040B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 61D370071DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JNAPushPopCompletionBlockExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 61D3700B1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = JNAPushPopCompletionBlockExampleUITests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 59 | 61D3700D1DB25F6E00A040B9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 61D370201DB2616300A040B9 /* ViewController1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController1.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 61 | 61D370211DB2616300A040B9 /* ViewController1.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController1.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 62 | 61D370221DB2616300A040B9 /* ViewController2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController2.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 63 | 61D370231DB2616300A040B9 /* ViewController2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController2.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 64 | 61D370241DB2616300A040B9 /* ViewController3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController3.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 65 | 61D370251DB2616300A040B9 /* ViewController3.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController3.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 66 | 61D370261DB2616300A040B9 /* ViewController4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController4.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 67 | 61D370271DB2616300A040B9 /* ViewController4.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController4.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 68 | 61D370281DB2616300A040B9 /* ViewController5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ViewController5.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 69 | 61D370291DB2616300A040B9 /* ViewController5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController5.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 70 | 61D370301DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "UINavigationController+JNAPushPopCompletionBlock.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 71 | 61D370311DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "UINavigationController+JNAPushPopCompletionBlock.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 72 | /* End PBXFileReference section */ 73 | 74 | /* Begin PBXFrameworksBuildPhase section */ 75 | 61D36FE01DB25F6E00A040B9 /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | 61D36FF91DB25F6E00A040B9 /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | 61D370041DB25F6E00A040B9 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | /* End PBXFrameworksBuildPhase section */ 97 | 98 | /* Begin PBXGroup section */ 99 | 61D36FDA1DB25F6E00A040B9 = { 100 | isa = PBXGroup; 101 | children = ( 102 | 61D3702F1DB2643D00A040B9 /* JNAPushPopCompletionBlock_Objective-C */, 103 | 61D36FE51DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */, 104 | 61D36FFF1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests */, 105 | 61D3700A1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests */, 106 | 61D36FE41DB25F6E00A040B9 /* Products */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 61D36FE41DB25F6E00A040B9 /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 61D36FE31DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample.app */, 114 | 61D36FFC1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.xctest */, 115 | 61D370071DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.xctest */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 61D36FE51DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 61D370201DB2616300A040B9 /* ViewController1.h */, 124 | 61D370211DB2616300A040B9 /* ViewController1.m */, 125 | 61D370221DB2616300A040B9 /* ViewController2.h */, 126 | 61D370231DB2616300A040B9 /* ViewController2.m */, 127 | 61D370241DB2616300A040B9 /* ViewController3.h */, 128 | 61D370251DB2616300A040B9 /* ViewController3.m */, 129 | 61D370261DB2616300A040B9 /* ViewController4.h */, 130 | 61D370271DB2616300A040B9 /* ViewController4.m */, 131 | 61D370281DB2616300A040B9 /* ViewController5.h */, 132 | 61D370291DB2616300A040B9 /* ViewController5.m */, 133 | 61D36FE91DB25F6E00A040B9 /* AppDelegate.h */, 134 | 61D36FEA1DB25F6E00A040B9 /* AppDelegate.m */, 135 | 61D36FEC1DB25F6E00A040B9 /* ViewController.h */, 136 | 61D36FED1DB25F6E00A040B9 /* ViewController.m */, 137 | 61D36FEF1DB25F6E00A040B9 /* Main.storyboard */, 138 | 61D36FF21DB25F6E00A040B9 /* Assets.xcassets */, 139 | 61D36FF41DB25F6E00A040B9 /* LaunchScreen.storyboard */, 140 | 61D36FF71DB25F6E00A040B9 /* Info.plist */, 141 | 61D36FE61DB25F6E00A040B9 /* Supporting Files */, 142 | ); 143 | path = JNAPushPopCompletionBlockExample; 144 | sourceTree = ""; 145 | }; 146 | 61D36FE61DB25F6E00A040B9 /* Supporting Files */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 61D36FE71DB25F6E00A040B9 /* main.m */, 150 | ); 151 | name = "Supporting Files"; 152 | sourceTree = ""; 153 | }; 154 | 61D36FFF1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 61D370001DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.m */, 158 | 61D370021DB25F6E00A040B9 /* Info.plist */, 159 | ); 160 | path = JNAPushPopCompletionBlockExampleTests; 161 | sourceTree = ""; 162 | }; 163 | 61D3700A1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 61D3700B1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.m */, 167 | 61D3700D1DB25F6E00A040B9 /* Info.plist */, 168 | ); 169 | path = JNAPushPopCompletionBlockExampleUITests; 170 | sourceTree = ""; 171 | }; 172 | 61D3702F1DB2643D00A040B9 /* JNAPushPopCompletionBlock_Objective-C */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 61D370301DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.h */, 176 | 61D370311DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.m */, 177 | ); 178 | name = "JNAPushPopCompletionBlock_Objective-C"; 179 | path = "../JNAPushPopCompletionBlock_Objective-C"; 180 | sourceTree = ""; 181 | }; 182 | /* End PBXGroup section */ 183 | 184 | /* Begin PBXNativeTarget section */ 185 | 61D36FE21DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 61D370101DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExample" */; 188 | buildPhases = ( 189 | 61D36FDF1DB25F6E00A040B9 /* Sources */, 190 | 61D36FE01DB25F6E00A040B9 /* Frameworks */, 191 | 61D36FE11DB25F6E00A040B9 /* Resources */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | ); 197 | name = JNAPushPopCompletionBlockExample; 198 | productName = JNAPushPopCompletionBlockExample; 199 | productReference = 61D36FE31DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample.app */; 200 | productType = "com.apple.product-type.application"; 201 | }; 202 | 61D36FFB1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 61D370131DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExampleTests" */; 205 | buildPhases = ( 206 | 61D36FF81DB25F6E00A040B9 /* Sources */, 207 | 61D36FF91DB25F6E00A040B9 /* Frameworks */, 208 | 61D36FFA1DB25F6E00A040B9 /* Resources */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | 61D36FFE1DB25F6E00A040B9 /* PBXTargetDependency */, 214 | ); 215 | name = JNAPushPopCompletionBlockExampleTests; 216 | productName = JNAPushPopCompletionBlockExampleTests; 217 | productReference = 61D36FFC1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.xctest */; 218 | productType = "com.apple.product-type.bundle.unit-test"; 219 | }; 220 | 61D370061DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests */ = { 221 | isa = PBXNativeTarget; 222 | buildConfigurationList = 61D370161DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExampleUITests" */; 223 | buildPhases = ( 224 | 61D370031DB25F6E00A040B9 /* Sources */, 225 | 61D370041DB25F6E00A040B9 /* Frameworks */, 226 | 61D370051DB25F6E00A040B9 /* Resources */, 227 | ); 228 | buildRules = ( 229 | ); 230 | dependencies = ( 231 | 61D370091DB25F6E00A040B9 /* PBXTargetDependency */, 232 | ); 233 | name = JNAPushPopCompletionBlockExampleUITests; 234 | productName = JNAPushPopCompletionBlockExampleUITests; 235 | productReference = 61D370071DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.xctest */; 236 | productType = "com.apple.product-type.bundle.ui-testing"; 237 | }; 238 | /* End PBXNativeTarget section */ 239 | 240 | /* Begin PBXProject section */ 241 | 61D36FDB1DB25F6E00A040B9 /* Project object */ = { 242 | isa = PBXProject; 243 | attributes = { 244 | LastUpgradeCheck = 0800; 245 | ORGANIZATIONNAME = "Md. Jawad Noor Asif"; 246 | TargetAttributes = { 247 | 61D36FE21DB25F6E00A040B9 = { 248 | CreatedOnToolsVersion = 8.0; 249 | ProvisioningStyle = Automatic; 250 | }; 251 | 61D36FFB1DB25F6E00A040B9 = { 252 | CreatedOnToolsVersion = 8.0; 253 | ProvisioningStyle = Automatic; 254 | TestTargetID = 61D36FE21DB25F6E00A040B9; 255 | }; 256 | 61D370061DB25F6E00A040B9 = { 257 | CreatedOnToolsVersion = 8.0; 258 | ProvisioningStyle = Automatic; 259 | TestTargetID = 61D36FE21DB25F6E00A040B9; 260 | }; 261 | }; 262 | }; 263 | buildConfigurationList = 61D36FDE1DB25F6E00A040B9 /* Build configuration list for PBXProject "JNAPushPopCompletionBlockExample" */; 264 | compatibilityVersion = "Xcode 3.2"; 265 | developmentRegion = English; 266 | hasScannedForEncodings = 0; 267 | knownRegions = ( 268 | en, 269 | Base, 270 | ); 271 | mainGroup = 61D36FDA1DB25F6E00A040B9; 272 | productRefGroup = 61D36FE41DB25F6E00A040B9 /* Products */; 273 | projectDirPath = ""; 274 | projectRoot = ""; 275 | targets = ( 276 | 61D36FE21DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */, 277 | 61D36FFB1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests */, 278 | 61D370061DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests */, 279 | ); 280 | }; 281 | /* End PBXProject section */ 282 | 283 | /* Begin PBXResourcesBuildPhase section */ 284 | 61D36FE11DB25F6E00A040B9 /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 61D36FF61DB25F6E00A040B9 /* LaunchScreen.storyboard in Resources */, 289 | 61D36FF31DB25F6E00A040B9 /* Assets.xcassets in Resources */, 290 | 61D36FF11DB25F6E00A040B9 /* Main.storyboard in Resources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | 61D36FFA1DB25F6E00A040B9 /* Resources */ = { 295 | isa = PBXResourcesBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | 61D370051DB25F6E00A040B9 /* Resources */ = { 302 | isa = PBXResourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | /* End PBXResourcesBuildPhase section */ 309 | 310 | /* Begin PBXSourcesBuildPhase section */ 311 | 61D36FDF1DB25F6E00A040B9 /* Sources */ = { 312 | isa = PBXSourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | 61D3702A1DB2616300A040B9 /* ViewController1.m in Sources */, 316 | 61D36FEE1DB25F6E00A040B9 /* ViewController.m in Sources */, 317 | 61D36FEB1DB25F6E00A040B9 /* AppDelegate.m in Sources */, 318 | 61D36FE81DB25F6E00A040B9 /* main.m in Sources */, 319 | 61D3702E1DB2616300A040B9 /* ViewController5.m in Sources */, 320 | 61D370321DB2643D00A040B9 /* UINavigationController+JNAPushPopCompletionBlock.m in Sources */, 321 | 61D3702B1DB2616300A040B9 /* ViewController2.m in Sources */, 322 | 61D3702C1DB2616300A040B9 /* ViewController3.m in Sources */, 323 | 61D3702D1DB2616300A040B9 /* ViewController4.m in Sources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | 61D36FF81DB25F6E00A040B9 /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 61D370011DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleTests.m in Sources */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | 61D370031DB25F6E00A040B9 /* Sources */ = { 336 | isa = PBXSourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | 61D3700C1DB25F6E00A040B9 /* JNAPushPopCompletionBlockExampleUITests.m in Sources */, 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | }; 343 | /* End PBXSourcesBuildPhase section */ 344 | 345 | /* Begin PBXTargetDependency section */ 346 | 61D36FFE1DB25F6E00A040B9 /* PBXTargetDependency */ = { 347 | isa = PBXTargetDependency; 348 | target = 61D36FE21DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */; 349 | targetProxy = 61D36FFD1DB25F6E00A040B9 /* PBXContainerItemProxy */; 350 | }; 351 | 61D370091DB25F6E00A040B9 /* PBXTargetDependency */ = { 352 | isa = PBXTargetDependency; 353 | target = 61D36FE21DB25F6E00A040B9 /* JNAPushPopCompletionBlockExample */; 354 | targetProxy = 61D370081DB25F6E00A040B9 /* PBXContainerItemProxy */; 355 | }; 356 | /* End PBXTargetDependency section */ 357 | 358 | /* Begin PBXVariantGroup section */ 359 | 61D36FEF1DB25F6E00A040B9 /* Main.storyboard */ = { 360 | isa = PBXVariantGroup; 361 | children = ( 362 | 61D36FF01DB25F6E00A040B9 /* Base */, 363 | ); 364 | name = Main.storyboard; 365 | sourceTree = ""; 366 | }; 367 | 61D36FF41DB25F6E00A040B9 /* LaunchScreen.storyboard */ = { 368 | isa = PBXVariantGroup; 369 | children = ( 370 | 61D36FF51DB25F6E00A040B9 /* Base */, 371 | ); 372 | name = LaunchScreen.storyboard; 373 | sourceTree = ""; 374 | }; 375 | /* End PBXVariantGroup section */ 376 | 377 | /* Begin XCBuildConfiguration section */ 378 | 61D3700E1DB25F6E00A040B9 /* Debug */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ALWAYS_SEARCH_USER_PATHS = NO; 382 | CLANG_ANALYZER_NONNULL = YES; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = dwarf; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | ENABLE_TESTABILITY = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_OPTIMIZATION_LEVEL = 0; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "DEBUG=1", 410 | "$(inherited)", 411 | ); 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | SDKROOT = iphoneos; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | }; 424 | name = Debug; 425 | }; 426 | 61D3700F1DB25F6E00A040B9 /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ALWAYS_SEARCH_USER_PATHS = NO; 430 | CLANG_ANALYZER_NONNULL = YES; 431 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 432 | CLANG_CXX_LIBRARY = "libc++"; 433 | CLANG_ENABLE_MODULES = YES; 434 | CLANG_ENABLE_OBJC_ARC = YES; 435 | CLANG_WARN_BOOL_CONVERSION = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 444 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 445 | CLANG_WARN_UNREACHABLE_CODE = YES; 446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 448 | COPY_PHASE_STRIP = NO; 449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 450 | ENABLE_NS_ASSERTIONS = NO; 451 | ENABLE_STRICT_OBJC_MSGSEND = YES; 452 | GCC_C_LANGUAGE_STANDARD = gnu99; 453 | GCC_NO_COMMON_BLOCKS = YES; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 461 | MTL_ENABLE_DEBUG_INFO = NO; 462 | SDKROOT = iphoneos; 463 | TARGETED_DEVICE_FAMILY = "1,2"; 464 | VALIDATE_PRODUCT = YES; 465 | }; 466 | name = Release; 467 | }; 468 | 61D370111DB25F6E00A040B9 /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 472 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 473 | INFOPLIST_FILE = JNAPushPopCompletionBlockExample/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExample; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | }; 478 | name = Debug; 479 | }; 480 | 61D370121DB25F6E00A040B9 /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 484 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 485 | INFOPLIST_FILE = JNAPushPopCompletionBlockExample/Info.plist; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 487 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExample; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | }; 490 | name = Release; 491 | }; 492 | 61D370141DB25F6E00A040B9 /* Debug */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | BUNDLE_LOADER = "$(TEST_HOST)"; 496 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 497 | INFOPLIST_FILE = JNAPushPopCompletionBlockExampleTests/Info.plist; 498 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 499 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExampleTests; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JNAPushPopCompletionBlockExample.app/JNAPushPopCompletionBlockExample"; 502 | }; 503 | name = Debug; 504 | }; 505 | 61D370151DB25F6E00A040B9 /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | BUNDLE_LOADER = "$(TEST_HOST)"; 509 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 510 | INFOPLIST_FILE = JNAPushPopCompletionBlockExampleTests/Info.plist; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 512 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExampleTests; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JNAPushPopCompletionBlockExample.app/JNAPushPopCompletionBlockExample"; 515 | }; 516 | name = Release; 517 | }; 518 | 61D370171DB25F6E00A040B9 /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 522 | INFOPLIST_FILE = JNAPushPopCompletionBlockExampleUITests/Info.plist; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 524 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExampleUITests; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | TEST_TARGET_NAME = JNAPushPopCompletionBlockExample; 527 | }; 528 | name = Debug; 529 | }; 530 | 61D370181DB25F6E00A040B9 /* Release */ = { 531 | isa = XCBuildConfiguration; 532 | buildSettings = { 533 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 534 | INFOPLIST_FILE = JNAPushPopCompletionBlockExampleUITests/Info.plist; 535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 536 | PRODUCT_BUNDLE_IDENTIFIER = com.jawadasif.JNAPushPopCompletionBlockExampleUITests; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | TEST_TARGET_NAME = JNAPushPopCompletionBlockExample; 539 | }; 540 | name = Release; 541 | }; 542 | /* End XCBuildConfiguration section */ 543 | 544 | /* Begin XCConfigurationList section */ 545 | 61D36FDE1DB25F6E00A040B9 /* Build configuration list for PBXProject "JNAPushPopCompletionBlockExample" */ = { 546 | isa = XCConfigurationList; 547 | buildConfigurations = ( 548 | 61D3700E1DB25F6E00A040B9 /* Debug */, 549 | 61D3700F1DB25F6E00A040B9 /* Release */, 550 | ); 551 | defaultConfigurationIsVisible = 0; 552 | defaultConfigurationName = Release; 553 | }; 554 | 61D370101DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExample" */ = { 555 | isa = XCConfigurationList; 556 | buildConfigurations = ( 557 | 61D370111DB25F6E00A040B9 /* Debug */, 558 | 61D370121DB25F6E00A040B9 /* Release */, 559 | ); 560 | defaultConfigurationIsVisible = 0; 561 | defaultConfigurationName = Release; 562 | }; 563 | 61D370131DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExampleTests" */ = { 564 | isa = XCConfigurationList; 565 | buildConfigurations = ( 566 | 61D370141DB25F6E00A040B9 /* Debug */, 567 | 61D370151DB25F6E00A040B9 /* Release */, 568 | ); 569 | defaultConfigurationIsVisible = 0; 570 | defaultConfigurationName = Release; 571 | }; 572 | 61D370161DB25F6E00A040B9 /* Build configuration list for PBXNativeTarget "JNAPushPopCompletionBlockExampleUITests" */ = { 573 | isa = XCConfigurationList; 574 | buildConfigurations = ( 575 | 61D370171DB25F6E00A040B9 /* Debug */, 576 | 61D370181DB25F6E00A040B9 /* Release */, 577 | ); 578 | defaultConfigurationIsVisible = 0; 579 | defaultConfigurationName = Release; 580 | }; 581 | /* End XCConfigurationList section */ 582 | }; 583 | rootObject = 61D36FDB1DB25F6E00A040B9 /* Project object */; 584 | } 585 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample.xcodeproj/xcshareddata/xcschemes/JNAPushPopCompletionBlockExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ViewController1.h" 11 | #import "ViewController2.h" 12 | #import "ViewController3.h" 13 | #import "ViewController4.h" 14 | #import "ViewController5.h" 15 | #import "UINavigationController+JNAPushPopCompletionBlock.h" 16 | 17 | @interface ViewController () 18 | @property (nonatomic,strong) ViewController1 *viewController1; 19 | @property (nonatomic,strong) ViewController2 *viewController2; 20 | @property (nonatomic,strong) ViewController3 *viewController3; 21 | @property (nonatomic,strong) ViewController4 *viewController4; 22 | @property (nonatomic,strong) ViewController5 *viewController5; 23 | @end 24 | 25 | @implementation ViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | [self setNeedsStatusBarAppearanceUpdate]; 30 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 31 | self.viewController1 = [storyboard instantiateViewControllerWithIdentifier:@"ViewController1"]; 32 | self.viewController2 = [storyboard instantiateViewControllerWithIdentifier:@"ViewController2"]; 33 | self.viewController3 = [storyboard instantiateViewControllerWithIdentifier:@"ViewController3"]; 34 | self.viewController4 = [storyboard instantiateViewControllerWithIdentifier:@"ViewController4"]; 35 | self.viewController5 = [storyboard instantiateViewControllerWithIdentifier:@"ViewController5"]; 36 | 37 | } 38 | 39 | - (void)didReceiveMemoryWarning { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | - (IBAction)pushPopWithCompletion:(id)sender { 45 | [self.navigationController pushViewController:self.viewController1 animated:YES completion:^{ 46 | [self.navigationController pushViewController:self.viewController2 animated:YES completion:^{ 47 | [self.navigationController pushViewController:self.viewController3 animated:YES completion:^{ 48 | [self.navigationController popViewControllerAnimated:YES completion:^{ 49 | [self.navigationController popViewControllerAnimated:YES completion:^{ 50 | [self.navigationController pushViewController:self.viewController4 animated:YES completion:^{ 51 | [self.navigationController pushViewController:self.viewController5 animated:YES completion:^{ 52 | NSLog(@"navigation stack: %@",self.navigationController.viewControllers); 53 | }]; 54 | }]; 55 | }]; 56 | }]; 57 | }]; 58 | }]; 59 | }]; 60 | } 61 | 62 | - (IBAction)pushPopWithoutCompletion:(id)sender { 63 | [self.navigationController pushViewController:self.viewController1 animated:YES]; 64 | [self.navigationController pushViewController:self.viewController2 animated:YES]; 65 | [self.navigationController pushViewController:self.viewController3 animated:YES]; 66 | [self.navigationController popViewControllerAnimated:YES]; 67 | [self.navigationController popViewControllerAnimated:YES]; 68 | [self.navigationController pushViewController:self.viewController4 animated:YES]; 69 | [self.navigationController pushViewController:self.viewController5 animated:YES]; 70 | NSLog(@"navigation stack: %@",self.navigationController.viewControllers); 71 | } 72 | 73 | - (BOOL)prefersStatusBarHidden { 74 | return YES; 75 | } 76 | @end 77 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController1.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController1.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 9/28/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController1 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController1.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController1.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 9/28/16. 6 | // 7 | // 8 | 9 | #import "ViewController1.h" 10 | 11 | @interface ViewController1 () 12 | 13 | @end 14 | 15 | @implementation ViewController1 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self setNeedsStatusBarAppearanceUpdate]; 20 | self.navigationItem.title = @"ViewController1"; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (BOOL)prefersStatusBarHidden { 30 | return YES; 31 | } 32 | 33 | /* 34 | #pragma mark - Navigation 35 | 36 | // In a storyboard-based application, you will often want to do a little preparation before navigation 37 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 38 | // Get the new view controller using [segue destinationViewController]. 39 | // Pass the selected object to the new view controller. 40 | } 41 | */ 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController2.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController2.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController2 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController2.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController2.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "ViewController2.h" 10 | 11 | @interface ViewController2 () 12 | 13 | @end 14 | 15 | @implementation ViewController2 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self setNeedsStatusBarAppearanceUpdate]; 20 | self.navigationItem.title = @"ViewController2"; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (BOOL)prefersStatusBarHidden { 30 | return YES; 31 | } 32 | /* 33 | #pragma mark - Navigation 34 | 35 | // In a storyboard-based application, you will often want to do a little preparation before navigation 36 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 37 | // Get the new view controller using [segue destinationViewController]. 38 | // Pass the selected object to the new view controller. 39 | } 40 | */ 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController3.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController3.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController3 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController3.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController3.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "ViewController3.h" 10 | 11 | @interface ViewController3 () 12 | 13 | @end 14 | 15 | @implementation ViewController3 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self setNeedsStatusBarAppearanceUpdate]; 20 | self.navigationItem.title = @"ViewController3"; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (BOOL)prefersStatusBarHidden { 30 | return YES; 31 | } 32 | 33 | /* 34 | #pragma mark - Navigation 35 | 36 | // In a storyboard-based application, you will often want to do a little preparation before navigation 37 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 38 | // Get the new view controller using [segue destinationViewController]. 39 | // Pass the selected object to the new view controller. 40 | } 41 | */ 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController4.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController4.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController4 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController4.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController4.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "ViewController4.h" 10 | 11 | @interface ViewController4 () 12 | 13 | @end 14 | 15 | @implementation ViewController4 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self setNeedsStatusBarAppearanceUpdate]; 20 | self.navigationItem.title = @"ViewController4"; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (BOOL)prefersStatusBarHidden { 30 | return YES; 31 | } 32 | 33 | /* 34 | #pragma mark - Navigation 35 | 36 | // In a storyboard-based application, you will often want to do a little preparation before navigation 37 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 38 | // Get the new view controller using [segue destinationViewController]. 39 | // Pass the selected object to the new view controller. 40 | } 41 | */ 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController5.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController5.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController5 : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/ViewController5.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController5.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "ViewController5.h" 10 | 11 | @interface ViewController5 () 12 | 13 | @end 14 | 15 | @implementation ViewController5 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | [self setNeedsStatusBarAppearanceUpdate]; 20 | self.navigationItem.title = @"ViewController5"; 21 | // Do any additional setup after loading the view. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | - (BOOL)prefersStatusBarHidden { 30 | return YES; 31 | } 32 | 33 | /* 34 | #pragma mark - Navigation 35 | 36 | // In a storyboard-based application, you will often want to do a little preparation before navigation 37 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 38 | // Get the new view controller using [segue destinationViewController]. 39 | // Pass the selected object to the new view controller. 40 | } 41 | */ 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExampleTests/JNAPushPopCompletionBlockExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JNAPushPopCompletionBlockExampleTests.m 3 | // JNAPushPopCompletionBlockExampleTests 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface JNAPushPopCompletionBlockExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JNAPushPopCompletionBlockExampleTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DemoProject_Objective-C/JNAPushPopCompletionBlockExampleUITests/JNAPushPopCompletionBlockExampleUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JNAPushPopCompletionBlockExampleUITests.m 3 | // JNAPushPopCompletionBlockExampleUITests 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface JNAPushPopCompletionBlockExampleUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation JNAPushPopCompletionBlockExampleUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JNAPushPopCompletionBlock.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint JNAPushPopCompletionBlock.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "JNAPushPopCompletionBlock" 19 | s.version = "0.0.1" 20 | s.summary = "Completion Block for UINavigationController Push/Pop UIViewController" 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = <<-DESC 28 | Completion Block for UINavigationController Push/Pop UIViewController 29 | DESC 30 | 31 | s.homepage = "https://github.com/jawadasif/JNAPushPopCompletionBlock" 32 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 33 | 34 | 35 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 36 | # 37 | # Licensing your code is important. See http://choosealicense.com for more info. 38 | # CocoaPods will detect a license file if there is a named LICENSE* 39 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 40 | # 41 | 42 | # s.license = "MIT (example)" 43 | s.license = { :type => "MIT", :file => "LICENSE" } 44 | 45 | 46 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 47 | # 48 | # Specify the authors of the library, with email addresses. Email addresses 49 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 50 | # accepts just a name if you'd rather not provide an email address. 51 | # 52 | # Specify a social_media_url where others can refer to, for example a twitter 53 | # profile URL. 54 | # 55 | 56 | s.author = { "Md. Jawad Noor Asif" => "jawad.asif.bd@gmail.com" } 57 | # Or just: s.author = "Md. Jawad Noor Asif" 58 | # s.authors = { "Md. Jawad Noor Asif" => "jawad.asif.bd@gmail.com" } 59 | # s.social_media_url = "http://twitter.com/Md. Jawad Noor Asif" 60 | 61 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 62 | # 63 | # If this Pod runs only on iOS or OS X, then specify the platform and 64 | # the deployment target. You can optionally include the target after the platform. 65 | # 66 | 67 | s.platform = :ios 68 | # s.platform = :ios, "5.0" 69 | 70 | # When using multiple platforms 71 | # s.ios.deployment_target = "5.0" 72 | # s.osx.deployment_target = "10.7" 73 | # s.watchos.deployment_target = "2.0" 74 | # s.tvos.deployment_target = "9.0" 75 | 76 | 77 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 78 | # 79 | # Specify the location from where the source should be retrieved. 80 | # Supports git, hg, bzr, svn and HTTP. 81 | # 82 | 83 | s.source = { :git => "https://github.com/jawadasif/JNAPushPopCompletionBlock.git" } 84 | 85 | 86 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 87 | # 88 | # CocoaPods is smart about how it includes source code. For source files 89 | # giving a folder will include any swift, h, m, mm, c & cpp files. 90 | # For header files it will include any header in the folder. 91 | # Not including the public_header_files will make all headers public. 92 | # 93 | 94 | s.source_files = "JNAPushPopCompletionBlock_Objective-C" 95 | # s.exclude_files = "Classes/Exclude" 96 | 97 | # s.public_header_files = "Classes/**/*.h" 98 | 99 | 100 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 101 | # 102 | # A list of resources included with the Pod. These are copied into the 103 | # target bundle with a build phase script. Anything else will be cleaned. 104 | # You can preserve files from being cleaned, please don't preserve 105 | # non-essential files like tests, examples and documentation. 106 | # 107 | 108 | # s.resource = "icon.png" 109 | # s.resources = "Resources/*.png" 110 | 111 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 112 | 113 | 114 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 115 | # 116 | # Link your library with frameworks, or libraries. Libraries do not include 117 | # the lib prefix of their name. 118 | # 119 | 120 | # s.framework = "SomeFramework" 121 | s.frameworks = "Foundation", "UIKit" 122 | 123 | # s.library = "iconv" 124 | # s.libraries = "iconv", "xml2" 125 | 126 | 127 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 128 | # 129 | # If your library depends on compiler flags you can set them in the xcconfig hash 130 | # where they will only apply to your library. If you depend on other Podspecs 131 | # you can include multiple dependencies to ensure it works. 132 | 133 | s.requires_arc = true 134 | 135 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 136 | # s.dependency "JSONKit", "~> 1.4" 137 | 138 | end 139 | -------------------------------------------------------------------------------- /JNAPushPopCompletionBlock_Objective-C/UINavigationController+JNAPushPopCompletionBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+JNAPushPopCompletionBlock.h 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UINavigationController (JNAPushPopCompletionBlock) 12 | - (void)pushViewController:(UIViewController* _Nonnull)viewController animated:(BOOL)animated completion: (void (^ __nullable)(void))completion; // Uses a horizontal slide transition. Has no effect if the view controller is already in the stack. 13 | 14 | - (nullable UIViewController *)popViewControllerAnimated:(BOOL)animated completion: (void (^ __nullable)(void))completion; // Returns the popped controller. 15 | 16 | - (nullable NSArray<__kindof UIViewController *> *)popToViewController:(UIViewController * _Nonnull)viewController animated:(BOOL)animated completion: (void (^ __nullable)(void))completion; // Pops view controllers until the one specified is on top. Returns the popped controllers. 17 | 18 | - (nullable NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated completion: (void (^ __nullable)(void))completion; // Pops until there's only a single view controller left on the stack. Returns the popped controllers. 19 | @end 20 | -------------------------------------------------------------------------------- /JNAPushPopCompletionBlock_Objective-C/UINavigationController+JNAPushPopCompletionBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+JNAPushPopCompletionBlock.m 3 | // JNAPushPopCompletionBlockExample 4 | // 5 | // Created by Md. Jawad Noor Asif on 10/15/16. 6 | // 7 | // 8 | 9 | #import "UINavigationController+JNAPushPopCompletionBlock.h" 10 | 11 | @implementation UINavigationController (JNAPushPopCompletionBlock) 12 | - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated completion: (void (^ __nullable)(void))completion { 13 | [CATransaction setCompletionBlock:completion]; 14 | [CATransaction begin]; 15 | [self pushViewController:viewController animated:animated]; 16 | [CATransaction commit]; 17 | } 18 | 19 | - (nullable UIViewController *)popViewControllerAnimated:(BOOL)animated completion: (void (^ __nullable)(void))completion { 20 | UIViewController *poppedViewController; 21 | [CATransaction setCompletionBlock:completion]; 22 | [CATransaction begin]; 23 | poppedViewController = [self popViewControllerAnimated:animated]; 24 | [CATransaction commit]; 25 | return poppedViewController; 26 | } 27 | 28 | - (nullable NSArray<__kindof UIViewController *> *)popToViewController:(UIViewController * _Nonnull)viewController animated:(BOOL)animated completion: (void (^ __nullable)(void))completion{ 29 | NSArray* viewControllers; 30 | [CATransaction setCompletionBlock:completion]; 31 | [CATransaction begin]; 32 | viewControllers = [self popToViewController:viewController animated:animated]; 33 | [CATransaction commit]; 34 | return viewControllers; 35 | } 36 | 37 | - (nullable NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated completion: (void (^ __nullable)(void))completion { 38 | NSArray* viewControllers; 39 | [CATransaction setCompletionBlock:completion]; 40 | [CATransaction begin]; 41 | viewControllers = [self popToRootViewControllerAnimated:animated]; 42 | [CATransaction commit]; 43 | return viewControllers; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Md. Jawad Noor Asif 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JNAPushPopCompletionBlock 2 | [![codebeat badge](https://codebeat.co/badges/401eed61-775d-4a34-a93e-9b9a315c6814)](https://codebeat.co/projects/github-com-jawadasif-jnapushpopcompletionblock) 3 | [![Build Status](https://travis-ci.org/JawadAsif/JNAPushPopCompletionBlock.svg?branch=master)](https://travis-ci.org/jawadasif/JNAPushPopCompletionBlock) 4 | [![Cocoapod](https://img.shields.io/badge/pod-0.0.1-green.svg)](https://cocoapods.org/?q=JNAPushPopCompletionBlock) 5 | [![Platform](https://img.shields.io/badge/platform-ios-green.svg)](https://en.wikipedia.org/wiki/IOS) 6 | [![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT) 7 | ## Synopsis 8 | 9 | Completion block for 10 | ```objc 11 | [self.navigationController pushViewController:(nonnull UIViewController *) animated:(BOOL)] 12 | ``` 13 | and 14 | ```objc 15 | [self.navigationController popViewControllerAnimated:(BOOL)]; 16 | [self.navigationController popToViewController:(nonnull UIViewController *) animated:(BOOL)]; 17 | [self.navigationController popToRootViewControllerAnimated:(BOOL)]; 18 | ``` 19 | 20 | ## Installation 21 | ### Using Cocoapod 22 | ```ruby 23 | pod 'JNAPushPopCompletionBlock' 24 | ``` 25 | 26 | ### Manual 27 | 28 | Add 29 | 30 | + [UINavigationController+JNAPushPopCompletionBlock.h](https://github.com/jawadasif/JNAPushPopCompletionBlock/blob/master/JNAPushPopCompletionBlock_Objective-C/UINavigationController%2BJNAPushPopCompletionBlock.h) 31 | + [UINavigationController+JNAPushPopCompletionBlock.m](https://github.com/jawadasif/JNAPushPopCompletionBlock/blob/master/JNAPushPopCompletionBlock_Objective-C/UINavigationController%2BJNAPushPopCompletionBlock.m) 32 | 33 | to your project. 34 | 35 | ## Usages 36 | 37 | Check out the [demo app](https://github.com/jawadasif/JNAPushPopCompletionBlock/tree/master/DemoProject_Objective-C) for an example. 38 | 39 | ~~~objective-c 40 | #import "UINavigationController+JNAPushPopCompletionBlock.h" 41 | 42 | --------- 43 | [self.navigationController pushViewController:viewController animated:YES completion:^{ 44 | // Add code here. 45 | }]; 46 | 47 | [self.navigationController popViewControllerAnimated:YES completion:^{ 48 | // Add code here. 49 | }]; 50 | 51 | [self.navigationController popToViewController:viewController animated:YES completion:^{ 52 | // Add code here. 53 | }]; 54 | 55 | [self.navigationController popToRootViewControllerAnimated:YES completion:^{ 56 | // Add code here. 57 | }]; 58 | ~~~ 59 | 60 | License 61 | --- 62 | JNAPushPopCompletionBlock is available under MIT license. See the LICENSE file for more info. 63 | --------------------------------------------------------------------------------