├── .gitignore ├── Podfile ├── Podfile.lock ├── README.md ├── WebViewImageClick.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── yangxiaoyu.xcuserdatad │ └── xcschemes │ ├── WebViewImageClick.xcscheme │ └── xcschememanagement.plist ├── WebViewImageClick.xcworkspace └── contents.xcworkspacedata ├── WebViewImageClick ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── WebViewImageClickTests ├── Info.plist └── WebViewImageClickTests.m └── WebViewImageClickUITests ├── Info.plist └── WebViewImageClickUITests.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | Pods/ 27 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | pod 'IDMPhotoBrowser' 2 | pod 'skpsmtpmessage' -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (2.6.1): 3 | - AFNetworking/NSURLConnection (= 2.6.1) 4 | - AFNetworking/NSURLSession (= 2.6.1) 5 | - AFNetworking/Reachability (= 2.6.1) 6 | - AFNetworking/Security (= 2.6.1) 7 | - AFNetworking/Serialization (= 2.6.1) 8 | - AFNetworking/UIKit (= 2.6.1) 9 | - AFNetworking/NSURLConnection (2.6.1): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/NSURLSession (2.6.1): 14 | - AFNetworking/Reachability 15 | - AFNetworking/Security 16 | - AFNetworking/Serialization 17 | - AFNetworking/Reachability (2.6.1) 18 | - AFNetworking/Security (2.6.1) 19 | - AFNetworking/Serialization (2.6.1) 20 | - AFNetworking/UIKit (2.6.1): 21 | - AFNetworking/NSURLConnection 22 | - AFNetworking/NSURLSession 23 | - DACircularProgress (2.3.1) 24 | - IDMPhotoBrowser (1.7): 25 | - AFNetworking 26 | - DACircularProgress 27 | - pop 28 | - pop (1.0.8) 29 | - skpsmtpmessage (0.0.1) 30 | 31 | DEPENDENCIES: 32 | - IDMPhotoBrowser 33 | - skpsmtpmessage 34 | 35 | SPEC CHECKSUMS: 36 | AFNetworking: 8e4e60500beb8bec644cf575beee72990a76d399 37 | DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71 38 | IDMPhotoBrowser: 1155caa03f8705b7943c074c26b55aadd43d71da 39 | pop: bb773ae2c791ca2629de13b347e7a8b450fa6a57 40 | skpsmtpmessage: f6e913380c784dd8d4a9f83c8790a302445a5e05 41 | 42 | COCOAPODS: 0.39.0 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebViewImageClick 2 | 3 | A demo for browsing images from websites in native style. 4 | 5 | [Here](http://yulingtianxia.com/blog/2015/10/20/Try-to-implement-picture-browser-mode-on-webview/) is an ariticle which describes the implemention process. 6 | 7 | 8 | #使用的第三方库 9 | 10 | - IDMPhotoBrowser 11 | - skpsmtpmessage 12 | 13 | #LICENSE 14 | MIT License. 15 | 16 | -------------------------------------------------------------------------------- /WebViewImageClick.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8F94999F523F7D848430BC74 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF4BF434DF072C8F49234A7F /* libPods.a */; }; 11 | A4F91FF71BD35CF900508293 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F91FF61BD35CF900508293 /* main.m */; }; 12 | A4F91FFA1BD35CF900508293 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F91FF91BD35CF900508293 /* AppDelegate.m */; }; 13 | A4F91FFD1BD35CF900508293 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F91FFC1BD35CF900508293 /* ViewController.m */; }; 14 | A4F920001BD35CF900508293 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A4F91FFE1BD35CF900508293 /* Main.storyboard */; }; 15 | A4F920021BD35CF900508293 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A4F920011BD35CF900508293 /* Assets.xcassets */; }; 16 | A4F920051BD35CF900508293 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A4F920031BD35CF900508293 /* LaunchScreen.storyboard */; }; 17 | A4F920101BD35CF900508293 /* WebViewImageClickTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F9200F1BD35CF900508293 /* WebViewImageClickTests.m */; }; 18 | A4F9201B1BD35CF900508293 /* WebViewImageClickUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = A4F9201A1BD35CF900508293 /* WebViewImageClickUITests.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | A4F9200C1BD35CF900508293 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = A4F91FEA1BD35CF900508293 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = A4F91FF11BD35CF900508293; 27 | remoteInfo = WebViewImageClick; 28 | }; 29 | A4F920171BD35CF900508293 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = A4F91FEA1BD35CF900508293 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = A4F91FF11BD35CF900508293; 34 | remoteInfo = WebViewImageClick; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 2CFEB2455AB38956EBBDD639 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 40 | 2E05FA085B3F7642F470BDB9 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 41 | A4F91FF21BD35CF900508293 /* WebViewImageClick.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebViewImageClick.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | A4F91FF61BD35CF900508293 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 43 | A4F91FF81BD35CF900508293 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | A4F91FF91BD35CF900508293 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | A4F91FFB1BD35CF900508293 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 46 | A4F91FFC1BD35CF900508293 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 47 | A4F91FFF1BD35CF900508293 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | A4F920011BD35CF900508293 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | A4F920041BD35CF900508293 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | A4F920061BD35CF900508293 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | A4F9200B1BD35CF900508293 /* WebViewImageClickTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebViewImageClickTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | A4F9200F1BD35CF900508293 /* WebViewImageClickTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WebViewImageClickTests.m; sourceTree = ""; }; 53 | A4F920111BD35CF900508293 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | A4F920161BD35CF900508293 /* WebViewImageClickUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebViewImageClickUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | A4F9201A1BD35CF900508293 /* WebViewImageClickUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WebViewImageClickUITests.m; sourceTree = ""; }; 56 | A4F9201C1BD35CF900508293 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | DF4BF434DF072C8F49234A7F /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | A4F91FEF1BD35CF900508293 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 8F94999F523F7D848430BC74 /* libPods.a in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | A4F920081BD35CF900508293 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | A4F920131BD35CF900508293 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | 48D503E2648D271F22852730 /* Pods */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 2CFEB2455AB38956EBBDD639 /* Pods.debug.xcconfig */, 90 | 2E05FA085B3F7642F470BDB9 /* Pods.release.xcconfig */, 91 | ); 92 | name = Pods; 93 | sourceTree = ""; 94 | }; 95 | 946EF0B21C7B1CB3F2109575 /* Frameworks */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | DF4BF434DF072C8F49234A7F /* libPods.a */, 99 | ); 100 | name = Frameworks; 101 | sourceTree = ""; 102 | }; 103 | A4F91FE91BD35CF900508293 = { 104 | isa = PBXGroup; 105 | children = ( 106 | A4F91FF41BD35CF900508293 /* WebViewImageClick */, 107 | A4F9200E1BD35CF900508293 /* WebViewImageClickTests */, 108 | A4F920191BD35CF900508293 /* WebViewImageClickUITests */, 109 | A4F91FF31BD35CF900508293 /* Products */, 110 | 48D503E2648D271F22852730 /* Pods */, 111 | 946EF0B21C7B1CB3F2109575 /* Frameworks */, 112 | ); 113 | sourceTree = ""; 114 | }; 115 | A4F91FF31BD35CF900508293 /* Products */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | A4F91FF21BD35CF900508293 /* WebViewImageClick.app */, 119 | A4F9200B1BD35CF900508293 /* WebViewImageClickTests.xctest */, 120 | A4F920161BD35CF900508293 /* WebViewImageClickUITests.xctest */, 121 | ); 122 | name = Products; 123 | sourceTree = ""; 124 | }; 125 | A4F91FF41BD35CF900508293 /* WebViewImageClick */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | A4F91FF81BD35CF900508293 /* AppDelegate.h */, 129 | A4F91FF91BD35CF900508293 /* AppDelegate.m */, 130 | A4F91FFB1BD35CF900508293 /* ViewController.h */, 131 | A4F91FFC1BD35CF900508293 /* ViewController.m */, 132 | A4F91FFE1BD35CF900508293 /* Main.storyboard */, 133 | A4F920011BD35CF900508293 /* Assets.xcassets */, 134 | A4F920031BD35CF900508293 /* LaunchScreen.storyboard */, 135 | A4F920061BD35CF900508293 /* Info.plist */, 136 | A4F91FF51BD35CF900508293 /* Supporting Files */, 137 | ); 138 | path = WebViewImageClick; 139 | sourceTree = ""; 140 | }; 141 | A4F91FF51BD35CF900508293 /* Supporting Files */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | A4F91FF61BD35CF900508293 /* main.m */, 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | A4F9200E1BD35CF900508293 /* WebViewImageClickTests */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | A4F9200F1BD35CF900508293 /* WebViewImageClickTests.m */, 153 | A4F920111BD35CF900508293 /* Info.plist */, 154 | ); 155 | path = WebViewImageClickTests; 156 | sourceTree = ""; 157 | }; 158 | A4F920191BD35CF900508293 /* WebViewImageClickUITests */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | A4F9201A1BD35CF900508293 /* WebViewImageClickUITests.m */, 162 | A4F9201C1BD35CF900508293 /* Info.plist */, 163 | ); 164 | path = WebViewImageClickUITests; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXGroup section */ 168 | 169 | /* Begin PBXNativeTarget section */ 170 | A4F91FF11BD35CF900508293 /* WebViewImageClick */ = { 171 | isa = PBXNativeTarget; 172 | buildConfigurationList = A4F9201F1BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClick" */; 173 | buildPhases = ( 174 | 940BAB1A66F4EA6A8A4A67A6 /* Check Pods Manifest.lock */, 175 | A4F91FEE1BD35CF900508293 /* Sources */, 176 | A4F91FEF1BD35CF900508293 /* Frameworks */, 177 | A4F91FF01BD35CF900508293 /* Resources */, 178 | 9F6E27A5413C0B5C17EF98D0 /* Embed Pods Frameworks */, 179 | 5FCC90586CAB575ECB0D02AE /* Copy Pods Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = WebViewImageClick; 186 | productName = WebViewImageClick; 187 | productReference = A4F91FF21BD35CF900508293 /* WebViewImageClick.app */; 188 | productType = "com.apple.product-type.application"; 189 | }; 190 | A4F9200A1BD35CF900508293 /* WebViewImageClickTests */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = A4F920221BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClickTests" */; 193 | buildPhases = ( 194 | A4F920071BD35CF900508293 /* Sources */, 195 | A4F920081BD35CF900508293 /* Frameworks */, 196 | A4F920091BD35CF900508293 /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | A4F9200D1BD35CF900508293 /* PBXTargetDependency */, 202 | ); 203 | name = WebViewImageClickTests; 204 | productName = WebViewImageClickTests; 205 | productReference = A4F9200B1BD35CF900508293 /* WebViewImageClickTests.xctest */; 206 | productType = "com.apple.product-type.bundle.unit-test"; 207 | }; 208 | A4F920151BD35CF900508293 /* WebViewImageClickUITests */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = A4F920251BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClickUITests" */; 211 | buildPhases = ( 212 | A4F920121BD35CF900508293 /* Sources */, 213 | A4F920131BD35CF900508293 /* Frameworks */, 214 | A4F920141BD35CF900508293 /* Resources */, 215 | ); 216 | buildRules = ( 217 | ); 218 | dependencies = ( 219 | A4F920181BD35CF900508293 /* PBXTargetDependency */, 220 | ); 221 | name = WebViewImageClickUITests; 222 | productName = WebViewImageClickUITests; 223 | productReference = A4F920161BD35CF900508293 /* WebViewImageClickUITests.xctest */; 224 | productType = "com.apple.product-type.bundle.ui-testing"; 225 | }; 226 | /* End PBXNativeTarget section */ 227 | 228 | /* Begin PBXProject section */ 229 | A4F91FEA1BD35CF900508293 /* Project object */ = { 230 | isa = PBXProject; 231 | attributes = { 232 | LastUpgradeCheck = 0700; 233 | ORGANIZATIONNAME = "杨萧玉"; 234 | TargetAttributes = { 235 | A4F91FF11BD35CF900508293 = { 236 | CreatedOnToolsVersion = 7.0.1; 237 | }; 238 | A4F9200A1BD35CF900508293 = { 239 | CreatedOnToolsVersion = 7.0.1; 240 | TestTargetID = A4F91FF11BD35CF900508293; 241 | }; 242 | A4F920151BD35CF900508293 = { 243 | CreatedOnToolsVersion = 7.0.1; 244 | TestTargetID = A4F91FF11BD35CF900508293; 245 | }; 246 | }; 247 | }; 248 | buildConfigurationList = A4F91FED1BD35CF900508293 /* Build configuration list for PBXProject "WebViewImageClick" */; 249 | compatibilityVersion = "Xcode 3.2"; 250 | developmentRegion = English; 251 | hasScannedForEncodings = 0; 252 | knownRegions = ( 253 | en, 254 | Base, 255 | ); 256 | mainGroup = A4F91FE91BD35CF900508293; 257 | productRefGroup = A4F91FF31BD35CF900508293 /* Products */; 258 | projectDirPath = ""; 259 | projectRoot = ""; 260 | targets = ( 261 | A4F91FF11BD35CF900508293 /* WebViewImageClick */, 262 | A4F9200A1BD35CF900508293 /* WebViewImageClickTests */, 263 | A4F920151BD35CF900508293 /* WebViewImageClickUITests */, 264 | ); 265 | }; 266 | /* End PBXProject section */ 267 | 268 | /* Begin PBXResourcesBuildPhase section */ 269 | A4F91FF01BD35CF900508293 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | A4F920051BD35CF900508293 /* LaunchScreen.storyboard in Resources */, 274 | A4F920021BD35CF900508293 /* Assets.xcassets in Resources */, 275 | A4F920001BD35CF900508293 /* Main.storyboard in Resources */, 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | A4F920091BD35CF900508293 /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | A4F920141BD35CF900508293 /* Resources */ = { 287 | isa = PBXResourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | /* End PBXResourcesBuildPhase section */ 294 | 295 | /* Begin PBXShellScriptBuildPhase section */ 296 | 5FCC90586CAB575ECB0D02AE /* 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/Pods-resources.sh\"\n"; 309 | showEnvVarsInLog = 0; 310 | }; 311 | 940BAB1A66F4EA6A8A4A67A6 /* Check Pods Manifest.lock */ = { 312 | isa = PBXShellScriptBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | inputPaths = ( 317 | ); 318 | name = "Check Pods Manifest.lock"; 319 | outputPaths = ( 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | shellPath = /bin/sh; 323 | 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"; 324 | showEnvVarsInLog = 0; 325 | }; 326 | 9F6E27A5413C0B5C17EF98D0 /* 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/Pods-frameworks.sh\"\n"; 339 | showEnvVarsInLog = 0; 340 | }; 341 | /* End PBXShellScriptBuildPhase section */ 342 | 343 | /* Begin PBXSourcesBuildPhase section */ 344 | A4F91FEE1BD35CF900508293 /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | A4F91FFD1BD35CF900508293 /* ViewController.m in Sources */, 349 | A4F91FFA1BD35CF900508293 /* AppDelegate.m in Sources */, 350 | A4F91FF71BD35CF900508293 /* main.m in Sources */, 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | }; 354 | A4F920071BD35CF900508293 /* Sources */ = { 355 | isa = PBXSourcesBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | A4F920101BD35CF900508293 /* WebViewImageClickTests.m in Sources */, 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | A4F920121BD35CF900508293 /* Sources */ = { 363 | isa = PBXSourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | A4F9201B1BD35CF900508293 /* WebViewImageClickUITests.m in Sources */, 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | /* End PBXSourcesBuildPhase section */ 371 | 372 | /* Begin PBXTargetDependency section */ 373 | A4F9200D1BD35CF900508293 /* PBXTargetDependency */ = { 374 | isa = PBXTargetDependency; 375 | target = A4F91FF11BD35CF900508293 /* WebViewImageClick */; 376 | targetProxy = A4F9200C1BD35CF900508293 /* PBXContainerItemProxy */; 377 | }; 378 | A4F920181BD35CF900508293 /* PBXTargetDependency */ = { 379 | isa = PBXTargetDependency; 380 | target = A4F91FF11BD35CF900508293 /* WebViewImageClick */; 381 | targetProxy = A4F920171BD35CF900508293 /* PBXContainerItemProxy */; 382 | }; 383 | /* End PBXTargetDependency section */ 384 | 385 | /* Begin PBXVariantGroup section */ 386 | A4F91FFE1BD35CF900508293 /* Main.storyboard */ = { 387 | isa = PBXVariantGroup; 388 | children = ( 389 | A4F91FFF1BD35CF900508293 /* Base */, 390 | ); 391 | name = Main.storyboard; 392 | sourceTree = ""; 393 | }; 394 | A4F920031BD35CF900508293 /* LaunchScreen.storyboard */ = { 395 | isa = PBXVariantGroup; 396 | children = ( 397 | A4F920041BD35CF900508293 /* Base */, 398 | ); 399 | name = LaunchScreen.storyboard; 400 | sourceTree = ""; 401 | }; 402 | /* End PBXVariantGroup section */ 403 | 404 | /* Begin XCBuildConfiguration section */ 405 | A4F9201D1BD35CF900508293 /* Debug */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 410 | CLANG_CXX_LIBRARY = "libc++"; 411 | CLANG_ENABLE_MODULES = YES; 412 | CLANG_ENABLE_OBJC_ARC = YES; 413 | CLANG_WARN_BOOL_CONVERSION = YES; 414 | CLANG_WARN_CONSTANT_CONVERSION = YES; 415 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 416 | CLANG_WARN_EMPTY_BODY = YES; 417 | CLANG_WARN_ENUM_CONVERSION = YES; 418 | CLANG_WARN_INT_CONVERSION = YES; 419 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 420 | CLANG_WARN_UNREACHABLE_CODE = YES; 421 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 423 | COPY_PHASE_STRIP = NO; 424 | DEBUG_INFORMATION_FORMAT = dwarf; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | ENABLE_TESTABILITY = YES; 427 | GCC_C_LANGUAGE_STANDARD = gnu99; 428 | GCC_DYNAMIC_NO_PIC = NO; 429 | GCC_NO_COMMON_BLOCKS = YES; 430 | GCC_OPTIMIZATION_LEVEL = 0; 431 | GCC_PREPROCESSOR_DEFINITIONS = ( 432 | "DEBUG=1", 433 | "$(inherited)", 434 | ); 435 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 436 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 437 | GCC_WARN_UNDECLARED_SELECTOR = YES; 438 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 439 | GCC_WARN_UNUSED_FUNCTION = YES; 440 | GCC_WARN_UNUSED_VARIABLE = YES; 441 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 442 | MTL_ENABLE_DEBUG_INFO = YES; 443 | ONLY_ACTIVE_ARCH = YES; 444 | SDKROOT = iphoneos; 445 | }; 446 | name = Debug; 447 | }; 448 | A4F9201E1BD35CF900508293 /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ALWAYS_SEARCH_USER_PATHS = NO; 452 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 453 | CLANG_CXX_LIBRARY = "libc++"; 454 | CLANG_ENABLE_MODULES = YES; 455 | CLANG_ENABLE_OBJC_ARC = YES; 456 | CLANG_WARN_BOOL_CONVERSION = YES; 457 | CLANG_WARN_CONSTANT_CONVERSION = YES; 458 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 459 | CLANG_WARN_EMPTY_BODY = YES; 460 | CLANG_WARN_ENUM_CONVERSION = YES; 461 | CLANG_WARN_INT_CONVERSION = YES; 462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 463 | CLANG_WARN_UNREACHABLE_CODE = YES; 464 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 465 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 466 | COPY_PHASE_STRIP = NO; 467 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 468 | ENABLE_NS_ASSERTIONS = NO; 469 | ENABLE_STRICT_OBJC_MSGSEND = YES; 470 | GCC_C_LANGUAGE_STANDARD = gnu99; 471 | GCC_NO_COMMON_BLOCKS = YES; 472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 473 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 474 | GCC_WARN_UNDECLARED_SELECTOR = YES; 475 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 476 | GCC_WARN_UNUSED_FUNCTION = YES; 477 | GCC_WARN_UNUSED_VARIABLE = YES; 478 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 479 | MTL_ENABLE_DEBUG_INFO = NO; 480 | SDKROOT = iphoneos; 481 | VALIDATE_PRODUCT = YES; 482 | }; 483 | name = Release; 484 | }; 485 | A4F920201BD35CF900508293 /* Debug */ = { 486 | isa = XCBuildConfiguration; 487 | baseConfigurationReference = 2CFEB2455AB38956EBBDD639 /* Pods.debug.xcconfig */; 488 | buildSettings = { 489 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 490 | INFOPLIST_FILE = WebViewImageClick/Info.plist; 491 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 492 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClick; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | }; 495 | name = Debug; 496 | }; 497 | A4F920211BD35CF900508293 /* Release */ = { 498 | isa = XCBuildConfiguration; 499 | baseConfigurationReference = 2E05FA085B3F7642F470BDB9 /* Pods.release.xcconfig */; 500 | buildSettings = { 501 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 502 | INFOPLIST_FILE = WebViewImageClick/Info.plist; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClick; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | }; 507 | name = Release; 508 | }; 509 | A4F920231BD35CF900508293 /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | BUNDLE_LOADER = "$(TEST_HOST)"; 513 | INFOPLIST_FILE = WebViewImageClickTests/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 515 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClickTests; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WebViewImageClick.app/WebViewImageClick"; 518 | }; 519 | name = Debug; 520 | }; 521 | A4F920241BD35CF900508293 /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | BUNDLE_LOADER = "$(TEST_HOST)"; 525 | INFOPLIST_FILE = WebViewImageClickTests/Info.plist; 526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 527 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClickTests; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WebViewImageClick.app/WebViewImageClick"; 530 | }; 531 | name = Release; 532 | }; 533 | A4F920261BD35CF900508293 /* Debug */ = { 534 | isa = XCBuildConfiguration; 535 | buildSettings = { 536 | INFOPLIST_FILE = WebViewImageClickUITests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClickUITests; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | TEST_TARGET_NAME = WebViewImageClick; 541 | USES_XCTRUNNER = YES; 542 | }; 543 | name = Debug; 544 | }; 545 | A4F920271BD35CF900508293 /* Release */ = { 546 | isa = XCBuildConfiguration; 547 | buildSettings = { 548 | INFOPLIST_FILE = WebViewImageClickUITests/Info.plist; 549 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 550 | PRODUCT_BUNDLE_IDENTIFIER = com.yulingtianxia.WebViewImageClickUITests; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | TEST_TARGET_NAME = WebViewImageClick; 553 | USES_XCTRUNNER = YES; 554 | }; 555 | name = Release; 556 | }; 557 | /* End XCBuildConfiguration section */ 558 | 559 | /* Begin XCConfigurationList section */ 560 | A4F91FED1BD35CF900508293 /* Build configuration list for PBXProject "WebViewImageClick" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | A4F9201D1BD35CF900508293 /* Debug */, 564 | A4F9201E1BD35CF900508293 /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | A4F9201F1BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClick" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | A4F920201BD35CF900508293 /* Debug */, 573 | A4F920211BD35CF900508293 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | A4F920221BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClickTests" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | A4F920231BD35CF900508293 /* Debug */, 582 | A4F920241BD35CF900508293 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | A4F920251BD35CF900508293 /* Build configuration list for PBXNativeTarget "WebViewImageClickUITests" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | A4F920261BD35CF900508293 /* Debug */, 591 | A4F920271BD35CF900508293 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | /* End XCConfigurationList section */ 597 | }; 598 | rootObject = A4F91FEA1BD35CF900508293 /* Project object */; 599 | } 600 | -------------------------------------------------------------------------------- /WebViewImageClick.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WebViewImageClick.xcodeproj/xcuserdata/yangxiaoyu.xcuserdatad/xcschemes/WebViewImageClick.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 | -------------------------------------------------------------------------------- /WebViewImageClick.xcodeproj/xcuserdata/yangxiaoyu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | WebViewImageClick.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | A4F91FF11BD35CF900508293 16 | 17 | primary 18 | 19 | 20 | A4F9200A1BD35CF900508293 21 | 22 | primary 23 | 24 | 25 | A4F920151BD35CF900508293 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /WebViewImageClick.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WebViewImageClick/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // WebViewImageClick 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /WebViewImageClick/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // WebViewImageClick 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 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 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 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 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /WebViewImageClick/Assets.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" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /WebViewImageClick/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 | -------------------------------------------------------------------------------- /WebViewImageClick/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 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /WebViewImageClick/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 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | NSAppTransportSecurity 40 | 41 | NSAllowsArbitraryLoads 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /WebViewImageClick/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // WebViewImageClick 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /WebViewImageClick/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // WebViewImageClick 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "IDMPhotoBrowser.h" 11 | #import "NSData+Base64Additions.h" 12 | 13 | @interface ViewController () 14 | @property (weak, nonatomic) IBOutlet UIWebView *webView; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | _webView.dataDetectorTypes = UIDataDetectorTypeLink; 24 | _webView.userInteractionEnabled = YES; 25 | _webView.delegate = self; 26 | _webView.scrollView.bounces = NO; 27 | [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.doubanmeizi.com"]]]; 28 | } 29 | 30 | - (void)didReceiveMemoryWarning { 31 | [super didReceiveMemoryWarning]; 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | - (void)addJavaScript { 36 | NSString *clickGirl = 37 | @"function setImage(){\ 38 | var imgs = document.getElementsByTagName(\"img\");\ 39 | for (var i=0;i 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 | -------------------------------------------------------------------------------- /WebViewImageClickTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebViewImageClickTests/WebViewImageClickTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewImageClickTests.m 3 | // WebViewImageClickTests 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WebViewImageClickTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WebViewImageClickTests 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 | -------------------------------------------------------------------------------- /WebViewImageClickUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WebViewImageClickUITests/WebViewImageClickUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // WebViewImageClickUITests.m 3 | // WebViewImageClickUITests 4 | // 5 | // Created by 杨萧玉 on 15/10/18. 6 | // Copyright © 2015年 杨萧玉. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WebViewImageClickUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WebViewImageClickUITests 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 | --------------------------------------------------------------------------------