├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── Local Podspecs │ └── TCScreenShotTools.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── tanchao.xcuserdatad │ │ └── xcschemes │ │ ├── Pods-TCScreenShotToolsExample.xcscheme │ │ ├── TCScreenShotTools-TCScreenShotTools.xcscheme │ │ ├── TCScreenShotTools.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── Pods-TCScreenShotToolsExample │ ├── Info.plist │ ├── Pods-TCScreenShotToolsExample-acknowledgements.markdown │ ├── Pods-TCScreenShotToolsExample-acknowledgements.plist │ ├── Pods-TCScreenShotToolsExample-dummy.m │ ├── Pods-TCScreenShotToolsExample-frameworks.sh │ ├── Pods-TCScreenShotToolsExample-resources.sh │ ├── Pods-TCScreenShotToolsExample-umbrella.h │ ├── Pods-TCScreenShotToolsExample.debug.xcconfig │ ├── Pods-TCScreenShotToolsExample.modulemap │ └── Pods-TCScreenShotToolsExample.release.xcconfig │ └── TCScreenShotTools │ ├── Info.plist │ ├── ResourceBundle-TCScreenShotTools-Info.plist │ ├── TCScreenShotTools-dummy.m │ ├── TCScreenShotTools-prefix.pch │ ├── TCScreenShotTools-umbrella.h │ ├── TCScreenShotTools.modulemap │ └── TCScreenShotTools.xcconfig ├── README.md ├── TCScreenShotTools.podspec ├── TCScreenShotTools ├── Assets │ ├── umsocial_qq.png │ ├── umsocial_qzone.png │ ├── umsocial_sina.png │ ├── umsocial_wechat.png │ └── umsocial_wechat_timeline.png └── Classes │ ├── TCScreenShotTools.swift │ ├── TrickyShareView.swift │ └── TrickyTipsView.swift ├── TCScreenShotToolsExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── tanchao.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── tanchao.xcuserdatad │ └── xcschemes │ ├── TCScreenShotToolsExample.xcscheme │ └── xcschememanagement.plist ├── TCScreenShotToolsExample.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── tanchao.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── TCScreenShotToolsExample ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── setting.png └── 演示.gif /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 itanchao 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'TCScreenShotToolsExample' do 4 | pod 'TCScreenShotTools', :path => './' 5 | end 6 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - TCScreenShotTools (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - TCScreenShotTools (from `./`) 6 | 7 | EXTERNAL SOURCES: 8 | TCScreenShotTools: 9 | :path: ./ 10 | 11 | SPEC CHECKSUMS: 12 | TCScreenShotTools: 99054f0e1aeb9f1a5a3cc5aa130a66d0d0fd62e8 13 | 14 | PODFILE CHECKSUM: 85c9f7533b3b7ec5ffd03c0ef9b38946204cdccb 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Pods/Local Podspecs/TCScreenShotTools.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TCScreenShotTools", 3 | "version": "1.0.0", 4 | "summary": "模仿摩拜单车截图分享功能", 5 | "homepage": "https://github.com/itanchao/TCScreenShotTools", 6 | "license": { 7 | "type": "MIT", 8 | "file": "LICENSE" 9 | }, 10 | "authors": { 11 | "itanchao": "itanchao@gmail.com" 12 | }, 13 | "source": { 14 | "git": "https://github.com/itanchao/TCScreenShotTools.git", 15 | "tag": "1.0.0" 16 | }, 17 | "platforms": { 18 | "ios": "8.0" 19 | }, 20 | "source_files": "TCScreenShotTools/Classes/**/*", 21 | "resource_bundles": { 22 | "TCScreenShotTools": [ 23 | "TCScreenShotTools/Assets/*.png" 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - TCScreenShotTools (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - TCScreenShotTools (from `./`) 6 | 7 | EXTERNAL SOURCES: 8 | TCScreenShotTools: 9 | :path: ./ 10 | 11 | SPEC CHECKSUMS: 12 | TCScreenShotTools: 99054f0e1aeb9f1a5a3cc5aa130a66d0d0fd62e8 13 | 14 | PODFILE CHECKSUM: 85c9f7533b3b7ec5ffd03c0ef9b38946204cdccb 15 | 16 | COCOAPODS: 1.2.1 17 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 03EBEAA16F8311D9EB4B175F52F6D431 /* umsocial_qzone.png in Resources */ = {isa = PBXBuildFile; fileRef = CEBE573DCE49B02112F04A3A71E071D0 /* umsocial_qzone.png */; }; 11 | 1CD84B085269444F687C71F5B5372C8E /* umsocial_sina.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D7E863CE0FA9942E57AD737029A8961 /* umsocial_sina.png */; }; 12 | 30CC769546D43A7737A81DF5D73A848E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 13 | 358C627BDFBFB6187C69E9FCE373C9BE /* Pods-TCScreenShotToolsExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FF8084CA3EED86A7D8B90846D7B882CE /* Pods-TCScreenShotToolsExample-dummy.m */; }; 14 | 39C196282DB6EF645477EE2F024102B3 /* TrickyShareView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C072B31C07FE7CB1675BED9205A5243 /* TrickyShareView.swift */; }; 15 | 3C5102A7715E95F7D38796E91516C32F /* TCScreenShotTools-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A119F5785AB00183794E3CDDED121B6 /* TCScreenShotTools-dummy.m */; }; 16 | 535403F8644EC953C18E750B5D12CE1D /* TCScreenShotTools-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 129815C54A8FC1B87921483439860599 /* TCScreenShotTools-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 5B8919CDBF8E1BB74FC15308A5BC8957 /* umsocial_wechat.png in Resources */ = {isa = PBXBuildFile; fileRef = ACD855C8D14AEFFBA033BA30693B3ED5 /* umsocial_wechat.png */; }; 18 | 5C02F8A78B08A7208F3EF6DCD0106F1D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 19 | 77A3283AF3367315F55CFA7898C810EE /* TrickyTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA3F8F5DF5ED928B3138EA6C4D0A0E1C /* TrickyTipsView.swift */; }; 20 | 79578B0DC59DC460FE86240A93E6A9AD /* Pods-TCScreenShotToolsExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 24170E82646C5727C840248373777743 /* Pods-TCScreenShotToolsExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | 860B4864863F057C75044E5D316655C3 /* umsocial_wechat_timeline.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FF9289CA5BC58A5DC12FDCC43A64C17 /* umsocial_wechat_timeline.png */; }; 22 | A48688572AD3642007414CDE8FFA31F0 /* TCScreenShotTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63F87A3B9A0F9E1B673BA713E33115A3 /* TCScreenShotTools.swift */; }; 23 | B41D8E9B8C1CF0B3473C6F3CB9E19AC3 /* TCScreenShotTools.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 87EBFD43DF41CA62E666169624D71121 /* TCScreenShotTools.bundle */; }; 24 | F8DE353AE08BDFD5911E7438EC4C158D /* umsocial_qq.png in Resources */ = {isa = PBXBuildFile; fileRef = CCD8CDDE18073A1C047BE1B67E037B60 /* umsocial_qq.png */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 7C740FD899A9124698F240A335FA63D6 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 7CCAABECD105383D4F59A2D6A73BD93F; 33 | remoteInfo = "TCScreenShotTools-TCScreenShotTools"; 34 | }; 35 | DC1B3E09D77DD52D092607005C5842F0 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = F482CD3CA3A1DB05C517F68D098DCB39; 40 | remoteInfo = TCScreenShotTools; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 08441F8D124404F9CF2313F0055D1DAF /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 129815C54A8FC1B87921483439860599 /* TCScreenShotTools-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TCScreenShotTools-umbrella.h"; sourceTree = ""; }; 47 | 211B00705D16A5558E6AF9406613C188 /* Pods-TCScreenShotToolsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TCScreenShotToolsExample.release.xcconfig"; sourceTree = ""; }; 48 | 24170E82646C5727C840248373777743 /* Pods-TCScreenShotToolsExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TCScreenShotToolsExample-umbrella.h"; sourceTree = ""; }; 49 | 26CFDDF7A73E1FEFED7BFEE1A624E9F5 /* Pods-TCScreenShotToolsExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-TCScreenShotToolsExample.modulemap"; sourceTree = ""; }; 50 | 2D7E863CE0FA9942E57AD737029A8961 /* umsocial_sina.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = umsocial_sina.png; sourceTree = ""; }; 51 | 3A119F5785AB00183794E3CDDED121B6 /* TCScreenShotTools-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TCScreenShotTools-dummy.m"; sourceTree = ""; }; 52 | 4161BA31E514F9EA5E114FA94993E2EA /* TCScreenShotTools.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = TCScreenShotTools.framework; path = TCScreenShotTools.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 63F87A3B9A0F9E1B673BA713E33115A3 /* TCScreenShotTools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TCScreenShotTools.swift; sourceTree = ""; }; 54 | 6587A85396D0D236B214142E860E13AF /* Pods-TCScreenShotToolsExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TCScreenShotToolsExample-acknowledgements.plist"; sourceTree = ""; }; 55 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 56 | 7A476FE763DF7AA6E5DFD42EE8B72439 /* Pods-TCScreenShotToolsExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TCScreenShotToolsExample-acknowledgements.markdown"; sourceTree = ""; }; 57 | 7FF9289CA5BC58A5DC12FDCC43A64C17 /* umsocial_wechat_timeline.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = umsocial_wechat_timeline.png; sourceTree = ""; }; 58 | 853A36C44F35B6D6143B08686D2F533F /* TCScreenShotTools.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = TCScreenShotTools.modulemap; sourceTree = ""; }; 59 | 87EBFD43DF41CA62E666169624D71121 /* TCScreenShotTools.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = TCScreenShotTools.bundle; path = TCScreenShotTools.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TCScreenShotTools.xcconfig; sourceTree = ""; }; 61 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 62 | 976686D94353C1CB9ACBAE5CF0412503 /* Pods-TCScreenShotToolsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TCScreenShotToolsExample.debug.xcconfig"; sourceTree = ""; }; 63 | 9C072B31C07FE7CB1675BED9205A5243 /* TrickyShareView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TrickyShareView.swift; sourceTree = ""; }; 64 | A1FCA572B1354B148EF4DAB42D3879A9 /* Pods-TCScreenShotToolsExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TCScreenShotToolsExample-frameworks.sh"; sourceTree = ""; }; 65 | AB9B1FA6B4F0A9F15836297194FBF09C /* Pods-TCScreenShotToolsExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TCScreenShotToolsExample-resources.sh"; sourceTree = ""; }; 66 | ACD855C8D14AEFFBA033BA30693B3ED5 /* umsocial_wechat.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = umsocial_wechat.png; sourceTree = ""; }; 67 | CCD8CDDE18073A1C047BE1B67E037B60 /* umsocial_qq.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = umsocial_qq.png; sourceTree = ""; }; 68 | CEBE573DCE49B02112F04A3A71E071D0 /* umsocial_qzone.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = umsocial_qzone.png; sourceTree = ""; }; 69 | DA3F8F5DF5ED928B3138EA6C4D0A0E1C /* TrickyTipsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TrickyTipsView.swift; sourceTree = ""; }; 70 | DC9B909BD44DF0C112626835F8738922 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | DDC8A8336304894DA790D95A2B09F03B /* ResourceBundle-TCScreenShotTools-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-TCScreenShotTools-Info.plist"; sourceTree = ""; }; 72 | EDE251FE0FEB8FDE82BFCC42C7CF7270 /* TCScreenShotTools-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TCScreenShotTools-prefix.pch"; sourceTree = ""; }; 73 | F52747875F8388AFD4AFBB451C10B4B9 /* Pods_TCScreenShotToolsExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TCScreenShotToolsExample.framework; path = "Pods-TCScreenShotToolsExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 74 | FF8084CA3EED86A7D8B90846D7B882CE /* Pods-TCScreenShotToolsExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TCScreenShotToolsExample-dummy.m"; sourceTree = ""; }; 75 | /* End PBXFileReference section */ 76 | 77 | /* Begin PBXFrameworksBuildPhase section */ 78 | 22141ABF4B06FAE4FCA64BC43B2AB7B9 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | 5C02F8A78B08A7208F3EF6DCD0106F1D /* Foundation.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 570D692A2414F4C173F1AE59E11B7D7E /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | 30CC769546D43A7737A81DF5D73A848E /* Foundation.framework in Frameworks */, 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | CFCDF6B5C3F607517575D9BBA72F825A /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 1685501F6CD3EAED2486D23F0AE3B6BB /* TCScreenShotTools */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 664C587746D7D978F98A203A96ACD776 /* Classes */, 108 | ); 109 | name = TCScreenShotTools; 110 | path = TCScreenShotTools; 111 | sourceTree = ""; 112 | }; 113 | 17F639038AC5B820E0ADFE37FDC99ADA /* Pods-TCScreenShotToolsExample */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 08441F8D124404F9CF2313F0055D1DAF /* Info.plist */, 117 | 26CFDDF7A73E1FEFED7BFEE1A624E9F5 /* Pods-TCScreenShotToolsExample.modulemap */, 118 | 7A476FE763DF7AA6E5DFD42EE8B72439 /* Pods-TCScreenShotToolsExample-acknowledgements.markdown */, 119 | 6587A85396D0D236B214142E860E13AF /* Pods-TCScreenShotToolsExample-acknowledgements.plist */, 120 | FF8084CA3EED86A7D8B90846D7B882CE /* Pods-TCScreenShotToolsExample-dummy.m */, 121 | A1FCA572B1354B148EF4DAB42D3879A9 /* Pods-TCScreenShotToolsExample-frameworks.sh */, 122 | AB9B1FA6B4F0A9F15836297194FBF09C /* Pods-TCScreenShotToolsExample-resources.sh */, 123 | 24170E82646C5727C840248373777743 /* Pods-TCScreenShotToolsExample-umbrella.h */, 124 | 976686D94353C1CB9ACBAE5CF0412503 /* Pods-TCScreenShotToolsExample.debug.xcconfig */, 125 | 211B00705D16A5558E6AF9406613C188 /* Pods-TCScreenShotToolsExample.release.xcconfig */, 126 | ); 127 | name = "Pods-TCScreenShotToolsExample"; 128 | path = "Target Support Files/Pods-TCScreenShotToolsExample"; 129 | sourceTree = ""; 130 | }; 131 | 40A82EDD82298015FEF87F41359DD17D /* TCScreenShotTools */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 8B3D6C97A7C77800AB7D6F126F339F09 /* Resources */, 135 | B8CEAA02233BCAA1C22CF9D7C22C0F83 /* Support Files */, 136 | 1685501F6CD3EAED2486D23F0AE3B6BB /* TCScreenShotTools */, 137 | ); 138 | name = TCScreenShotTools; 139 | path = ..; 140 | sourceTree = ""; 141 | }; 142 | 54C59D2234E01CBB3179F498ED3307A1 /* Development Pods */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 40A82EDD82298015FEF87F41359DD17D /* TCScreenShotTools */, 146 | ); 147 | name = "Development Pods"; 148 | sourceTree = ""; 149 | }; 150 | 65FDECABB2B25F2CE88277F3E1C8DE54 /* TCScreenShotTools */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 8CCE222AD9A9CB6DBF51F43AC4365B53 /* Assets */, 154 | ); 155 | name = TCScreenShotTools; 156 | path = TCScreenShotTools; 157 | sourceTree = ""; 158 | }; 159 | 664C587746D7D978F98A203A96ACD776 /* Classes */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 63F87A3B9A0F9E1B673BA713E33115A3 /* TCScreenShotTools.swift */, 163 | 9C072B31C07FE7CB1675BED9205A5243 /* TrickyShareView.swift */, 164 | DA3F8F5DF5ED928B3138EA6C4D0A0E1C /* TrickyTipsView.swift */, 165 | ); 166 | name = Classes; 167 | path = Classes; 168 | sourceTree = ""; 169 | }; 170 | 67B4FA1541BBF1021EC8828793340B94 /* Products */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | F52747875F8388AFD4AFBB451C10B4B9 /* Pods_TCScreenShotToolsExample.framework */, 174 | 87EBFD43DF41CA62E666169624D71121 /* TCScreenShotTools.bundle */, 175 | 4161BA31E514F9EA5E114FA94993E2EA /* TCScreenShotTools.framework */, 176 | ); 177 | name = Products; 178 | sourceTree = ""; 179 | }; 180 | 7DB346D0F39D3F0E887471402A8071AB = { 181 | isa = PBXGroup; 182 | children = ( 183 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 184 | 54C59D2234E01CBB3179F498ED3307A1 /* Development Pods */, 185 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 186 | 67B4FA1541BBF1021EC8828793340B94 /* Products */, 187 | C7B9143A42FDCE1D354F113AEBCDAD9B /* Targets Support Files */, 188 | ); 189 | sourceTree = ""; 190 | }; 191 | 8B3D6C97A7C77800AB7D6F126F339F09 /* Resources */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 65FDECABB2B25F2CE88277F3E1C8DE54 /* TCScreenShotTools */, 195 | ); 196 | name = Resources; 197 | sourceTree = ""; 198 | }; 199 | 8CCE222AD9A9CB6DBF51F43AC4365B53 /* Assets */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | CCD8CDDE18073A1C047BE1B67E037B60 /* umsocial_qq.png */, 203 | CEBE573DCE49B02112F04A3A71E071D0 /* umsocial_qzone.png */, 204 | 2D7E863CE0FA9942E57AD737029A8961 /* umsocial_sina.png */, 205 | ACD855C8D14AEFFBA033BA30693B3ED5 /* umsocial_wechat.png */, 206 | 7FF9289CA5BC58A5DC12FDCC43A64C17 /* umsocial_wechat_timeline.png */, 207 | ); 208 | name = Assets; 209 | path = Assets; 210 | sourceTree = ""; 211 | }; 212 | B8CEAA02233BCAA1C22CF9D7C22C0F83 /* Support Files */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | DC9B909BD44DF0C112626835F8738922 /* Info.plist */, 216 | DDC8A8336304894DA790D95A2B09F03B /* ResourceBundle-TCScreenShotTools-Info.plist */, 217 | 853A36C44F35B6D6143B08686D2F533F /* TCScreenShotTools.modulemap */, 218 | 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */, 219 | 3A119F5785AB00183794E3CDDED121B6 /* TCScreenShotTools-dummy.m */, 220 | EDE251FE0FEB8FDE82BFCC42C7CF7270 /* TCScreenShotTools-prefix.pch */, 221 | 129815C54A8FC1B87921483439860599 /* TCScreenShotTools-umbrella.h */, 222 | ); 223 | name = "Support Files"; 224 | path = "Pods/Target Support Files/TCScreenShotTools"; 225 | sourceTree = ""; 226 | }; 227 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 231 | ); 232 | name = Frameworks; 233 | sourceTree = ""; 234 | }; 235 | C7B9143A42FDCE1D354F113AEBCDAD9B /* Targets Support Files */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 17F639038AC5B820E0ADFE37FDC99ADA /* Pods-TCScreenShotToolsExample */, 239 | ); 240 | name = "Targets Support Files"; 241 | sourceTree = ""; 242 | }; 243 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 244 | isa = PBXGroup; 245 | children = ( 246 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 247 | ); 248 | name = iOS; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXGroup section */ 252 | 253 | /* Begin PBXHeadersBuildPhase section */ 254 | 44EE590B655A8FF5C20A6C1F881B460F /* Headers */ = { 255 | isa = PBXHeadersBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | 535403F8644EC953C18E750B5D12CE1D /* TCScreenShotTools-umbrella.h in Headers */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | 5583FC2CFF23A28DE64C566390B2201B /* Headers */ = { 263 | isa = PBXHeadersBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 79578B0DC59DC460FE86240A93E6A9AD /* Pods-TCScreenShotToolsExample-umbrella.h in Headers */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXHeadersBuildPhase section */ 271 | 272 | /* Begin PBXNativeTarget section */ 273 | 7CCAABECD105383D4F59A2D6A73BD93F /* TCScreenShotTools-TCScreenShotTools */ = { 274 | isa = PBXNativeTarget; 275 | buildConfigurationList = B7469A3E868DF8410A4ABFAE4E34E628 /* Build configuration list for PBXNativeTarget "TCScreenShotTools-TCScreenShotTools" */; 276 | buildPhases = ( 277 | 4AF80DD7CBC54A5268A502F2B9645F16 /* Sources */, 278 | CFCDF6B5C3F607517575D9BBA72F825A /* Frameworks */, 279 | 2BC80517425A087C198E7B4EF513C547 /* Resources */, 280 | ); 281 | buildRules = ( 282 | ); 283 | dependencies = ( 284 | ); 285 | name = "TCScreenShotTools-TCScreenShotTools"; 286 | productName = "TCScreenShotTools-TCScreenShotTools"; 287 | productReference = 87EBFD43DF41CA62E666169624D71121 /* TCScreenShotTools.bundle */; 288 | productType = "com.apple.product-type.bundle"; 289 | }; 290 | A370235F43C21182EC73A1012ED4B9B5 /* Pods-TCScreenShotToolsExample */ = { 291 | isa = PBXNativeTarget; 292 | buildConfigurationList = 4E503A1FD3D155E23A4ACB62C3DE4AA4 /* Build configuration list for PBXNativeTarget "Pods-TCScreenShotToolsExample" */; 293 | buildPhases = ( 294 | BE66B8F694E09201F8552CAEA042A1EC /* Sources */, 295 | 22141ABF4B06FAE4FCA64BC43B2AB7B9 /* Frameworks */, 296 | 5583FC2CFF23A28DE64C566390B2201B /* Headers */, 297 | ); 298 | buildRules = ( 299 | ); 300 | dependencies = ( 301 | B517316CAB36F2F6EE1AF54C84168B54 /* PBXTargetDependency */, 302 | ); 303 | name = "Pods-TCScreenShotToolsExample"; 304 | productName = "Pods-TCScreenShotToolsExample"; 305 | productReference = F52747875F8388AFD4AFBB451C10B4B9 /* Pods_TCScreenShotToolsExample.framework */; 306 | productType = "com.apple.product-type.framework"; 307 | }; 308 | F482CD3CA3A1DB05C517F68D098DCB39 /* TCScreenShotTools */ = { 309 | isa = PBXNativeTarget; 310 | buildConfigurationList = A3AEE4079A9933EAD8F4FAF57106B21D /* Build configuration list for PBXNativeTarget "TCScreenShotTools" */; 311 | buildPhases = ( 312 | B5FE4D9F0BDDDA7C76D27C45FACA8F16 /* Sources */, 313 | 570D692A2414F4C173F1AE59E11B7D7E /* Frameworks */, 314 | 80583C5E9860E00A94680D26DDF628B0 /* Resources */, 315 | 44EE590B655A8FF5C20A6C1F881B460F /* Headers */, 316 | ); 317 | buildRules = ( 318 | ); 319 | dependencies = ( 320 | EE0C4628C25B3A791290B3459079E19C /* PBXTargetDependency */, 321 | ); 322 | name = TCScreenShotTools; 323 | productName = TCScreenShotTools; 324 | productReference = 4161BA31E514F9EA5E114FA94993E2EA /* TCScreenShotTools.framework */; 325 | productType = "com.apple.product-type.framework"; 326 | }; 327 | /* End PBXNativeTarget section */ 328 | 329 | /* Begin PBXProject section */ 330 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 331 | isa = PBXProject; 332 | attributes = { 333 | LastSwiftUpdateCheck = 0830; 334 | LastUpgradeCheck = 0700; 335 | }; 336 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 337 | compatibilityVersion = "Xcode 3.2"; 338 | developmentRegion = English; 339 | hasScannedForEncodings = 0; 340 | knownRegions = ( 341 | en, 342 | ); 343 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 344 | productRefGroup = 67B4FA1541BBF1021EC8828793340B94 /* Products */; 345 | projectDirPath = ""; 346 | projectRoot = ""; 347 | targets = ( 348 | A370235F43C21182EC73A1012ED4B9B5 /* Pods-TCScreenShotToolsExample */, 349 | F482CD3CA3A1DB05C517F68D098DCB39 /* TCScreenShotTools */, 350 | 7CCAABECD105383D4F59A2D6A73BD93F /* TCScreenShotTools-TCScreenShotTools */, 351 | ); 352 | }; 353 | /* End PBXProject section */ 354 | 355 | /* Begin PBXResourcesBuildPhase section */ 356 | 2BC80517425A087C198E7B4EF513C547 /* Resources */ = { 357 | isa = PBXResourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | F8DE353AE08BDFD5911E7438EC4C158D /* umsocial_qq.png in Resources */, 361 | 03EBEAA16F8311D9EB4B175F52F6D431 /* umsocial_qzone.png in Resources */, 362 | 1CD84B085269444F687C71F5B5372C8E /* umsocial_sina.png in Resources */, 363 | 5B8919CDBF8E1BB74FC15308A5BC8957 /* umsocial_wechat.png in Resources */, 364 | 860B4864863F057C75044E5D316655C3 /* umsocial_wechat_timeline.png in Resources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | 80583C5E9860E00A94680D26DDF628B0 /* Resources */ = { 369 | isa = PBXResourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | B41D8E9B8C1CF0B3473C6F3CB9E19AC3 /* TCScreenShotTools.bundle in Resources */, 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | /* End PBXResourcesBuildPhase section */ 377 | 378 | /* Begin PBXSourcesBuildPhase section */ 379 | 4AF80DD7CBC54A5268A502F2B9645F16 /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | B5FE4D9F0BDDDA7C76D27C45FACA8F16 /* Sources */ = { 387 | isa = PBXSourcesBuildPhase; 388 | buildActionMask = 2147483647; 389 | files = ( 390 | 3C5102A7715E95F7D38796E91516C32F /* TCScreenShotTools-dummy.m in Sources */, 391 | A48688572AD3642007414CDE8FFA31F0 /* TCScreenShotTools.swift in Sources */, 392 | 39C196282DB6EF645477EE2F024102B3 /* TrickyShareView.swift in Sources */, 393 | 77A3283AF3367315F55CFA7898C810EE /* TrickyTipsView.swift in Sources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | BE66B8F694E09201F8552CAEA042A1EC /* Sources */ = { 398 | isa = PBXSourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | 358C627BDFBFB6187C69E9FCE373C9BE /* Pods-TCScreenShotToolsExample-dummy.m in Sources */, 402 | ); 403 | runOnlyForDeploymentPostprocessing = 0; 404 | }; 405 | /* End PBXSourcesBuildPhase section */ 406 | 407 | /* Begin PBXTargetDependency section */ 408 | B517316CAB36F2F6EE1AF54C84168B54 /* PBXTargetDependency */ = { 409 | isa = PBXTargetDependency; 410 | name = TCScreenShotTools; 411 | target = F482CD3CA3A1DB05C517F68D098DCB39 /* TCScreenShotTools */; 412 | targetProxy = DC1B3E09D77DD52D092607005C5842F0 /* PBXContainerItemProxy */; 413 | }; 414 | EE0C4628C25B3A791290B3459079E19C /* PBXTargetDependency */ = { 415 | isa = PBXTargetDependency; 416 | name = "TCScreenShotTools-TCScreenShotTools"; 417 | target = 7CCAABECD105383D4F59A2D6A73BD93F /* TCScreenShotTools-TCScreenShotTools */; 418 | targetProxy = 7C740FD899A9124698F240A335FA63D6 /* PBXContainerItemProxy */; 419 | }; 420 | /* End PBXTargetDependency section */ 421 | 422 | /* Begin XCBuildConfiguration section */ 423 | 31BD6B8A0A69073CE1985BDADE8A8F6B /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | baseConfigurationReference = 976686D94353C1CB9ACBAE5CF0412503 /* Pods-TCScreenShotToolsExample.debug.xcconfig */; 426 | buildSettings = { 427 | CODE_SIGN_IDENTITY = ""; 428 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 429 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 430 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 431 | CURRENT_PROJECT_VERSION = 1; 432 | DEBUG_INFORMATION_FORMAT = dwarf; 433 | DEFINES_MODULE = YES; 434 | DYLIB_COMPATIBILITY_VERSION = 1; 435 | DYLIB_CURRENT_VERSION = 1; 436 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 437 | ENABLE_STRICT_OBJC_MSGSEND = YES; 438 | GCC_NO_COMMON_BLOCKS = YES; 439 | INFOPLIST_FILE = "Target Support Files/Pods-TCScreenShotToolsExample/Info.plist"; 440 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 441 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 443 | MACH_O_TYPE = staticlib; 444 | MODULEMAP_FILE = "Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.modulemap"; 445 | MTL_ENABLE_DEBUG_INFO = YES; 446 | OTHER_LDFLAGS = ""; 447 | OTHER_LIBTOOLFLAGS = ""; 448 | PODS_ROOT = "$(SRCROOT)"; 449 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 450 | PRODUCT_NAME = Pods_TCScreenShotToolsExample; 451 | SDKROOT = iphoneos; 452 | SKIP_INSTALL = YES; 453 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 454 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 455 | SWIFT_VERSION = 3.0; 456 | TARGETED_DEVICE_FAMILY = "1,2"; 457 | VERSIONING_SYSTEM = "apple-generic"; 458 | VERSION_INFO_PREFIX = ""; 459 | }; 460 | name = Debug; 461 | }; 462 | 32C43C42459C5E33AE541D7196467BAF /* Debug */ = { 463 | isa = XCBuildConfiguration; 464 | baseConfigurationReference = 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */; 465 | buildSettings = { 466 | CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/TCScreenShotTools"; 467 | ENABLE_STRICT_OBJC_MSGSEND = YES; 468 | GCC_NO_COMMON_BLOCKS = YES; 469 | INFOPLIST_FILE = "Target Support Files/TCScreenShotTools/ResourceBundle-TCScreenShotTools-Info.plist"; 470 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 471 | PRODUCT_NAME = TCScreenShotTools; 472 | SDKROOT = iphoneos; 473 | SKIP_INSTALL = YES; 474 | TARGETED_DEVICE_FAMILY = "1,2"; 475 | WRAPPER_EXTENSION = bundle; 476 | }; 477 | name = Debug; 478 | }; 479 | 34FE9531DA9AF2820790339988D5FF41 /* Release */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | ALWAYS_SEARCH_USER_PATHS = NO; 483 | CLANG_ANALYZER_NONNULL = YES; 484 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 485 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 486 | CLANG_CXX_LIBRARY = "libc++"; 487 | CLANG_ENABLE_MODULES = YES; 488 | CLANG_ENABLE_OBJC_ARC = YES; 489 | CLANG_WARN_BOOL_CONVERSION = YES; 490 | CLANG_WARN_CONSTANT_CONVERSION = YES; 491 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 492 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 493 | CLANG_WARN_EMPTY_BODY = YES; 494 | CLANG_WARN_ENUM_CONVERSION = YES; 495 | CLANG_WARN_INFINITE_RECURSION = YES; 496 | CLANG_WARN_INT_CONVERSION = YES; 497 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 498 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 499 | CLANG_WARN_UNREACHABLE_CODE = YES; 500 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 501 | CODE_SIGNING_REQUIRED = NO; 502 | COPY_PHASE_STRIP = YES; 503 | ENABLE_NS_ASSERTIONS = NO; 504 | GCC_C_LANGUAGE_STANDARD = gnu99; 505 | GCC_PREPROCESSOR_DEFINITIONS = ( 506 | "POD_CONFIGURATION_RELEASE=1", 507 | "$(inherited)", 508 | ); 509 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 510 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 511 | GCC_WARN_UNDECLARED_SELECTOR = YES; 512 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 513 | GCC_WARN_UNUSED_FUNCTION = YES; 514 | GCC_WARN_UNUSED_VARIABLE = YES; 515 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 516 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 517 | STRIP_INSTALLED_PRODUCT = NO; 518 | SYMROOT = "${SRCROOT}/../build"; 519 | VALIDATE_PRODUCT = YES; 520 | }; 521 | name = Release; 522 | }; 523 | 566BBCA1D9F9102F0F06BAF44485E6BA /* Release */ = { 524 | isa = XCBuildConfiguration; 525 | baseConfigurationReference = 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */; 526 | buildSettings = { 527 | CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/TCScreenShotTools"; 528 | ENABLE_STRICT_OBJC_MSGSEND = YES; 529 | GCC_NO_COMMON_BLOCKS = YES; 530 | INFOPLIST_FILE = "Target Support Files/TCScreenShotTools/ResourceBundle-TCScreenShotTools-Info.plist"; 531 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 532 | PRODUCT_NAME = TCScreenShotTools; 533 | SDKROOT = iphoneos; 534 | SKIP_INSTALL = YES; 535 | TARGETED_DEVICE_FAMILY = "1,2"; 536 | WRAPPER_EXTENSION = bundle; 537 | }; 538 | name = Release; 539 | }; 540 | 6CA1EA1F962D34E04DBAF7DA6FDEF69C /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | baseConfigurationReference = 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */; 543 | buildSettings = { 544 | CODE_SIGN_IDENTITY = ""; 545 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 546 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 547 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 548 | CURRENT_PROJECT_VERSION = 1; 549 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 550 | DEFINES_MODULE = YES; 551 | DYLIB_COMPATIBILITY_VERSION = 1; 552 | DYLIB_CURRENT_VERSION = 1; 553 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 554 | ENABLE_STRICT_OBJC_MSGSEND = YES; 555 | GCC_NO_COMMON_BLOCKS = YES; 556 | GCC_PREFIX_HEADER = "Target Support Files/TCScreenShotTools/TCScreenShotTools-prefix.pch"; 557 | INFOPLIST_FILE = "Target Support Files/TCScreenShotTools/Info.plist"; 558 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 559 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 561 | MODULEMAP_FILE = "Target Support Files/TCScreenShotTools/TCScreenShotTools.modulemap"; 562 | MTL_ENABLE_DEBUG_INFO = NO; 563 | PRODUCT_NAME = TCScreenShotTools; 564 | SDKROOT = iphoneos; 565 | SKIP_INSTALL = YES; 566 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 567 | SWIFT_VERSION = 3.0; 568 | TARGETED_DEVICE_FAMILY = "1,2"; 569 | VERSIONING_SYSTEM = "apple-generic"; 570 | VERSION_INFO_PREFIX = ""; 571 | }; 572 | name = Release; 573 | }; 574 | A35D59290E953485F7CDE4F8C39463A5 /* Debug */ = { 575 | isa = XCBuildConfiguration; 576 | baseConfigurationReference = 8A860657B85EA1D27514EB4767E140D3 /* TCScreenShotTools.xcconfig */; 577 | buildSettings = { 578 | CODE_SIGN_IDENTITY = ""; 579 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 580 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 581 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 582 | CURRENT_PROJECT_VERSION = 1; 583 | DEBUG_INFORMATION_FORMAT = dwarf; 584 | DEFINES_MODULE = YES; 585 | DYLIB_COMPATIBILITY_VERSION = 1; 586 | DYLIB_CURRENT_VERSION = 1; 587 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 588 | ENABLE_STRICT_OBJC_MSGSEND = YES; 589 | GCC_NO_COMMON_BLOCKS = YES; 590 | GCC_PREFIX_HEADER = "Target Support Files/TCScreenShotTools/TCScreenShotTools-prefix.pch"; 591 | INFOPLIST_FILE = "Target Support Files/TCScreenShotTools/Info.plist"; 592 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 593 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 594 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 595 | MODULEMAP_FILE = "Target Support Files/TCScreenShotTools/TCScreenShotTools.modulemap"; 596 | MTL_ENABLE_DEBUG_INFO = YES; 597 | PRODUCT_NAME = TCScreenShotTools; 598 | SDKROOT = iphoneos; 599 | SKIP_INSTALL = YES; 600 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 601 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 602 | SWIFT_VERSION = 3.0; 603 | TARGETED_DEVICE_FAMILY = "1,2"; 604 | VERSIONING_SYSTEM = "apple-generic"; 605 | VERSION_INFO_PREFIX = ""; 606 | }; 607 | name = Debug; 608 | }; 609 | BF8B3AE7DE83DE4709F52D4E69F01C15 /* Release */ = { 610 | isa = XCBuildConfiguration; 611 | baseConfigurationReference = 211B00705D16A5558E6AF9406613C188 /* Pods-TCScreenShotToolsExample.release.xcconfig */; 612 | buildSettings = { 613 | CODE_SIGN_IDENTITY = ""; 614 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 615 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 616 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 617 | CURRENT_PROJECT_VERSION = 1; 618 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 619 | DEFINES_MODULE = YES; 620 | DYLIB_COMPATIBILITY_VERSION = 1; 621 | DYLIB_CURRENT_VERSION = 1; 622 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 623 | ENABLE_STRICT_OBJC_MSGSEND = YES; 624 | GCC_NO_COMMON_BLOCKS = YES; 625 | INFOPLIST_FILE = "Target Support Files/Pods-TCScreenShotToolsExample/Info.plist"; 626 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 627 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 628 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 629 | MACH_O_TYPE = staticlib; 630 | MODULEMAP_FILE = "Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.modulemap"; 631 | MTL_ENABLE_DEBUG_INFO = NO; 632 | OTHER_LDFLAGS = ""; 633 | OTHER_LIBTOOLFLAGS = ""; 634 | PODS_ROOT = "$(SRCROOT)"; 635 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 636 | PRODUCT_NAME = Pods_TCScreenShotToolsExample; 637 | SDKROOT = iphoneos; 638 | SKIP_INSTALL = YES; 639 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 640 | SWIFT_VERSION = 3.0; 641 | TARGETED_DEVICE_FAMILY = "1,2"; 642 | VERSIONING_SYSTEM = "apple-generic"; 643 | VERSION_INFO_PREFIX = ""; 644 | }; 645 | name = Release; 646 | }; 647 | C104F7F091290C3D1E248192F07FE689 /* Debug */ = { 648 | isa = XCBuildConfiguration; 649 | buildSettings = { 650 | ALWAYS_SEARCH_USER_PATHS = NO; 651 | CLANG_ANALYZER_NONNULL = YES; 652 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 653 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 654 | CLANG_CXX_LIBRARY = "libc++"; 655 | CLANG_ENABLE_MODULES = YES; 656 | CLANG_ENABLE_OBJC_ARC = YES; 657 | CLANG_WARN_BOOL_CONVERSION = YES; 658 | CLANG_WARN_CONSTANT_CONVERSION = YES; 659 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 660 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 661 | CLANG_WARN_EMPTY_BODY = YES; 662 | CLANG_WARN_ENUM_CONVERSION = YES; 663 | CLANG_WARN_INFINITE_RECURSION = YES; 664 | CLANG_WARN_INT_CONVERSION = YES; 665 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 666 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 667 | CLANG_WARN_UNREACHABLE_CODE = YES; 668 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 669 | CODE_SIGNING_REQUIRED = NO; 670 | COPY_PHASE_STRIP = NO; 671 | ENABLE_TESTABILITY = YES; 672 | GCC_C_LANGUAGE_STANDARD = gnu99; 673 | GCC_DYNAMIC_NO_PIC = NO; 674 | GCC_OPTIMIZATION_LEVEL = 0; 675 | GCC_PREPROCESSOR_DEFINITIONS = ( 676 | "POD_CONFIGURATION_DEBUG=1", 677 | "DEBUG=1", 678 | "$(inherited)", 679 | ); 680 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 681 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 682 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 683 | GCC_WARN_UNDECLARED_SELECTOR = YES; 684 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 685 | GCC_WARN_UNUSED_FUNCTION = YES; 686 | GCC_WARN_UNUSED_VARIABLE = YES; 687 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 688 | ONLY_ACTIVE_ARCH = YES; 689 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 690 | STRIP_INSTALLED_PRODUCT = NO; 691 | SYMROOT = "${SRCROOT}/../build"; 692 | }; 693 | name = Debug; 694 | }; 695 | /* End XCBuildConfiguration section */ 696 | 697 | /* Begin XCConfigurationList section */ 698 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 699 | isa = XCConfigurationList; 700 | buildConfigurations = ( 701 | C104F7F091290C3D1E248192F07FE689 /* Debug */, 702 | 34FE9531DA9AF2820790339988D5FF41 /* Release */, 703 | ); 704 | defaultConfigurationIsVisible = 0; 705 | defaultConfigurationName = Release; 706 | }; 707 | 4E503A1FD3D155E23A4ACB62C3DE4AA4 /* Build configuration list for PBXNativeTarget "Pods-TCScreenShotToolsExample" */ = { 708 | isa = XCConfigurationList; 709 | buildConfigurations = ( 710 | 31BD6B8A0A69073CE1985BDADE8A8F6B /* Debug */, 711 | BF8B3AE7DE83DE4709F52D4E69F01C15 /* Release */, 712 | ); 713 | defaultConfigurationIsVisible = 0; 714 | defaultConfigurationName = Release; 715 | }; 716 | A3AEE4079A9933EAD8F4FAF57106B21D /* Build configuration list for PBXNativeTarget "TCScreenShotTools" */ = { 717 | isa = XCConfigurationList; 718 | buildConfigurations = ( 719 | A35D59290E953485F7CDE4F8C39463A5 /* Debug */, 720 | 6CA1EA1F962D34E04DBAF7DA6FDEF69C /* Release */, 721 | ); 722 | defaultConfigurationIsVisible = 0; 723 | defaultConfigurationName = Release; 724 | }; 725 | B7469A3E868DF8410A4ABFAE4E34E628 /* Build configuration list for PBXNativeTarget "TCScreenShotTools-TCScreenShotTools" */ = { 726 | isa = XCConfigurationList; 727 | buildConfigurations = ( 728 | 32C43C42459C5E33AE541D7196467BAF /* Debug */, 729 | 566BBCA1D9F9102F0F06BAF44485E6BA /* Release */, 730 | ); 731 | defaultConfigurationIsVisible = 0; 732 | defaultConfigurationName = Release; 733 | }; 734 | /* End XCConfigurationList section */ 735 | }; 736 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 737 | } 738 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/Pods-TCScreenShotToolsExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/TCScreenShotTools-TCScreenShotTools.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/TCScreenShotTools.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-TCScreenShotToolsExample.xcscheme 8 | 9 | isShown 10 | 11 | 12 | TCScreenShotTools-TCScreenShotTools.xcscheme 13 | 14 | isShown 15 | 16 | 17 | TCScreenShotTools.xcscheme 18 | 19 | isShown 20 | 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | 7CCAABECD105383D4F59A2D6A73BD93F 26 | 27 | primary 28 | 29 | 30 | A370235F43C21182EC73A1012ED4B9B5 31 | 32 | primary 33 | 34 | 35 | F482CD3CA3A1DB05C517F68D098DCB39 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## TCScreenShotTools 5 | 6 | Copyright (c) 2017 itanchao 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 itanchao <itanchao@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | TCScreenShotTools 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_TCScreenShotToolsExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_TCScreenShotToolsExample 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/TCScreenShotTools/TCScreenShotTools.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/TCScreenShotTools/TCScreenShotTools.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_TCScreenShotToolsExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_TCScreenShotToolsExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/TCScreenShotTools" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/TCScreenShotTools/TCScreenShotTools.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "TCScreenShotTools" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_TCScreenShotToolsExample { 2 | umbrella header "Pods-TCScreenShotToolsExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/TCScreenShotTools" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/TCScreenShotTools/TCScreenShotTools.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "TCScreenShotTools" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/ResourceBundle-TCScreenShotTools-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/TCScreenShotTools-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_TCScreenShotTools : NSObject 3 | @end 4 | @implementation PodsDummy_TCScreenShotTools 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/TCScreenShotTools-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/TCScreenShotTools-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double TCScreenShotToolsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char TCScreenShotToolsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/TCScreenShotTools.modulemap: -------------------------------------------------------------------------------- 1 | framework module TCScreenShotTools { 2 | umbrella header "TCScreenShotTools-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/TCScreenShotTools/TCScreenShotTools.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/TCScreenShotTools 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TCScreenShotTools 2 | 3 | [![CI Status](http://img.shields.io/travis/itanchao/TCScreenShotTools.svg?style=flat)](https://travis-ci.org/itanchao/TCScreenShotTools) 4 | [![Version](https://img.shields.io/cocoapods/v/TCScreenShotTools.svg?style=flat)](http://cocoapods.org/pods/TCScreenShotTools) 5 | [![License](https://img.shields.io/cocoapods/l/TCScreenShotTools.svg?style=flat)](http://cocoapods.org/pods/TCScreenShotTools) 6 | [![Platform](https://img.shields.io/cocoapods/p/TCScreenShotTools.svg?style=flat)](http://cocoapods.org/pods/TCScreenShotTools) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | TCScreenShotTools is available through [CocoaPods](http://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod "TCScreenShotTools" 21 | ``` 22 | 23 | ## Setting 24 | 25 | ![](./setting.png) 26 | 27 | ## Using 28 | 29 | 30 | 31 | ```swift 32 | import UIKit 33 | import TCScreenShotTools 34 | @UIApplicationMain 35 | class AppDelegate: UIResponder, UIApplicationDelegate { 36 | var window: UIWindow? 37 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 38 | TCScreenShotTools.shared.enable = true 39 | TCScreenShotTools.shared.delegate = self 40 | return true 41 | } 42 | } 43 | extension AppDelegate: TCScreenShotToolsDelegate{ 44 | func screenShotTools(_tools: TCScreenShotTools, didClickShareBtn withShareType: TrickyShareType, withIcon: UIImage, in shareView: TrickyShareView) { 45 | print(withShareType) 46 | print(withIcon) 47 | } 48 | } 49 | ``` 50 | 51 | 52 | 53 | 54 | 55 | ![yanshi](./演示.gif) 56 | 57 | 58 | 59 | ## Author 60 | 61 | itanchao, itanchao@gmail.com 62 | 63 | ## License 64 | 65 | TCScreenShotTools is available under the MIT license. See the LICENSE file for more info. 66 | -------------------------------------------------------------------------------- /TCScreenShotTools.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'TCScreenShotTools' 3 | s.version = '1.2.0' 4 | s.summary = '模仿摩拜单车截图分享功能' 5 | s.homepage = 'https://github.com/itanchao/TCScreenShotTools' 6 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 7 | s.license = { :type => 'MIT', :file => 'LICENSE' } 8 | s.author = { 'itanchao' => 'itanchao@gmail.com' } 9 | s.source = { :git => 'https://github.com/itanchao/TCScreenShotTools.git', :tag => s.version.to_s } 10 | # s.social_media_url = 'https://twitter.com/' 11 | 12 | s.ios.deployment_target = '8.0' 13 | 14 | s.source_files = 'TCScreenShotTools/Classes/**/*' 15 | #s.resource_bundle = 'TCScreenShotTools/Assets/**/*' 16 | s.resource_bundles = { 17 | 'TCScreenShotTools' => ['TCScreenShotTools/Assets/*.png'] 18 | } 19 | 20 | # s.public_header_files = 'Pod/Classes/**/*.h' 21 | # s.frameworks = 'UIKit', 'MapKit' 22 | # s.dependency 'AFNetworking', '~> 2.3' 23 | end 24 | -------------------------------------------------------------------------------- /TCScreenShotTools/Assets/umsocial_qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotTools/Assets/umsocial_qq.png -------------------------------------------------------------------------------- /TCScreenShotTools/Assets/umsocial_qzone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotTools/Assets/umsocial_qzone.png -------------------------------------------------------------------------------- /TCScreenShotTools/Assets/umsocial_sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotTools/Assets/umsocial_sina.png -------------------------------------------------------------------------------- /TCScreenShotTools/Assets/umsocial_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotTools/Assets/umsocial_wechat.png -------------------------------------------------------------------------------- /TCScreenShotTools/Assets/umsocial_wechat_timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotTools/Assets/umsocial_wechat_timeline.png -------------------------------------------------------------------------------- /TCScreenShotTools/Classes/TCScreenShotTools.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TCScreenShotTools.swift 3 | // TCScreenShotTools 4 | // 5 | // 6 | // Created by 谈超 on 2017/5/15. 7 | // Copyright © 2017年 CocoaPods. All rights reserved. 8 | // 9 | 10 | import UIKit 11 | public struct TCPlatform { 12 | public static let isSimulator: Bool = { 13 | var isSim = false 14 | #if arch(i386) || arch(x86_64) 15 | isSim = true 16 | #endif 17 | return isSim 18 | }() 19 | } 20 | public protocol TCScreenShotToolsDelegate { 21 | 22 | /// Called after the user clicked the shareButton. 23 | /// 24 | /// - Parameters: 25 | /// - _tools: _tools 26 | /// - withShareType: shareType 27 | /// - withIcon: icon 28 | /// - shareView: shareView 29 | func screenShotTools(_tools:TCScreenShotTools, didClickShareBtn withShareType: TrickyShareType, withIcon: UIImage ,in shareView: TrickyShareView) 30 | } 31 | public class TCScreenShotTools: NSObject { 32 | 33 | public var delegate:TCScreenShotToolsDelegate? 34 | 35 | /// 全局唯一实例 36 | public static let shared = TCScreenShotTools() 37 | 38 | 39 | /// 监听截图事件开关 40 | public var enable = false { 41 | didSet { 42 | if enable == true && 43 | oldValue == false { 44 | //添加监听事件 45 | NotificationCenter.default.addObserver(self, selector: #selector(screenShot), name: NSNotification.Name.UIApplicationUserDidTakeScreenshot, object: nil) 46 | } else if enable == false { 47 | NotificationCenter.default.removeObserver(self) 48 | } 49 | } 50 | } 51 | deinit { 52 | NotificationCenter.default.removeObserver(self) 53 | } 54 | } 55 | 56 | // MARK: - 响应事件 57 | extension TCScreenShotTools{ 58 | func shareView(_ shareView: TrickyShareView, didClickShareBtn withShareType: TrickyShareType, withIcon: UIImage) { 59 | delegate?.screenShotTools(_tools: self, didClickShareBtn: withShareType, withIcon: withIcon, in: shareView) 60 | } 61 | func simulatorScreenSnapshot(){ 62 | guard let window = UIApplication.shared.keyWindow else { return } 63 | // 用下面这行而不是UIGraphicsBeginImageContext(),因为前者支持Retina 64 | UIGraphicsBeginImageContextWithOptions(window.bounds.size, false, 0.0) 65 | window.layer.render(in: UIGraphicsGetCurrentContext()!) 66 | let image = UIGraphicsGetImageFromCurrentImageContext() 67 | UIGraphicsEndImageContext() 68 | UIImageWriteToSavedPhotosAlbum(image!, self, nil, nil) 69 | } 70 | func tipsShow(title:String?,message:String?){ 71 | let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert) 72 | UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil) 73 | DispatchQueue.main.asyncAfter(deadline: .now()+0.5) { 74 | alert.dismiss(animated: true, completion: nil) 75 | } 76 | } 77 | func screenShot() { 78 | if TCPlatform.isSimulator { 79 | tipsShow(title: "模拟器📱", message: "当前设备为模拟器~") 80 | simulatorScreenSnapshot() 81 | } 82 | TrickyTipsView.shared.showTips() 83 | } 84 | } 85 | extension TCScreenShotToolsDelegate{ 86 | public func screenShotTools(_tools:TCScreenShotTools, didClickShareBtn withShareType: TrickyShareType, withIcon: UIImage ,in shareView: TrickyShareView){} 87 | 88 | } 89 | -------------------------------------------------------------------------------- /TCScreenShotTools/Classes/TrickyShareView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TrickyShareView.swift 3 | // TCScreenShotTools 4 | // 5 | // Created by 谈超 on 2017/5/15. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | public enum TrickyShareType:Int { 11 | case TrickyShareTypeWechat = 0 12 | case TrickyShareTypeQQ = 1 13 | case TrickyShareTypeWechatTimeLine = 2 14 | case TrickyShareTypeWeibo = 3 15 | case TrickyShareTypeQzone = 4 16 | } 17 | public class TrickyShareView: UIView { 18 | static func show(icon:UIImage?){ 19 | let shareView = TrickyShareView(frame: UIScreen.main.bounds) 20 | shareView.shareIcon = icon 21 | let window = UIWindow(frame: UIScreen.main.bounds) 22 | window.windowLevel = UIWindowLevelNormal 23 | window.backgroundColor = UIColor.black 24 | window.addSubview(shareView) 25 | window.isHidden = false 26 | TrickyTipsView.shared.bgWindows.append(window) 27 | shareView.iconView.translatesAutoresizingMaskIntoConstraints = false 28 | if #available(iOS 9.0, *) { 29 | let iconViewConstraints : [NSLayoutConstraint] = [ 30 | shareView.iconView.topAnchor.constraint(equalTo: shareView.titleLabel.bottomAnchor, constant: 16), 31 | shareView.iconView.centerXAnchor.constraint(equalTo: shareView.centerXAnchor), 32 | shareView.iconView.widthAnchor.constraint(equalToConstant: shareView.bounds.width*0.7), 33 | shareView.iconView.heightAnchor.constraint(equalToConstant: shareView.bounds.height*0.7) 34 | ] 35 | NSLayoutConstraint.activate(iconViewConstraints) 36 | } else { 37 | shareView.addConstraints([ 38 | NSLayoutConstraint(item: shareView.iconView, attribute: .top, relatedBy: .equal, toItem: shareView.titleLabel, attribute: .bottom, multiplier: 1, constant: 14), 39 | NSLayoutConstraint(item: shareView.iconView, attribute: .centerX, relatedBy: .equal, toItem: shareView, attribute: .centerX, multiplier: 1, constant: 0), 40 | NSLayoutConstraint(item: shareView.iconView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: shareView.bounds.width*0.7), 41 | NSLayoutConstraint(item: shareView.iconView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: shareView.bounds.width*0.7) 42 | ]) 43 | } 44 | UIView.animate(withDuration: 0.2, animations: { 45 | shareView.layoutIfNeeded() 46 | }) { (stop) in 47 | _ = [shareView.wxBtn,shareView.qqBtn,shareView.pyqBtn,shareView.wbBtn,shareView.qzoneBtn].map({ (button) in 48 | button.isHidden = false 49 | }) 50 | _ = shareView.subviews.map({ (subv) in 51 | subv.isHidden = false 52 | }) 53 | } 54 | } 55 | 56 | override init(frame: CGRect) { 57 | super.init(frame: frame) 58 | self.backgroundColor = UIColor.white 59 | buildUI() 60 | } 61 | 62 | /// 关闭当前视图 63 | func dismiss() { 64 | // 隐藏其他控件让IconView落到截图之前的View上,形成景深视觉效果 65 | _ = subviews.map { (subv) in subv.isHidden = subv != iconView } 66 | UIWindow.animate(withDuration: 0.2, animations: { 67 | self.iconView.frame = UIScreen.main.bounds 68 | }) { (stop) in 69 | self.removeFromSuperview() 70 | } 71 | } 72 | 73 | /// 分享按钮点击事件 74 | func shareBtnClick(btn:UIButton) { 75 | TCScreenShotTools.shared.shareView(self, didClickShareBtn : TrickyShareType.init(rawValue: btn.tag)!, withIcon: shareIcon!) 76 | } 77 | var shareIcon : UIImage?{ 78 | didSet{ 79 | iconView.image = shareIcon 80 | } 81 | } 82 | // MARK:懒加载控件 83 | lazy var sharetips:UILabel = { 84 | let lbl = UILabel() 85 | lbl.text = "分享到" 86 | lbl.backgroundColor = UIColor.white 87 | lbl.textAlignment = .center 88 | lbl.font = UIFont.systemFont(ofSize: 16) 89 | lbl.textColor = tc_Color(hex: "#8b8b8b") 90 | lbl.isHidden = true 91 | return lbl 92 | }() 93 | lazy var wxBtn: UIButton = { 94 | let btn = UIButton() 95 | btn.isHidden = true 96 | btn.tag = 0 97 | btn.setBackgroundImage(UIImage.tc_bundleImageNamed(name: "umsocial_wechat.png"), for: .normal) 98 | btn.addTarget(self, action: #selector(shareBtnClick(btn:)), for: .touchUpInside) 99 | btn.bounds = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: 40, height: 40)) 100 | return btn 101 | }() 102 | lazy var qqBtn: UIButton = { 103 | let btn = UIButton() 104 | btn.isHidden = true 105 | btn.tag = 1 106 | btn.setImage(UIImage.tc_bundleImageNamed(name: "umsocial_qq.png"), for: .normal) 107 | btn.addTarget(self, action: #selector(shareBtnClick(btn:)), for: .touchUpInside) 108 | btn.bounds = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: 40, height: 40)) 109 | return btn 110 | }() 111 | 112 | lazy var pyqBtn: UIButton = { 113 | let btn = UIButton() 114 | btn.isHidden = true 115 | btn.tag = 2 116 | btn.setImage(UIImage.tc_bundleImageNamed(name: "umsocial_wechat_timeline.png"), for: .normal) 117 | btn.addTarget(self, action: #selector(shareBtnClick(btn:)), for: .touchUpInside) 118 | btn.bounds = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: 40, height: 40)) 119 | 120 | return btn 121 | }() 122 | 123 | lazy var wbBtn: UIButton = { 124 | let btn = UIButton() 125 | btn.tag = 3 126 | btn.setImage(UIImage.tc_bundleImageNamed(name: "umsocial_sina.png"), for: .normal) 127 | btn.addTarget(self, action: #selector(shareBtnClick(btn:)), for: .touchUpInside) 128 | btn.bounds = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: 40, height: 40)) 129 | btn.isHidden = true 130 | return btn 131 | }() 132 | 133 | lazy var qzoneBtn: UIButton = { 134 | let btn = UIButton() 135 | btn.tag = 4 136 | btn.setImage(UIImage.tc_bundleImageNamed(name: "umsocial_qzone.png"), for: .normal) 137 | btn.addTarget(self, action: #selector(shareBtnClick(btn:)), for: .touchUpInside) 138 | btn.bounds = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: 40, height: 40)) 139 | btn.isHidden = true 140 | return btn 141 | }() 142 | lazy var titleLabel: UILabel = { 143 | let lbl = UILabel() 144 | lbl.text = "截屏分享" 145 | lbl.font = UIFont.boldSystemFont(ofSize: 30) 146 | lbl.textColor = UIColor.black 147 | lbl.sizeToFit() 148 | lbl.isHidden = true 149 | return lbl 150 | }() 151 | lazy var iconView = UIImageView(frame: UIScreen.main.bounds) 152 | lazy var cancelBtn: UIButton = { 153 | let btn = UIButton() 154 | btn.setTitle("取消", for: .normal) 155 | btn.titleLabel?.font = UIFont.systemFont(ofSize: 15) 156 | btn.setTitleColor(tc_Color(hex: "#ed5c4d"), for: .normal) 157 | btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside) 158 | btn.sizeToFit() 159 | btn.isHidden = true 160 | return btn 161 | }() 162 | 163 | required public init?(coder aDecoder: NSCoder) { 164 | fatalError("init(coder:) has not been implemented") 165 | } 166 | // 释放当前window 167 | deinit { 168 | TrickyTipsView.shared.bgWindows.removeLast() 169 | } 170 | } 171 | 172 | // MARK: - UI搭建 173 | extension TrickyShareView{ 174 | func buildUI() { 175 | addSubview(titleLabel) 176 | titleLabel.translatesAutoresizingMaskIntoConstraints = false 177 | if #available(iOS 9.0, *) { 178 | let titleLabelConstraints : [NSLayoutConstraint] = [ 179 | titleLabel.centerXAnchor.constraint(equalTo: self.centerXAnchor), 180 | titleLabel.bottomAnchor.constraint(equalTo: self.topAnchor, constant:70) 181 | ] 182 | NSLayoutConstraint.activate(titleLabelConstraints) 183 | } else { 184 | addConstraints([ 185 | NSLayoutConstraint(item: titleLabel, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0), 186 | NSLayoutConstraint(item: titleLabel, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1, constant: 70) 187 | ]) 188 | } 189 | addSubview(cancelBtn) 190 | cancelBtn.translatesAutoresizingMaskIntoConstraints = false 191 | if #available(iOS 9.0, *) { 192 | let cancelBtnConstraints : [NSLayoutConstraint] = [ 193 | cancelBtn.bottomAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 0), 194 | cancelBtn.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -30) 195 | ] 196 | NSLayoutConstraint.activate(cancelBtnConstraints) 197 | } else { 198 | addConstraints([ 199 | NSLayoutConstraint(item: cancelBtn, attribute: .bottom, relatedBy: .equal, toItem: titleLabel, attribute: .bottom, multiplier: 1, constant: 0), 200 | NSLayoutConstraint(item: cancelBtn, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1, constant: -30) 201 | ]) 202 | } 203 | addSubview(iconView) 204 | iconView.backgroundColor = UIColor.gray 205 | let line = UIView() 206 | addSubview(line) 207 | line.backgroundColor = tc_Color(hex: "#8b8b8b") 208 | line.translatesAutoresizingMaskIntoConstraints = false 209 | if #available(iOS 9.0, *) { 210 | let lineConstraints : [NSLayoutConstraint] = [ 211 | line.centerYAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 50+bounds.height*0.7), 212 | line.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 30), 213 | line.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -30), 214 | line.heightAnchor.constraint(equalToConstant: 1) 215 | ] 216 | NSLayoutConstraint.activate(lineConstraints) 217 | } else { 218 | addConstraints([ 219 | NSLayoutConstraint(item: line, attribute: .centerY, relatedBy: .equal, toItem: titleLabel, attribute: .bottom, multiplier: 1, constant: 50+bounds.height*0.7), 220 | NSLayoutConstraint(item: line, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant: 30), 221 | NSLayoutConstraint(item: line, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1, constant: -30), 222 | NSLayoutConstraint(item: line, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: 1) 223 | ]) 224 | } 225 | addSubview(sharetips) 226 | sharetips.translatesAutoresizingMaskIntoConstraints = false 227 | if #available(iOS 9.0, *) { 228 | let sharetipsConstraints : [NSLayoutConstraint] = [ 229 | sharetips.centerYAnchor.constraint(equalTo: line.centerYAnchor), 230 | sharetips.centerXAnchor.constraint(equalTo: self.centerXAnchor), 231 | sharetips.widthAnchor.constraint(equalToConstant: 80) 232 | ] 233 | NSLayoutConstraint.activate(sharetipsConstraints) 234 | 235 | } else { 236 | addConstraints([ 237 | NSLayoutConstraint(item: sharetips, attribute: .centerY, relatedBy: .equal, toItem: line, attribute: .centerY, multiplier: 1, constant: 0), 238 | NSLayoutConstraint(item: sharetips, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0), 239 | NSLayoutConstraint(item: sharetips, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: 80), 240 | 241 | ]) 242 | } 243 | let btns = [wxBtn,qqBtn,pyqBtn,wbBtn,qzoneBtn] 244 | let leftMargin :CGFloat = 20 245 | let sharH : CGFloat = 40 246 | let space = (self.bounds.width - leftMargin * 2 - sharH * 5)/4 247 | if #available(iOS 9.0, *) { 248 | let sharebottomView = UIStackView(arrangedSubviews: btns) 249 | addSubview(sharebottomView) 250 | sharebottomView.translatesAutoresizingMaskIntoConstraints = false 251 | NSLayoutConstraint.activate([ 252 | sharebottomView.leftAnchor.constraint(equalTo: self.leftAnchor,constant:leftMargin), 253 | sharebottomView.rightAnchor.constraint(equalTo: self.rightAnchor,constant:-leftMargin), 254 | sharebottomView.topAnchor.constraint(equalTo: line.bottomAnchor, constant: 20), 255 | sharebottomView.heightAnchor.constraint(equalToConstant: sharH) 256 | ]) 257 | sharebottomView.alignment = UIStackViewAlignment.fill 258 | sharebottomView.spacing = space 259 | // 子视图分部方式 (枚举值) 260 | sharebottomView.distribution = UIStackViewDistribution.fillEqually 261 | } else { 262 | for i in 0 ... btns.count-1{ 263 | let btn = btns[i] 264 | addSubview(btn) 265 | btn.translatesAutoresizingMaskIntoConstraints = false 266 | addConstraints([ 267 | NSLayoutConstraint(item: btn, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant: leftMargin + (space+sharH) * CGFloat(i)), 268 | NSLayoutConstraint(item: btn, attribute: .top, relatedBy: .equal, toItem: line, attribute: .bottom, multiplier: 1, constant: 20), 269 | NSLayoutConstraint(item: btn, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: sharH), 270 | NSLayoutConstraint(item: btn, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: sharH) 271 | ]) 272 | } 273 | } 274 | 275 | 276 | } 277 | } 278 | // MARK: - Bundle资源工具方法 279 | extension Bundle{ 280 | static func tc_myLibraryBundle()->Bundle?{ 281 | return Bundle(url: Bundle.tc_myLibraryBundleURL()!) 282 | } 283 | static func tc_myLibraryBundleURL()->URL?{ 284 | let bunndle = Bundle(for: TCScreenShotTools.self) 285 | return bunndle.url(forResource: "TCScreenShotTools", withExtension: "bundle") 286 | } 287 | } 288 | extension UIImage{ 289 | static func tc_bundleImageNamed(name:String)->UIImage{ 290 | return tc_imageNamed(name: name, inBundle: Bundle.tc_myLibraryBundle()!) 291 | } 292 | static func tc_imageNamed(name:String,inBundle:Bundle)->UIImage{ 293 | let iconName = name.components(separatedBy: ".png").first ?? "" 294 | if UIScreen.main.bounds.size.height > 1334 { 295 | if let iconX3 = UIImage(named: "\(iconName)@3x.png", in: inBundle, compatibleWith: nil){ 296 | return iconX3 297 | } 298 | if let iconX2 = UIImage(named: "\(iconName)@2x.png", in: inBundle, compatibleWith: nil){ 299 | return iconX2 300 | } 301 | return UIImage(named: name, in: inBundle, compatibleWith: nil) ?? UIImage() 302 | }else{ 303 | if let iconX2 = UIImage(named: "\(iconName)@2x.png", in: inBundle, compatibleWith: nil){ 304 | return iconX2 305 | } 306 | if let iconX = UIImage(named: name, in: inBundle, compatibleWith: nil){ 307 | return iconX 308 | } 309 | return UIImage(named: "\(iconName)@3x.png", in: inBundle, compatibleWith: nil) ?? UIImage() 310 | } 311 | } 312 | } 313 | -------------------------------------------------------------------------------- /TCScreenShotTools/Classes/TrickyTipsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TrickyTipsView.swift 3 | // TCScreenShotTools 4 | // 5 | // Created by 谈超 on 2017/5/15. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Photos 11 | let tipSViewH :CGFloat = 70.0 12 | 13 | class TrickyTipsView: UIWindow { 14 | var bgWindows : [UIWindow] = [] 15 | open static let shared: TrickyTipsView = { 16 | let instance = TrickyTipsView() 17 | return instance 18 | }() 19 | 20 | convenience init() { 21 | self.init(frame: CGRect(x: 0, y: -tipSViewH, width: UIScreen.main.bounds.width, height: tipSViewH)) 22 | buildUI() 23 | } 24 | override init(frame: CGRect) { 25 | super.init(frame: CGRect(x: 0, y: -tipSViewH, width: UIScreen.main.bounds.width, height: tipSViewH)) 26 | } 27 | 28 | lazy var tipLabel: UILabel = { 29 | let lbl = UILabel() 30 | lbl.text = "已捕获屏幕截图" 31 | lbl.font = UIFont.boldSystemFont(ofSize: 15) 32 | return lbl 33 | }() 34 | lazy var bottomTips: UILabel = { 35 | let lbl = UILabel() 36 | lbl.text = "点击分享截图给朋友" 37 | lbl.textColor = tc_Color(hex: "#808080") 38 | lbl.font = UIFont.systemFont(ofSize: 12) 39 | return lbl 40 | }() 41 | lazy var shareBtn: UIButton = { 42 | let btn = UIButton() 43 | btn.backgroundColor = tc_Color(hex: "#ed5c4d") 44 | btn.setTitle("分享", for: .normal) 45 | btn.setTitleColor(tc_Color(hex: "#ffffff"), for: .normal) 46 | btn.addTarget(self, action: #selector(shareButtonClick), for: UIControlEvents.touchUpInside) 47 | return btn 48 | }() 49 | lazy var leftView: UIView = { 50 | let leftView = UIView() 51 | leftView.backgroundColor = UIColor.white 52 | leftView.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(handleSwipeFrom(recognizer:)))) 53 | return leftView 54 | }() 55 | lazy var rightView = UIView() 56 | required init?(coder aDecoder: NSCoder) { 57 | fatalError("init(coder:) has not been implemented") 58 | } 59 | var timer : Timer? 60 | 61 | } 62 | // MARK:UI搭建 63 | extension TrickyTipsView{ 64 | func buildUI() { 65 | // UIWindowLevelStatusBar 是当前window遮盖statusBar 66 | self.windowLevel = UIWindowLevelStatusBar 67 | self.backgroundColor = UIColor.white 68 | leftView.addSubview(tipLabel) 69 | tipLabel.translatesAutoresizingMaskIntoConstraints = false 70 | if #available(iOS 9.0, *) { 71 | let tipsLabelConstraints : [NSLayoutConstraint] = [ 72 | tipLabel.bottomAnchor.constraint(equalTo: leftView.centerYAnchor, constant: -10), 73 | tipLabel.leftAnchor.constraint(equalTo: leftView.leftAnchor, constant: 40) 74 | ] 75 | NSLayoutConstraint.activate(tipsLabelConstraints) 76 | } else { 77 | leftView.addConstraints([ 78 | NSLayoutConstraint(item: tipLabel, attribute: .bottom, relatedBy: .equal, toItem: leftView, attribute: .centerY, multiplier: 1, constant: -10), 79 | NSLayoutConstraint(item: tipLabel, attribute: .left, relatedBy: .equal, toItem: leftView, attribute: .left, multiplier: 1, constant: 40) 80 | ]) 81 | } 82 | 83 | leftView.addSubview(bottomTips) 84 | bottomTips.translatesAutoresizingMaskIntoConstraints = false 85 | if #available(iOS 9.0, *) { 86 | let bottomtipsContraints : [NSLayoutConstraint] = [ 87 | bottomTips.topAnchor.constraint(equalTo: leftView.centerYAnchor, constant: 10), 88 | bottomTips.leftAnchor.constraint(equalTo: tipLabel.leftAnchor, constant: 0) 89 | ] 90 | NSLayoutConstraint.activate(bottomtipsContraints) 91 | } else { 92 | leftView.addConstraints([ 93 | NSLayoutConstraint(item: bottomTips, attribute: .top, relatedBy: .equal, toItem: leftView, attribute: .centerY, multiplier: 1, constant: 10), 94 | NSLayoutConstraint(item: bottomTips, attribute: .left, relatedBy: .equal, toItem: tipLabel, attribute: .left, multiplier: 1, constant: 0) 95 | ]) 96 | } 97 | rightView.addSubview(shareBtn) 98 | shareBtn.translatesAutoresizingMaskIntoConstraints = false 99 | if #available(iOS 9.0, *) { 100 | NSLayoutConstraint.activate([ 101 | shareBtn.leftAnchor.constraint(equalTo: rightView.leftAnchor), 102 | shareBtn.rightAnchor.constraint(equalTo: rightView.rightAnchor), 103 | shareBtn.widthAnchor.constraint(equalToConstant: tipSViewH), 104 | shareBtn.heightAnchor.constraint(equalToConstant: tipSViewH) 105 | ]) 106 | } else { 107 | rightView.addConstraints([ 108 | NSLayoutConstraint(item: shareBtn, attribute: .left, relatedBy: .equal, toItem: rightView, attribute: .left, multiplier: 1, constant: 0), 109 | NSLayoutConstraint(item: shareBtn, attribute: .right, relatedBy: .equal, toItem: rightView, attribute: .right, multiplier: 1, constant: 0), 110 | NSLayoutConstraint(item: shareBtn, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: tipSViewH), 111 | NSLayoutConstraint(item: shareBtn, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: tipSViewH) 112 | ]) 113 | } 114 | rightView.backgroundColor = tc_Color(hex: "#ed5c4d") 115 | if #available(iOS 9.0, *) { 116 | let stackView = UIStackView(arrangedSubviews: [leftView,rightView]) 117 | stackView.alignment = UIStackViewAlignment.fill 118 | stackView.spacing = 0 119 | // 子视图分部方式 (枚举值) 120 | stackView.distribution = UIStackViewDistribution.fill 121 | self.addSubview(stackView) 122 | stackView.translatesAutoresizingMaskIntoConstraints = false 123 | NSLayoutConstraint.activate([ 124 | stackView.leftAnchor.constraint(equalTo: self.leftAnchor), 125 | stackView.topAnchor.constraint(equalTo: self.topAnchor), 126 | stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor), 127 | stackView.rightAnchor.constraint(equalTo: self.rightAnchor) 128 | ]) 129 | 130 | } else { 131 | addSubview(leftView) 132 | addSubview(rightView) 133 | leftView.translatesAutoresizingMaskIntoConstraints = false 134 | rightView.translatesAutoresizingMaskIntoConstraints = false 135 | addConstraints([ 136 | NSLayoutConstraint(item: leftView, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant: 0), 137 | NSLayoutConstraint(item: leftView, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1, constant: 0), 138 | NSLayoutConstraint(item: leftView, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1, constant: 0), 139 | NSLayoutConstraint(item: rightView, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1, constant: 0), 140 | NSLayoutConstraint(item: rightView, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1, constant: 0), 141 | NSLayoutConstraint(item: rightView, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1, constant: 0), 142 | NSLayoutConstraint(item: rightView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: tipSViewH), 143 | NSLayoutConstraint(item: rightView, attribute: .left, relatedBy: .equal, toItem: leftView, attribute: .right, multiplier: 1, constant: 0) 144 | ]) 145 | } 146 | 147 | let bottomLine = UIView() 148 | addSubview(bottomLine) 149 | bottomLine.backgroundColor = tc_Color(hex: "#808080") 150 | bottomLine.layer.cornerRadius = 1 151 | bottomLine.clipsToBounds = true 152 | bottomLine.translatesAutoresizingMaskIntoConstraints = false 153 | if #available(iOS 9.0, *) { 154 | NSLayoutConstraint.activate([ 155 | bottomLine.bottomAnchor.constraint(equalTo: self.bottomAnchor), 156 | bottomLine.centerXAnchor.constraint(equalTo: self.centerXAnchor), 157 | bottomLine.heightAnchor.constraint(equalToConstant: 2), 158 | bottomLine.widthAnchor.constraint(equalToConstant: 50) 159 | ]) 160 | } else { 161 | addConstraints([ 162 | NSLayoutConstraint(item: bottomLine, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1, constant: 0), 163 | NSLayoutConstraint(item: bottomLine, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant: 0), 164 | NSLayoutConstraint(item: bottomLine, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1, constant: 2), 165 | NSLayoutConstraint(item: bottomLine, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1, constant: 50) 166 | ]) 167 | } 168 | 169 | } 170 | } 171 | // MARK:事件响应 172 | extension TrickyTipsView{ 173 | func showTips() { 174 | timer?.invalidate() 175 | timer = nil 176 | self.isHidden = false 177 | UIView.animate(withDuration: 1) { 178 | self.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: tipSViewH) 179 | } 180 | timer = Timer.scheduledTimer(timeInterval: 8, target: self, selector: #selector(hiddenTips), userInfo: nil, repeats: false) 181 | } 182 | func hiddenTips() { 183 | timer?.invalidate() 184 | timer = nil 185 | UIView.animate(withDuration: 1, animations: { 186 | self.frame = CGRect(x: 0, y: -tipSViewH, width: UIScreen.main.bounds.width, height: tipSViewH) 187 | }) { (stop) in 188 | self.isHidden = true 189 | } 190 | } 191 | func handleSwipeFrom(recognizer:UIPanGestureRecognizer) { 192 | if recognizer.state == .cancelled || recognizer.state == .ended || recognizer.state == .failed{ 193 | if center.y >= tipSViewH/2 { 194 | showTips() 195 | }else{ 196 | hiddenTips() 197 | } 198 | }else{ 199 | timer?.invalidate() 200 | timer = nil 201 | let translation = recognizer.translation(in: leftView) 202 | recognizer.setTranslation(CGPoint(x: 0, y: 0), in: leftView) 203 | let centY = center.y + translation.y 204 | if centY > tipSViewH/2 { 205 | recognizer.setTranslation(CGPoint(x: 0, y: 0), in: leftView) 206 | return 207 | } 208 | if centY < -tipSViewH/2 { 209 | return 210 | } 211 | self.center = CGPoint(x: center.x, y: centY) 212 | } 213 | } 214 | 215 | func shareButtonClick() { 216 | self.isHidden = true 217 | self.frame = CGRect(x: 0, y: -tipSViewH, width: UIScreen.main.bounds.width, height: tipSViewH) 218 | if PhotoLibraryPermissions() == false { 219 | return 220 | } 221 | getNewPhoto { (icon) in 222 | if icon != nil{ 223 | _ = TrickyShareView.show(icon: icon) 224 | } 225 | } 226 | } 227 | } 228 | // MARK:相册相关 229 | extension TrickyTipsView{ 230 | func openSetting() { 231 | if UIApplication.shared.canOpenURL(URL(string: UIApplicationOpenSettingsURLString)!) { 232 | UIApplication.shared.openURL(URL(string: UIApplicationOpenSettingsURLString)!) 233 | } 234 | } 235 | func openSetView() { 236 | // 判断上一次拒绝是多久之前。避免频繁弹窗用户反感 设置为30天后再次弹窗 237 | if UserDefaults.standard.bool(forKey: "TCScreenShotTools Would Like to Access Your Photos") { 238 | let lastDate = UserDefaults.standard.value(forKey: "TCScreenShotTools Would Like to Access Your Photos Time") as! NSDate 239 | if NSDate().timeIntervalSince1970 - lastDate.timeIntervalSince1970<30*24*60*60 { 240 | return 241 | } 242 | } 243 | let appName = Bundle.main.infoDictionary!["CFBundleName"] ?? "app" 244 | var title = "\"\(appName)\" Would Like to Access Your Photos" 245 | var cancelTitle = "Don't Allow" 246 | var okTitle = "OK" 247 | let currentLanguage = NSLocale.preferredLanguages.first ?? "" 248 | if currentLanguage.hasPrefix("zh-Han"){ 249 | title = "\"\(appName)\"想访问您的照片" 250 | cancelTitle = "不允许" 251 | okTitle = "好" 252 | } 253 | let alert = UIAlertController(title: title, message: nil, preferredStyle: UIAlertControllerStyle.alert) 254 | alert.addAction(UIAlertAction(title: cancelTitle, style: UIAlertActionStyle.cancel, handler: { (_) in 255 | UserDefaults.standard.set(true, forKey: "TCScreenShotTools Would Like to Access Your Photos") 256 | UserDefaults.standard.set(NSDate(), forKey: "TCScreenShotTools Would Like to Access Your Photos Time") 257 | UserDefaults.standard.synchronize() 258 | alert.dismiss(animated: true, completion: nil) 259 | })) 260 | alert.addAction(UIAlertAction(title: okTitle, style: UIAlertActionStyle.default, handler: {[weak self] (action) in 261 | UserDefaults.standard.set(false, forKey: "TCScreenShotTools Would Like to Access Your Photos") 262 | UserDefaults.standard.synchronize() 263 | self?.openSetting() 264 | })) 265 | UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil) 266 | } 267 | func PhotoLibraryPermissions() -> Bool { 268 | let library:PHAuthorizationStatus = PHPhotoLibrary.authorizationStatus() 269 | if(library == PHAuthorizationStatus.denied || library == PHAuthorizationStatus.restricted){ 270 | openSetView() 271 | return false 272 | }else { 273 | return true 274 | } 275 | } 276 | func getNewPhoto(completion: @escaping (_ result:UIImage?) -> ()) -> () { 277 | //         申请权限 278 | PHPhotoLibrary.requestAuthorization { (status) in 279 | if status != .authorized { 280 | return 281 | } 282 | let smartOptions = PHFetchOptions() 283 | let collection = PHAssetCollection.fetchAssetCollections(with: .smartAlbum,subtype: .albumRegular, options: smartOptions) 284 | for i in 0..UIColor{ 311 | var cString = hex.trimmingCharacters(in:CharacterSet.whitespacesAndNewlines).uppercased() 312 | if (cString.hasPrefix("#")) { 313 | let index = cString.index(cString.startIndex, offsetBy:1) 314 | cString = cString.substring(from: index) 315 | } 316 | 317 | if (cString.characters.count != 6) { 318 | return UIColor.red 319 | } 320 | 321 | let rIndex = cString.index(cString.startIndex, offsetBy: 2) 322 | let rString = cString.substring(to: rIndex) 323 | let otherString = cString.substring(from: rIndex) 324 | let gIndex = otherString.index(otherString.startIndex, offsetBy: 2) 325 | let gString = otherString.substring(to: gIndex) 326 | let bIndex = cString.index(cString.endIndex, offsetBy: -2) 327 | let bString = cString.substring(from: bIndex) 328 | 329 | var r:CUnsignedInt = 0, g:CUnsignedInt = 0, b:CUnsignedInt = 0; 330 | Scanner(string: rString).scanHexInt32(&r) 331 | Scanner(string: gString).scanHexInt32(&g) 332 | Scanner(string: bString).scanHexInt32(&b) 333 | 334 | return UIColor(red: CGFloat(r) / 255.0, green: CGFloat(g) / 255.0, blue: CGFloat(b) / 255.0, alpha: CGFloat(1)) 335 | } 336 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 27DA07B4E9AECFA6460BE502 /* Pods_TCScreenShotToolsExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5753F4E4BE3AF7FEA4FB1C99 /* Pods_TCScreenShotToolsExample.framework */; }; 11 | D5157DC01EC98E540090C287 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5157DBF1EC98E540090C287 /* AppDelegate.swift */; }; 12 | D5157DC21EC98E540090C287 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5157DC11EC98E540090C287 /* ViewController.swift */; }; 13 | D5157DC51EC98E540090C287 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D5157DC31EC98E540090C287 /* Main.storyboard */; }; 14 | D5157DC71EC98E540090C287 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D5157DC61EC98E540090C287 /* Assets.xcassets */; }; 15 | D5157DCA1EC98E540090C287 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D5157DC81EC98E540090C287 /* LaunchScreen.storyboard */; }; 16 | D5157DD21EC98E7D0090C287 /* Podfile in Resources */ = {isa = PBXBuildFile; fileRef = D5157DD11EC98E7D0090C287 /* Podfile */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 5753F4E4BE3AF7FEA4FB1C99 /* Pods_TCScreenShotToolsExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TCScreenShotToolsExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 93A8AE0C9BB38564EA4B71CB /* Pods-TCScreenShotToolsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TCScreenShotToolsExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.release.xcconfig"; sourceTree = ""; }; 22 | 94D2247C30412E18EA440F0E /* Pods-TCScreenShotToolsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TCScreenShotToolsExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample.debug.xcconfig"; sourceTree = ""; }; 23 | D5157DBC1EC98E540090C287 /* TCScreenShotToolsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TCScreenShotToolsExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | D5157DBF1EC98E540090C287 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 25 | D5157DC11EC98E540090C287 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 26 | D5157DC41EC98E540090C287 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | D5157DC61EC98E540090C287 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | D5157DC91EC98E540090C287 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | D5157DCB1EC98E540090C287 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | D5157DD11EC98E7D0090C287 /* Podfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Podfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | D5157DB91EC98E540090C287 /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | 27DA07B4E9AECFA6460BE502 /* Pods_TCScreenShotToolsExample.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 72A4F15F9400D23E5E62DE64 /* Pods */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 94D2247C30412E18EA440F0E /* Pods-TCScreenShotToolsExample.debug.xcconfig */, 49 | 93A8AE0C9BB38564EA4B71CB /* Pods-TCScreenShotToolsExample.release.xcconfig */, 50 | ); 51 | name = Pods; 52 | sourceTree = ""; 53 | }; 54 | D5157DB31EC98E540090C287 = { 55 | isa = PBXGroup; 56 | children = ( 57 | D5157DD11EC98E7D0090C287 /* Podfile */, 58 | D5157DBE1EC98E540090C287 /* TCScreenShotToolsExample */, 59 | D5157DBD1EC98E540090C287 /* Products */, 60 | 72A4F15F9400D23E5E62DE64 /* Pods */, 61 | ED164CF71038E14DB8B8B696 /* Frameworks */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | D5157DBD1EC98E540090C287 /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | D5157DBC1EC98E540090C287 /* TCScreenShotToolsExample.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | D5157DBE1EC98E540090C287 /* TCScreenShotToolsExample */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | D5157DBF1EC98E540090C287 /* AppDelegate.swift */, 77 | D5157DC11EC98E540090C287 /* ViewController.swift */, 78 | D5157DC31EC98E540090C287 /* Main.storyboard */, 79 | D5157DC61EC98E540090C287 /* Assets.xcassets */, 80 | D5157DC81EC98E540090C287 /* LaunchScreen.storyboard */, 81 | D5157DCB1EC98E540090C287 /* Info.plist */, 82 | ); 83 | path = TCScreenShotToolsExample; 84 | sourceTree = ""; 85 | }; 86 | ED164CF71038E14DB8B8B696 /* Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 5753F4E4BE3AF7FEA4FB1C99 /* Pods_TCScreenShotToolsExample.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | D5157DBB1EC98E540090C287 /* TCScreenShotToolsExample */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = D5157DCE1EC98E540090C287 /* Build configuration list for PBXNativeTarget "TCScreenShotToolsExample" */; 100 | buildPhases = ( 101 | 782117DC5774FD33AD33D25C /* [CP] Check Pods Manifest.lock */, 102 | D5157DB81EC98E540090C287 /* Sources */, 103 | D5157DB91EC98E540090C287 /* Frameworks */, 104 | D5157DBA1EC98E540090C287 /* Resources */, 105 | 2664BF50D08B0FE1128568F6 /* [CP] Embed Pods Frameworks */, 106 | 623CFC5812BA49482D4994D4 /* [CP] Copy Pods Resources */, 107 | ); 108 | buildRules = ( 109 | ); 110 | dependencies = ( 111 | ); 112 | name = TCScreenShotToolsExample; 113 | productName = TCScreenShotToolsExample; 114 | productReference = D5157DBC1EC98E540090C287 /* TCScreenShotToolsExample.app */; 115 | productType = "com.apple.product-type.application"; 116 | }; 117 | /* End PBXNativeTarget section */ 118 | 119 | /* Begin PBXProject section */ 120 | D5157DB41EC98E540090C287 /* Project object */ = { 121 | isa = PBXProject; 122 | attributes = { 123 | LastSwiftUpdateCheck = 0830; 124 | LastUpgradeCheck = 0830; 125 | ORGANIZATIONNAME = "谈超"; 126 | TargetAttributes = { 127 | D5157DBB1EC98E540090C287 = { 128 | CreatedOnToolsVersion = 8.3.2; 129 | DevelopmentTeam = 3T49HA5P6P; 130 | ProvisioningStyle = Automatic; 131 | }; 132 | }; 133 | }; 134 | buildConfigurationList = D5157DB71EC98E540090C287 /* Build configuration list for PBXProject "TCScreenShotToolsExample" */; 135 | compatibilityVersion = "Xcode 3.2"; 136 | developmentRegion = English; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | Base, 141 | ); 142 | mainGroup = D5157DB31EC98E540090C287; 143 | productRefGroup = D5157DBD1EC98E540090C287 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | D5157DBB1EC98E540090C287 /* TCScreenShotToolsExample */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | D5157DBA1EC98E540090C287 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | D5157DCA1EC98E540090C287 /* LaunchScreen.storyboard in Resources */, 158 | D5157DC71EC98E540090C287 /* Assets.xcassets in Resources */, 159 | D5157DD21EC98E7D0090C287 /* Podfile in Resources */, 160 | D5157DC51EC98E540090C287 /* Main.storyboard in Resources */, 161 | ); 162 | runOnlyForDeploymentPostprocessing = 0; 163 | }; 164 | /* End PBXResourcesBuildPhase section */ 165 | 166 | /* Begin PBXShellScriptBuildPhase section */ 167 | 2664BF50D08B0FE1128568F6 /* [CP] Embed Pods Frameworks */ = { 168 | isa = PBXShellScriptBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | ); 172 | inputPaths = ( 173 | ); 174 | name = "[CP] Embed Pods Frameworks"; 175 | outputPaths = ( 176 | ); 177 | runOnlyForDeploymentPostprocessing = 0; 178 | shellPath = /bin/sh; 179 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-frameworks.sh\"\n"; 180 | showEnvVarsInLog = 0; 181 | }; 182 | 623CFC5812BA49482D4994D4 /* [CP] Copy Pods Resources */ = { 183 | isa = PBXShellScriptBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | ); 187 | inputPaths = ( 188 | ); 189 | name = "[CP] Copy Pods Resources"; 190 | outputPaths = ( 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | shellPath = /bin/sh; 194 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-TCScreenShotToolsExample/Pods-TCScreenShotToolsExample-resources.sh\"\n"; 195 | showEnvVarsInLog = 0; 196 | }; 197 | 782117DC5774FD33AD33D25C /* [CP] Check Pods Manifest.lock */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "[CP] Check Pods Manifest.lock"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 210 | showEnvVarsInLog = 0; 211 | }; 212 | /* End PBXShellScriptBuildPhase section */ 213 | 214 | /* Begin PBXSourcesBuildPhase section */ 215 | D5157DB81EC98E540090C287 /* Sources */ = { 216 | isa = PBXSourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | D5157DC21EC98E540090C287 /* ViewController.swift in Sources */, 220 | D5157DC01EC98E540090C287 /* AppDelegate.swift in Sources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | /* End PBXSourcesBuildPhase section */ 225 | 226 | /* Begin PBXVariantGroup section */ 227 | D5157DC31EC98E540090C287 /* Main.storyboard */ = { 228 | isa = PBXVariantGroup; 229 | children = ( 230 | D5157DC41EC98E540090C287 /* Base */, 231 | ); 232 | name = Main.storyboard; 233 | sourceTree = ""; 234 | }; 235 | D5157DC81EC98E540090C287 /* LaunchScreen.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | D5157DC91EC98E540090C287 /* Base */, 239 | ); 240 | name = LaunchScreen.storyboard; 241 | sourceTree = ""; 242 | }; 243 | /* End PBXVariantGroup section */ 244 | 245 | /* Begin XCBuildConfiguration section */ 246 | D5157DCC1EC98E540090C287 /* Debug */ = { 247 | isa = XCBuildConfiguration; 248 | buildSettings = { 249 | ALWAYS_SEARCH_USER_PATHS = NO; 250 | CLANG_ANALYZER_NONNULL = YES; 251 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 253 | CLANG_CXX_LIBRARY = "libc++"; 254 | CLANG_ENABLE_MODULES = YES; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_BOOL_CONVERSION = YES; 257 | CLANG_WARN_CONSTANT_CONVERSION = YES; 258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 259 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 260 | CLANG_WARN_EMPTY_BODY = YES; 261 | CLANG_WARN_ENUM_CONVERSION = YES; 262 | CLANG_WARN_INFINITE_RECURSION = YES; 263 | CLANG_WARN_INT_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 266 | CLANG_WARN_UNREACHABLE_CODE = YES; 267 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 268 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 269 | COPY_PHASE_STRIP = NO; 270 | DEBUG_INFORMATION_FORMAT = dwarf; 271 | ENABLE_STRICT_OBJC_MSGSEND = YES; 272 | ENABLE_TESTABILITY = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu99; 274 | GCC_DYNAMIC_NO_PIC = NO; 275 | GCC_NO_COMMON_BLOCKS = YES; 276 | GCC_OPTIMIZATION_LEVEL = 0; 277 | GCC_PREPROCESSOR_DEFINITIONS = ( 278 | "DEBUG=1", 279 | "$(inherited)", 280 | ); 281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 283 | GCC_WARN_UNDECLARED_SELECTOR = YES; 284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 285 | GCC_WARN_UNUSED_FUNCTION = YES; 286 | GCC_WARN_UNUSED_VARIABLE = YES; 287 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 288 | MTL_ENABLE_DEBUG_INFO = YES; 289 | ONLY_ACTIVE_ARCH = YES; 290 | SDKROOT = iphoneos; 291 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 292 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 293 | }; 294 | name = Debug; 295 | }; 296 | D5157DCD1EC98E540090C287 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ALWAYS_SEARCH_USER_PATHS = NO; 300 | CLANG_ANALYZER_NONNULL = YES; 301 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 302 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 303 | CLANG_CXX_LIBRARY = "libc++"; 304 | CLANG_ENABLE_MODULES = YES; 305 | CLANG_ENABLE_OBJC_ARC = YES; 306 | CLANG_WARN_BOOL_CONVERSION = YES; 307 | CLANG_WARN_CONSTANT_CONVERSION = YES; 308 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 309 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 315 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 316 | CLANG_WARN_UNREACHABLE_CODE = YES; 317 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 318 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 319 | COPY_PHASE_STRIP = NO; 320 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 321 | ENABLE_NS_ASSERTIONS = NO; 322 | ENABLE_STRICT_OBJC_MSGSEND = YES; 323 | GCC_C_LANGUAGE_STANDARD = gnu99; 324 | GCC_NO_COMMON_BLOCKS = YES; 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 332 | MTL_ENABLE_DEBUG_INFO = NO; 333 | SDKROOT = iphoneos; 334 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 335 | VALIDATE_PRODUCT = YES; 336 | }; 337 | name = Release; 338 | }; 339 | D5157DCF1EC98E540090C287 /* Debug */ = { 340 | isa = XCBuildConfiguration; 341 | baseConfigurationReference = 94D2247C30412E18EA440F0E /* Pods-TCScreenShotToolsExample.debug.xcconfig */; 342 | buildSettings = { 343 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 344 | DEVELOPMENT_TEAM = 3T49HA5P6P; 345 | INFOPLIST_FILE = TCScreenShotToolsExample/Info.plist; 346 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 347 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 348 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.TCScreenShotTools-Example-org.cocoapods.demo.TCScreenShotTools-Example-"; 349 | PRODUCT_NAME = "$(TARGET_NAME)"; 350 | SWIFT_VERSION = 3.0; 351 | }; 352 | name = Debug; 353 | }; 354 | D5157DD01EC98E540090C287 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | baseConfigurationReference = 93A8AE0C9BB38564EA4B71CB /* Pods-TCScreenShotToolsExample.release.xcconfig */; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | DEVELOPMENT_TEAM = 3T49HA5P6P; 360 | INFOPLIST_FILE = TCScreenShotToolsExample/Info.plist; 361 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.TCScreenShotTools-Example-org.cocoapods.demo.TCScreenShotTools-Example-"; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SWIFT_VERSION = 3.0; 366 | }; 367 | name = Release; 368 | }; 369 | /* End XCBuildConfiguration section */ 370 | 371 | /* Begin XCConfigurationList section */ 372 | D5157DB71EC98E540090C287 /* Build configuration list for PBXProject "TCScreenShotToolsExample" */ = { 373 | isa = XCConfigurationList; 374 | buildConfigurations = ( 375 | D5157DCC1EC98E540090C287 /* Debug */, 376 | D5157DCD1EC98E540090C287 /* Release */, 377 | ); 378 | defaultConfigurationIsVisible = 0; 379 | defaultConfigurationName = Release; 380 | }; 381 | D5157DCE1EC98E540090C287 /* Build configuration list for PBXNativeTarget "TCScreenShotToolsExample" */ = { 382 | isa = XCConfigurationList; 383 | buildConfigurations = ( 384 | D5157DCF1EC98E540090C287 /* Debug */, 385 | D5157DD01EC98E540090C287 /* Release */, 386 | ); 387 | defaultConfigurationIsVisible = 0; 388 | defaultConfigurationName = Release; 389 | }; 390 | /* End XCConfigurationList section */ 391 | }; 392 | rootObject = D5157DB41EC98E540090C287 /* Project object */; 393 | } 394 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcodeproj/project.xcworkspace/xcuserdata/tanchao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotToolsExample.xcodeproj/project.xcworkspace/xcuserdata/tanchao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/TCScreenShotToolsExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcodeproj/xcuserdata/tanchao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TCScreenShotToolsExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D5157DBB1EC98E540090C287 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcworkspace/xcuserdata/tanchao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/TCScreenShotToolsExample.xcworkspace/xcuserdata/tanchao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TCScreenShotToolsExample.xcworkspace/xcuserdata/tanchao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TCScreenShotToolsExample 4 | // 5 | // Created by 谈超 on 2017/5/15. 6 | // Copyright © 2017年 谈超. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import TCScreenShotTools 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | var window: UIWindow? 14 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 15 | TCScreenShotTools.shared.enable = true 16 | TCScreenShotTools.shared.delegate = self 17 | return true 18 | } 19 | 20 | func applicationWillResignActive(_ application: UIApplication) { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 23 | } 24 | 25 | func applicationDidEnterBackground(_ application: UIApplication) { 26 | // 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. 27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 28 | } 29 | 30 | func applicationWillEnterForeground(_ application: UIApplication) { 31 | // 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. 32 | } 33 | 34 | func applicationDidBecomeActive(_ application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | func applicationWillTerminate(_ application: UIApplication) { 39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 40 | } 41 | 42 | } 43 | extension AppDelegate: TCScreenShotToolsDelegate{ 44 | func screenShotTools(_tools: TCScreenShotTools, didClickShareBtn withShareType: TrickyShareType, withIcon: UIImage, in shareView: TrickyShareView) { 45 | print(withShareType) 46 | print(withIcon) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample/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" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /TCScreenShotToolsExample/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 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample/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 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample/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 | NSPhotoLibraryAddUsageDescription 24 | 需要访问您的相册 25 | NSPhotoLibraryUsageDescription 26 | 需要访问您的相册 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UIStatusBarStyle 36 | UIStatusBarStyleLightContent 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /TCScreenShotToolsExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TCScreenShotToolsExample 4 | // 5 | // Created by 谈超 on 2017/5/15. 6 | // Copyright © 2017年 谈超. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import TCScreenShotTools 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | if #available(iOS 9.0, *) { 16 | let sv = UIStackView(arrangedSubviews: [yellowView,blueView]) 17 | view.addSubview(sv) 18 | sv.translatesAutoresizingMaskIntoConstraints = false 19 | NSLayoutConstraint.activate([ 20 | sv.centerXAnchor.constraint(equalTo: view.centerXAnchor), 21 | sv.centerYAnchor.constraint(equalTo: view.centerYAnchor), 22 | sv.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.8), 23 | sv.heightAnchor.constraint(equalToConstant: 200) 24 | ]) 25 | sv.alignment = UIStackViewAlignment.fill 26 | sv.spacing = 15 27 | // 子视图分部方式 (枚举值) 28 | sv.distribution = UIStackViewDistribution.fillEqually 29 | } else { 30 | // Fallback on earlier versions 31 | } 32 | 33 | } 34 | 35 | func haha() { 36 | if TCPlatform.isSimulator { 37 | NotificationCenter.default.post(Notification.init(name: NSNotification.Name.UIApplicationUserDidTakeScreenshot)) 38 | }else{ 39 | let alert = UIAlertController(title: "手机用户请使用Home+Power键截屏", message: nil, preferredStyle: UIAlertControllerStyle.alert) 40 | UIApplication.shared.keyWindow?.rootViewController?.present(alert, animated: true, completion: nil) 41 | DispatchQueue.main.asyncAfter(deadline: .now()+2) { 42 | alert.dismiss(animated: true, completion: nil) 43 | } 44 | } 45 | 46 | print(#function) 47 | } 48 | lazy var yellowView : UIButton = { 49 | let view = UIButton() 50 | view.backgroundColor = UIColor.red 51 | view.setTitle("模拟器用户点击截图", for: UIControlState.normal) 52 | view.titleLabel?.numberOfLines = 0 53 | view.addTarget(self, action: #selector(haha), for: .touchUpInside) 54 | return view 55 | }() 56 | 57 | lazy var blueView : UIButton = { 58 | let view = UIButton() 59 | view.backgroundColor = UIColor.blue 60 | view.setTitle("手机用户使用Home+Power键截屏", for: UIControlState.normal) 61 | view.titleLabel?.numberOfLines = 0 62 | view.addTarget(self, action: #selector(haha), for: .touchUpInside) 63 | return view 64 | }() 65 | 66 | // lazy var purpleView : UIButton = { 67 | // let view = UIButton() 68 | // view.backgroundColor = UIColor.purple 69 | // view.addTarget(self, action: #selector(haha), for: .touchUpInside) 70 | // return view 71 | // }() 72 | 73 | 74 | 75 | override func didReceiveMemoryWarning() { 76 | super.didReceiveMemoryWarning() 77 | // Dispose of any resources that can be recreated. 78 | } 79 | 80 | 81 | } 82 | 83 | -------------------------------------------------------------------------------- /setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/setting.png -------------------------------------------------------------------------------- /演示.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itanchao/TCScreenShotTools/6d11a6c12511dbdfc7816ffb51c89690abf48fb7/演示.gif --------------------------------------------------------------------------------