├── .gitignore ├── .vscode ├── launch.json └── settings.json ├── README.md ├── confusionExample ├── confusionExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── bairdweng.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── bairdweng.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist └── confusionExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CFeCode │ ├── Model │ │ ├── CFModel.swift │ │ └── CFModel2.swift │ ├── OC │ │ ├── NSObject+Hello.h │ │ ├── NSObject+Hello.m │ │ ├── Test.h │ │ └── Test.m │ ├── ViewControllers │ │ ├── DataTableViewCell.swift │ │ ├── DataTableViewCell.xib │ │ ├── OneViewController.swift │ │ ├── OneViewController.xib │ │ ├── SubmitViewController.swift │ │ ├── SubmitViewController.xib │ │ ├── ViewController2.swift │ │ ├── ViewController2.xib │ │ └── confusionExample-Bridging-Header.h │ └── Views │ │ ├── CFSwitch.swift │ │ ├── CFView.swift │ │ ├── CFView2.swift │ │ └── CFView3.swift │ ├── Info.plist │ ├── Model.swift │ ├── SceneDelegate.swift │ ├── TestView.swift │ └── ViewController.swift └── python ├── .idea ├── misc.xml ├── modules.xml ├── python.iml └── workspace.xml ├── InstercodeToFile.py ├── InstercodeToFunc.py ├── MyAES.py ├── __pycache__ ├── InstercodeToFile.cpython-37.pyc ├── InstercodeToFunc.cpython-37.pyc ├── MyAES.cpython-37.pyc └── helper.cpython-37.pyc ├── helper.py ├── index.py ├── temple ├── cihui.txt ├── dc.json ├── func │ ├── funcTemple1.swift │ ├── funcTemple2.swift │ ├── funcTemple3.swift │ ├── funcTemple4.swift │ ├── funcTemple5.swift │ └── funcTemple6.swift ├── temple.m └── temple.swift └── textFormat.py /.gitignore: -------------------------------------------------------------------------------- 1 | templeDir 2 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Python: 当前文件", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${file}", 12 | "console": "integratedTerminal" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # python混淆 2 | 3 | ### 功能说明 4 | 5 | * 对类,函数,变量进行自动混淆。 6 | * 自动往函数插入垃圾代码,往类插入垃圾代码 7 | * 垃圾代码更加自然,仿佛不是那么垃圾。 8 | * 对字符串自动进行AES加密。 9 | * 注意事项 10 | * 所有需要混淆的函数以及变量增加hx_ 11 | 12 | ### 开始 13 | 14 | ```js 15 | python3 index.py xcode项目路径 16 | ``` 17 | 18 | ### AES字符串加密 19 | 20 | 在项目的根目录下创建文件 aes_config.json 21 | 22 | ```js 23 | [{ 24 | "filePath": "BoxConfusion/Box/BxKeyManage.swift",// 类的相对路径 25 | "ivkey": "aaaaaaaaaaaaaaaa",// 原本加密的key,python将自动替换 26 | // 所有需要加密的字符串列表 27 | "keys": [ 28 | "key1", 29 | "key2" 30 | ] 31 | }] 32 | ``` 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DA389A8424EAA43C0017A9B6 /* NSObject+Hello.m in Sources */ = {isa = PBXBuildFile; fileRef = DA389A8324EAA43C0017A9B6 /* NSObject+Hello.m */; }; 11 | DA5C973E24EBC2A0005F0B43 /* Test.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5C973D24EBC2A0005F0B43 /* Test.m */; }; 12 | DA86E6AE24500CD100F1742F /* TestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA86E6AD24500CD100F1742F /* TestView.swift */; }; 13 | DAB93F27247B6EFD00E33335 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAB93F26247B6EFD00E33335 /* Model.swift */; }; 14 | DAD82CC4244FFBE4008DE737 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD82CC3244FFBE4008DE737 /* AppDelegate.swift */; }; 15 | DAD82CC6244FFBE4008DE737 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD82CC5244FFBE4008DE737 /* SceneDelegate.swift */; }; 16 | DAD82CC8244FFBE4008DE737 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD82CC7244FFBE4008DE737 /* ViewController.swift */; }; 17 | DAD82CCB244FFBE4008DE737 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAD82CC9244FFBE4008DE737 /* Main.storyboard */; }; 18 | DAD82CCD244FFBE5008DE737 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAD82CCC244FFBE5008DE737 /* Assets.xcassets */; }; 19 | DAD82CD0244FFBE5008DE737 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAD82CCE244FFBE5008DE737 /* LaunchScreen.storyboard */; }; 20 | DAF89CFA247BC73900847111 /* CFView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89CF9247BC73900847111 /* CFView.swift */; }; 21 | DAF89CFD247BC74C00847111 /* OneViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89CFB247BC74C00847111 /* OneViewController.swift */; }; 22 | DAF89CFE247BC74C00847111 /* OneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAF89CFC247BC74C00847111 /* OneViewController.xib */; }; 23 | DAF89D03247BC77E00847111 /* CFModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D02247BC77E00847111 /* CFModel.swift */; }; 24 | DAF89D06247BE4FC00847111 /* ViewController2.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D04247BE4FC00847111 /* ViewController2.swift */; }; 25 | DAF89D07247BE4FC00847111 /* ViewController2.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAF89D05247BE4FC00847111 /* ViewController2.xib */; }; 26 | DAF89D0A247BE89200847111 /* DataTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D08247BE89200847111 /* DataTableViewCell.swift */; }; 27 | DAF89D0B247BE89200847111 /* DataTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAF89D09247BE89200847111 /* DataTableViewCell.xib */; }; 28 | DAF89D10247BEA8800847111 /* SubmitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D0E247BEA8800847111 /* SubmitViewController.swift */; }; 29 | DAF89D11247BEA8800847111 /* SubmitViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAF89D0F247BEA8800847111 /* SubmitViewController.xib */; }; 30 | DAF89D13247BEBF600847111 /* CFModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D12247BEBF600847111 /* CFModel2.swift */; }; 31 | DAF89D15247BECAD00847111 /* CFView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D14247BECAD00847111 /* CFView2.swift */; }; 32 | DAF89D17247BECBC00847111 /* CFView3.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D16247BECBC00847111 /* CFView3.swift */; }; 33 | DAF89D19247BEDA700847111 /* CFSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF89D18247BEDA700847111 /* CFSwitch.swift */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | DA389A8224EAA43C0017A9B6 /* NSObject+Hello.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+Hello.h"; sourceTree = ""; }; 38 | DA389A8324EAA43C0017A9B6 /* NSObject+Hello.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Hello.m"; sourceTree = ""; }; 39 | DA5C973C24EBC29F005F0B43 /* Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Test.h; sourceTree = ""; }; 40 | DA5C973D24EBC2A0005F0B43 /* Test.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Test.m; sourceTree = ""; }; 41 | DA805AF424D2CEAC009B4496 /* confusionExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "confusionExample-Bridging-Header.h"; sourceTree = ""; }; 42 | DA86E6AD24500CD100F1742F /* TestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestView.swift; sourceTree = ""; }; 43 | DAB93F26247B6EFD00E33335 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = ""; }; 44 | DAD82CC0244FFBE4008DE737 /* confusionExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = confusionExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | DAD82CC3244FFBE4008DE737 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46 | DAD82CC5244FFBE4008DE737 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 47 | DAD82CC7244FFBE4008DE737 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 48 | DAD82CCA244FFBE4008DE737 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | DAD82CCC244FFBE5008DE737 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | DAD82CCF244FFBE5008DE737 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | DAD82CD1244FFBE5008DE737 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | DAF89CF9247BC73900847111 /* CFView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFView.swift; sourceTree = ""; }; 53 | DAF89CFB247BC74C00847111 /* OneViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneViewController.swift; sourceTree = ""; }; 54 | DAF89CFC247BC74C00847111 /* OneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OneViewController.xib; sourceTree = ""; }; 55 | DAF89D02247BC77E00847111 /* CFModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFModel.swift; sourceTree = ""; }; 56 | DAF89D04247BE4FC00847111 /* ViewController2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController2.swift; sourceTree = ""; }; 57 | DAF89D05247BE4FC00847111 /* ViewController2.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ViewController2.xib; sourceTree = ""; }; 58 | DAF89D08247BE89200847111 /* DataTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTableViewCell.swift; sourceTree = ""; }; 59 | DAF89D09247BE89200847111 /* DataTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DataTableViewCell.xib; sourceTree = ""; }; 60 | DAF89D0E247BEA8800847111 /* SubmitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubmitViewController.swift; sourceTree = ""; }; 61 | DAF89D0F247BEA8800847111 /* SubmitViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SubmitViewController.xib; sourceTree = ""; }; 62 | DAF89D12247BEBF600847111 /* CFModel2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFModel2.swift; sourceTree = ""; }; 63 | DAF89D14247BECAD00847111 /* CFView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFView2.swift; sourceTree = ""; }; 64 | DAF89D16247BECBC00847111 /* CFView3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFView3.swift; sourceTree = ""; }; 65 | DAF89D18247BEDA700847111 /* CFSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFSwitch.swift; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | DAD82CBD244FFBE4008DE737 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | DA389A7E24EAA3330017A9B6 /* OC */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | DA389A8224EAA43C0017A9B6 /* NSObject+Hello.h */, 83 | DA389A8324EAA43C0017A9B6 /* NSObject+Hello.m */, 84 | DA5C973C24EBC29F005F0B43 /* Test.h */, 85 | DA5C973D24EBC2A0005F0B43 /* Test.m */, 86 | ); 87 | path = OC; 88 | sourceTree = ""; 89 | }; 90 | DAD82CB7244FFBE4008DE737 = { 91 | isa = PBXGroup; 92 | children = ( 93 | DAD82CC2244FFBE4008DE737 /* confusionExample */, 94 | DAD82CC1244FFBE4008DE737 /* Products */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | DAD82CC1244FFBE4008DE737 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | DAD82CC0244FFBE4008DE737 /* confusionExample.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | DAD82CC2244FFBE4008DE737 /* confusionExample */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | DAF89CF8247BC6F500847111 /* CFeCode */, 110 | DAD82CC3244FFBE4008DE737 /* AppDelegate.swift */, 111 | DAD82CC5244FFBE4008DE737 /* SceneDelegate.swift */, 112 | DAD82CC7244FFBE4008DE737 /* ViewController.swift */, 113 | DAD82CC9244FFBE4008DE737 /* Main.storyboard */, 114 | DAD82CCC244FFBE5008DE737 /* Assets.xcassets */, 115 | DAD82CCE244FFBE5008DE737 /* LaunchScreen.storyboard */, 116 | DAD82CD1244FFBE5008DE737 /* Info.plist */, 117 | DA86E6AD24500CD100F1742F /* TestView.swift */, 118 | DAB93F26247B6EFD00E33335 /* Model.swift */, 119 | ); 120 | path = confusionExample; 121 | sourceTree = ""; 122 | }; 123 | DAF89CF8247BC6F500847111 /* CFeCode */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | DA389A7E24EAA3330017A9B6 /* OC */, 127 | DAF89D01247BC76800847111 /* Model */, 128 | DAF89D00247BC75600847111 /* ViewControllers */, 129 | DAF89CFF247BC75000847111 /* Views */, 130 | ); 131 | path = CFeCode; 132 | sourceTree = ""; 133 | }; 134 | DAF89CFF247BC75000847111 /* Views */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | DAF89CF9247BC73900847111 /* CFView.swift */, 138 | DAF89D14247BECAD00847111 /* CFView2.swift */, 139 | DAF89D16247BECBC00847111 /* CFView3.swift */, 140 | DAF89D18247BEDA700847111 /* CFSwitch.swift */, 141 | ); 142 | path = Views; 143 | sourceTree = ""; 144 | }; 145 | DAF89D00247BC75600847111 /* ViewControllers */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | DAF89CFC247BC74C00847111 /* OneViewController.xib */, 149 | DAF89CFB247BC74C00847111 /* OneViewController.swift */, 150 | DAF89D04247BE4FC00847111 /* ViewController2.swift */, 151 | DAF89D05247BE4FC00847111 /* ViewController2.xib */, 152 | DAF89D08247BE89200847111 /* DataTableViewCell.swift */, 153 | DAF89D09247BE89200847111 /* DataTableViewCell.xib */, 154 | DAF89D0E247BEA8800847111 /* SubmitViewController.swift */, 155 | DAF89D0F247BEA8800847111 /* SubmitViewController.xib */, 156 | DA805AF424D2CEAC009B4496 /* confusionExample-Bridging-Header.h */, 157 | ); 158 | path = ViewControllers; 159 | sourceTree = ""; 160 | }; 161 | DAF89D01247BC76800847111 /* Model */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | DAF89D02247BC77E00847111 /* CFModel.swift */, 165 | DAF89D12247BEBF600847111 /* CFModel2.swift */, 166 | ); 167 | path = Model; 168 | sourceTree = ""; 169 | }; 170 | /* End PBXGroup section */ 171 | 172 | /* Begin PBXNativeTarget section */ 173 | DAD82CBF244FFBE4008DE737 /* confusionExample */ = { 174 | isa = PBXNativeTarget; 175 | buildConfigurationList = DAD82CD4244FFBE5008DE737 /* Build configuration list for PBXNativeTarget "confusionExample" */; 176 | buildPhases = ( 177 | DAD82CBC244FFBE4008DE737 /* Sources */, 178 | DAD82CBD244FFBE4008DE737 /* Frameworks */, 179 | DAD82CBE244FFBE4008DE737 /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = confusionExample; 186 | productName = confusionExample; 187 | productReference = DAD82CC0244FFBE4008DE737 /* confusionExample.app */; 188 | productType = "com.apple.product-type.application"; 189 | }; 190 | /* End PBXNativeTarget section */ 191 | 192 | /* Begin PBXProject section */ 193 | DAD82CB8244FFBE4008DE737 /* Project object */ = { 194 | isa = PBXProject; 195 | attributes = { 196 | LastSwiftUpdateCheck = 1140; 197 | LastUpgradeCheck = 1140; 198 | ORGANIZATIONNAME = bairdweng; 199 | TargetAttributes = { 200 | DAD82CBF244FFBE4008DE737 = { 201 | CreatedOnToolsVersion = 11.4.1; 202 | LastSwiftMigration = 1150; 203 | }; 204 | }; 205 | }; 206 | buildConfigurationList = DAD82CBB244FFBE4008DE737 /* Build configuration list for PBXProject "confusionExample" */; 207 | compatibilityVersion = "Xcode 9.3"; 208 | developmentRegion = en; 209 | hasScannedForEncodings = 0; 210 | knownRegions = ( 211 | en, 212 | Base, 213 | ); 214 | mainGroup = DAD82CB7244FFBE4008DE737; 215 | productRefGroup = DAD82CC1244FFBE4008DE737 /* Products */; 216 | projectDirPath = ""; 217 | projectRoot = ""; 218 | targets = ( 219 | DAD82CBF244FFBE4008DE737 /* confusionExample */, 220 | ); 221 | }; 222 | /* End PBXProject section */ 223 | 224 | /* Begin PBXResourcesBuildPhase section */ 225 | DAD82CBE244FFBE4008DE737 /* Resources */ = { 226 | isa = PBXResourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | DAF89D07247BE4FC00847111 /* ViewController2.xib in Resources */, 230 | DAF89D0B247BE89200847111 /* DataTableViewCell.xib in Resources */, 231 | DAF89D11247BEA8800847111 /* SubmitViewController.xib in Resources */, 232 | DAD82CD0244FFBE5008DE737 /* LaunchScreen.storyboard in Resources */, 233 | DAD82CCD244FFBE5008DE737 /* Assets.xcassets in Resources */, 234 | DAD82CCB244FFBE4008DE737 /* Main.storyboard in Resources */, 235 | DAF89CFE247BC74C00847111 /* OneViewController.xib in Resources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXResourcesBuildPhase section */ 240 | 241 | /* Begin PBXSourcesBuildPhase section */ 242 | DAD82CBC244FFBE4008DE737 /* Sources */ = { 243 | isa = PBXSourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | DAB93F27247B6EFD00E33335 /* Model.swift in Sources */, 247 | DAF89D13247BEBF600847111 /* CFModel2.swift in Sources */, 248 | DAF89CFA247BC73900847111 /* CFView.swift in Sources */, 249 | DAF89D15247BECAD00847111 /* CFView2.swift in Sources */, 250 | DA5C973E24EBC2A0005F0B43 /* Test.m in Sources */, 251 | DAF89D06247BE4FC00847111 /* ViewController2.swift in Sources */, 252 | DAF89D17247BECBC00847111 /* CFView3.swift in Sources */, 253 | DAF89D03247BC77E00847111 /* CFModel.swift in Sources */, 254 | DA86E6AE24500CD100F1742F /* TestView.swift in Sources */, 255 | DAD82CC8244FFBE4008DE737 /* ViewController.swift in Sources */, 256 | DA389A8424EAA43C0017A9B6 /* NSObject+Hello.m in Sources */, 257 | DAD82CC4244FFBE4008DE737 /* AppDelegate.swift in Sources */, 258 | DAF89D0A247BE89200847111 /* DataTableViewCell.swift in Sources */, 259 | DAF89D10247BEA8800847111 /* SubmitViewController.swift in Sources */, 260 | DAF89CFD247BC74C00847111 /* OneViewController.swift in Sources */, 261 | DAF89D19247BEDA700847111 /* CFSwitch.swift in Sources */, 262 | DAD82CC6244FFBE4008DE737 /* SceneDelegate.swift in Sources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | /* End PBXSourcesBuildPhase section */ 267 | 268 | /* Begin PBXVariantGroup section */ 269 | DAD82CC9244FFBE4008DE737 /* Main.storyboard */ = { 270 | isa = PBXVariantGroup; 271 | children = ( 272 | DAD82CCA244FFBE4008DE737 /* Base */, 273 | ); 274 | name = Main.storyboard; 275 | sourceTree = ""; 276 | }; 277 | DAD82CCE244FFBE5008DE737 /* LaunchScreen.storyboard */ = { 278 | isa = PBXVariantGroup; 279 | children = ( 280 | DAD82CCF244FFBE5008DE737 /* Base */, 281 | ); 282 | name = LaunchScreen.storyboard; 283 | sourceTree = ""; 284 | }; 285 | /* End PBXVariantGroup section */ 286 | 287 | /* Begin XCBuildConfiguration section */ 288 | DAD82CD2244FFBE5008DE737 /* Debug */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ALWAYS_SEARCH_USER_PATHS = NO; 292 | CLANG_ANALYZER_NONNULL = YES; 293 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 295 | CLANG_CXX_LIBRARY = "libc++"; 296 | CLANG_ENABLE_MODULES = YES; 297 | CLANG_ENABLE_OBJC_ARC = YES; 298 | CLANG_ENABLE_OBJC_WEAK = YES; 299 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 300 | CLANG_WARN_BOOL_CONVERSION = YES; 301 | CLANG_WARN_COMMA = YES; 302 | CLANG_WARN_CONSTANT_CONVERSION = YES; 303 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 304 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 305 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 306 | CLANG_WARN_EMPTY_BODY = YES; 307 | CLANG_WARN_ENUM_CONVERSION = YES; 308 | CLANG_WARN_INFINITE_RECURSION = YES; 309 | CLANG_WARN_INT_CONVERSION = YES; 310 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 311 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 312 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 313 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 314 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 315 | CLANG_WARN_STRICT_PROTOTYPES = YES; 316 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 317 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 318 | CLANG_WARN_UNREACHABLE_CODE = YES; 319 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 320 | COPY_PHASE_STRIP = NO; 321 | DEBUG_INFORMATION_FORMAT = dwarf; 322 | ENABLE_STRICT_OBJC_MSGSEND = YES; 323 | ENABLE_TESTABILITY = YES; 324 | GCC_C_LANGUAGE_STANDARD = gnu11; 325 | GCC_DYNAMIC_NO_PIC = NO; 326 | GCC_NO_COMMON_BLOCKS = YES; 327 | GCC_OPTIMIZATION_LEVEL = 0; 328 | GCC_PREPROCESSOR_DEFINITIONS = ( 329 | "DEBUG=1", 330 | "$(inherited)", 331 | ); 332 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 333 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 334 | GCC_WARN_UNDECLARED_SELECTOR = YES; 335 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 336 | GCC_WARN_UNUSED_FUNCTION = YES; 337 | GCC_WARN_UNUSED_VARIABLE = YES; 338 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 339 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 340 | MTL_FAST_MATH = YES; 341 | ONLY_ACTIVE_ARCH = YES; 342 | SDKROOT = iphoneos; 343 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 344 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 345 | }; 346 | name = Debug; 347 | }; 348 | DAD82CD3244FFBE5008DE737 /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_ANALYZER_NONNULL = YES; 353 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_ENABLE_OBJC_WEAK = YES; 359 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 360 | CLANG_WARN_BOOL_CONVERSION = YES; 361 | CLANG_WARN_COMMA = YES; 362 | CLANG_WARN_CONSTANT_CONVERSION = YES; 363 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 366 | CLANG_WARN_EMPTY_BODY = YES; 367 | CLANG_WARN_ENUM_CONVERSION = YES; 368 | CLANG_WARN_INFINITE_RECURSION = YES; 369 | CLANG_WARN_INT_CONVERSION = YES; 370 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 371 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 372 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 373 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 374 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 375 | CLANG_WARN_STRICT_PROTOTYPES = YES; 376 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 377 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 378 | CLANG_WARN_UNREACHABLE_CODE = YES; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | COPY_PHASE_STRIP = NO; 381 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 382 | ENABLE_NS_ASSERTIONS = NO; 383 | ENABLE_STRICT_OBJC_MSGSEND = YES; 384 | GCC_C_LANGUAGE_STANDARD = gnu11; 385 | GCC_NO_COMMON_BLOCKS = YES; 386 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 387 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 388 | GCC_WARN_UNDECLARED_SELECTOR = YES; 389 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 390 | GCC_WARN_UNUSED_FUNCTION = YES; 391 | GCC_WARN_UNUSED_VARIABLE = YES; 392 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 393 | MTL_ENABLE_DEBUG_INFO = NO; 394 | MTL_FAST_MATH = YES; 395 | SDKROOT = iphoneos; 396 | SWIFT_COMPILATION_MODE = wholemodule; 397 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 398 | VALIDATE_PRODUCT = YES; 399 | }; 400 | name = Release; 401 | }; 402 | DAD82CD5244FFBE5008DE737 /* Debug */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 406 | CLANG_ENABLE_MODULES = YES; 407 | CODE_SIGN_STYLE = Automatic; 408 | INFOPLIST_FILE = confusionExample/Info.plist; 409 | LD_RUNPATH_SEARCH_PATHS = ( 410 | "$(inherited)", 411 | "@executable_path/Frameworks", 412 | ); 413 | PRODUCT_BUNDLE_IDENTIFIER = my.confusionExample; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | SWIFT_OBJC_BRIDGING_HEADER = "confusionExample/CFeCode/ViewControllers/confusionExample-Bridging-Header.h"; 416 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 417 | SWIFT_VERSION = 5.0; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | }; 420 | name = Debug; 421 | }; 422 | DAD82CD6244FFBE5008DE737 /* Release */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 426 | CLANG_ENABLE_MODULES = YES; 427 | CODE_SIGN_STYLE = Automatic; 428 | INFOPLIST_FILE = confusionExample/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = ( 430 | "$(inherited)", 431 | "@executable_path/Frameworks", 432 | ); 433 | PRODUCT_BUNDLE_IDENTIFIER = my.confusionExample; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | SWIFT_OBJC_BRIDGING_HEADER = "confusionExample/CFeCode/ViewControllers/confusionExample-Bridging-Header.h"; 436 | SWIFT_VERSION = 5.0; 437 | TARGETED_DEVICE_FAMILY = "1,2"; 438 | }; 439 | name = Release; 440 | }; 441 | /* End XCBuildConfiguration section */ 442 | 443 | /* Begin XCConfigurationList section */ 444 | DAD82CBB244FFBE4008DE737 /* Build configuration list for PBXProject "confusionExample" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | DAD82CD2244FFBE5008DE737 /* Debug */, 448 | DAD82CD3244FFBE5008DE737 /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | defaultConfigurationName = Release; 452 | }; 453 | DAD82CD4244FFBE5008DE737 /* Build configuration list for PBXNativeTarget "confusionExample" */ = { 454 | isa = XCConfigurationList; 455 | buildConfigurations = ( 456 | DAD82CD5244FFBE5008DE737 /* Debug */, 457 | DAD82CD6244FFBE5008DE737 /* Release */, 458 | ); 459 | defaultConfigurationIsVisible = 0; 460 | defaultConfigurationName = Release; 461 | }; 462 | /* End XCConfigurationList section */ 463 | }; 464 | rootObject = DAD82CB8244FFBE4008DE737 /* Project object */; 465 | } 466 | -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/project.xcworkspace/xcuserdata/bairdweng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bairdweng/python_confuse/2120e1e74f567fbbe307b9da37273f08596fd89f/confusionExample/confusionExample.xcodeproj/project.xcworkspace/xcuserdata/bairdweng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/xcuserdata/bairdweng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /confusionExample/confusionExample.xcodeproj/xcuserdata/bairdweng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | confusionExample.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/4/22. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/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 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/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 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Model/CFModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFModel.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFModel: NSObject { 12 | var hx_1:String? = nil 13 | var hx_hellow:String? = nil 14 | 15 | func hello() { 16 | let hx_test = ""; 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Model/CFModel2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFModel2.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFModel2: NSObject { 12 | var hx_a:String? = nil 13 | var hx_d:String? = nil 14 | 15 | } 16 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/OC/NSObject+Hello.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Hello.h 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/8/17. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSObject (Hello) 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/OC/NSObject+Hello.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+Hello.m 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/8/17. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | #import "NSObject+Hello.h" 10 | 11 | @implementation NSObject (Hello) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/OC/Test.h: -------------------------------------------------------------------------------- 1 | // 2 | // Test.h 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/8/18. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface Test : NSObject 14 | 15 | @property(nonatomic,strong)Test *Test; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/OC/Test.m: -------------------------------------------------------------------------------- 1 | // 2 | // Test.m 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/8/18. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | #import "Test.h" 10 | 11 | @implementation Test 12 | 13 | 14 | - (instancetype)init 15 | { 16 | self = [super init]; 17 | if (self) { 18 | // = @""; 19 | _Test = [[Test alloc]init]; 20 | } 21 | return self; 22 | } 23 | 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/DataTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataTableViewCell.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DataTableViewCell: UITableViewCell { 12 | 13 | @IBOutlet weak var hx_label1: UILabel! 14 | @IBOutlet weak var hx_label2: UILabel! 15 | var hx_view = CFView() 16 | override func awakeFromNib() { 17 | super.awakeFromNib() 18 | contentView.addSubview(hx_view) 19 | hx_view.frame = CGRect(x: 0, y: 0, width: 100, height: 100) 20 | // Initialization code 21 | } 22 | 23 | override func setSelected(_ selected: Bool, animated: Bool) { 24 | super.setSelected(selected, animated: animated) 25 | 26 | // Configure the view for the selected state 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/DataTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/OneViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OneViewController.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class OneViewController: UIViewController { 12 | let hxModel = CFModel() 13 | let hx_View = CFView() 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | 17 | // Do any additional setup after loading the view. 18 | } 19 | 20 | @IBAction func hx_clickOntheTwoVc(_ sender: Any) { 21 | let hx_twoVc = ViewController2() 22 | self.present(hx_twoVc, animated: true, completion: nil) 23 | } 24 | 25 | /* 26 | // MARK: - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 30 | // Get the new view controller using segue.destination. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | } 36 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/OneViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/SubmitViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SubmitViewController.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SubmitViewController: UIViewController { 12 | 13 | @IBOutlet weak var hx_btn2: UIButton! 14 | @IBOutlet weak var hx_Btn1: UIButton! 15 | @IBOutlet weak var hx_label2: UILabel! 16 | @IBOutlet weak var hx_textField: UITextField! 17 | @IBOutlet weak var hx_label1: UILabel! 18 | @IBOutlet weak var hx_textField2: UITextField! 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | 22 | 23 | // Do any additional setup after loading the view. 24 | } 25 | 26 | @IBAction func hx_clickOntheBtn1(_ sender: Any) { 27 | let hx_vc1 = ViewController2() 28 | self.present(hx_vc1, animated: true, completion: nil) 29 | } 30 | 31 | @IBAction func hx_clickOntheBtn2(_ sender: Any) { 32 | let hx_vc2 = OneViewController() 33 | hx_vc2.present(hx_vc2, animated: true, completion: nil) 34 | 35 | } 36 | /* 37 | // MARK: - Navigation 38 | 39 | // In a storyboard-based application, you will often want to do a little preparation before navigation 40 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 41 | // Get the new view controller using segue.destination. 42 | // Pass the selected object to the new view controller. 43 | } 44 | */ 45 | 46 | } 47 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/SubmitViewController.xib: -------------------------------------------------------------------------------- 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 | 32 | 33 | 34 | 35 | 36 | 37 | 43 | 44 | 45 | 46 | 47 | 48 | 58 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/ViewController2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController2.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController2: UIViewController,UITableViewDelegate,UITableViewDataSource { 12 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 13 | return 10 14 | } 15 | 16 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 17 | let hx_myTableViewcell = tableView.dequeueReusableCell(withIdentifier: "DataTableViewCell", for: indexPath) as! DataTableViewCell 18 | return hx_myTableViewcell 19 | } 20 | 21 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 22 | tableView.deselectRow(at: indexPath, animated: true) 23 | } 24 | 25 | @IBOutlet weak var hx_TableView: UITableView! 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | hx_TableView.delegate = self 29 | hx_TableView.dataSource = self 30 | hx_TableView.register(UINib(nibName: "DataTableViewCell", bundle: nil), forCellReuseIdentifier: "DataTableViewCell") 31 | // Do any additional setup after loading the view 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/ViewController2.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/ViewControllers/confusionExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Views/CFSwitch.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFSwitch.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFSwitch: UISwitch { 12 | 13 | /* 14 | // Only override draw() if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | override func draw(_ rect: CGRect) { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Views/CFView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFView.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFView: UIView { 12 | override init(frame: CGRect) { 13 | super.init(frame: frame) 14 | let hx_model = CFModel() 15 | hx_model.hx_1 = "1" 16 | 17 | 18 | 19 | 20 | hx_model.hx_hellow = "2" 21 | } 22 | func hx_initLabel() { 23 | let hx_label = UILabel() 24 | hx_label.text = "Label" 25 | self.addSubview(hx_label) 26 | hx_label.frame = CGRect(x: 0, y: 0, width: self.frame.size.width/2, height: self.frame.size.height/3) 27 | } 28 | 29 | required init?(coder: NSCoder) { 30 | fatalError("init(coder:) has not been implemented") 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Views/CFView2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFView2.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFView2: UIView { 12 | var hx_View2 = CFView3() 13 | override init(frame: CGRect) { 14 | super.init(frame: frame) 15 | let hx_model = CFModel() 16 | hx_model.hx_1 = "1" 17 | hx_model.hx_hellow = "2" 18 | hx_initLabel2() 19 | } 20 | func hx_initLabel2() { 21 | let hx_label = UILabel() 22 | hx_label.text = "Label" 23 | self.addSubview(hx_label) 24 | hx_label.frame = CGRect(x: 0, y: 0, width: self.frame.size.width/2, height: self.frame.size.height/3) 25 | hx_label.addSubview(hx_View2) 26 | } 27 | 28 | required init?(coder: NSCoder) { 29 | fatalError("init(coder:) has not been implemented") 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/CFeCode/Views/CFView3.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CFView3.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CFView3: UIView { 12 | var hx_dskView = UIScrollView() 13 | let hx_cfSwitch = CFSwitch() 14 | override init(frame: CGRect) { 15 | super.init(frame: frame) 16 | self.addSubview(hx_dskView) 17 | hx_dskView.contentSize = CGSize(width: 20, height: 100) 18 | hx_dskView.contentInset = UIEdgeInsets.init(top: 10, left: 10, bottom: 10, right: 10) 19 | hx_dskView.alwaysBounceVertical = true 20 | hx_dskView.alwaysBounceHorizontal = true 21 | hx_dskView.addSubview(hx_cfSwitch) 22 | hx_initLabel2() 23 | } 24 | func hx_initLabel2() { 25 | let hx_title = UILabel() 26 | self.addSubview(hx_title) 27 | } 28 | 29 | required init?(coder: NSCoder) { 30 | fatalError("init(coder:) has not been implemented") 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/Model.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Model.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/5/25. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class Model: NSObject { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/4/22. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | guard let _ = (scene as? UIWindowScene) else { return } 21 | } 22 | 23 | func sceneDidDisconnect(_ scene: UIScene) { 24 | // Called as the scene is being released by the system. 25 | // This occurs shortly after the scene enters the background, or when its session is discarded. 26 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 27 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 28 | } 29 | 30 | func sceneDidBecomeActive(_ scene: UIScene) { 31 | // Called when the scene has moved from an inactive state to an active state. 32 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 33 | } 34 | 35 | func sceneWillResignActive(_ scene: UIScene) { 36 | // Called when the scene will move from an active state to an inactive state. 37 | // This may occur due to temporary interruptions (ex. an incoming phone call). 38 | } 39 | 40 | func sceneWillEnterForeground(_ scene: UIScene) { 41 | // Called as the scene transitions from the background to the foreground. 42 | // Use this method to undo the changes made on entering the background. 43 | } 44 | 45 | func sceneDidEnterBackground(_ scene: UIScene) { 46 | // Called as the scene transitions from the foreground to the background. 47 | // Use this method to save data, release shared resources, and store enough scene-specific state information 48 | // to restore the scene back to its current state. 49 | } 50 | @objc func hx_test() { 51 | 52 | } 53 | 54 | func hx_test2() { 55 | 56 | } 57 | 58 | func hx_test3()->String { 59 | return "" 60 | } 61 | 62 | } 63 | 64 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/TestView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestView.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/4/22. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class TestView: UIView { 12 | var hx_test4 = "" 13 | let hx_test6 = "" 14 | @objc func hx_test2 () { 15 | 16 | } 17 | static func hx_testView() { 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /confusionExample/confusionExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // confusionExample 4 | // 5 | // Created by bairdweng on 2020/4/22. 6 | // Copyright © 2020 bairdweng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | func temple() { 20 | 21 | let hx_1 = "str1" 22 | var hx_str:String! 23 | switch hx_1 { 24 | case "str1": 25 | hx_str = "str1" 26 | case "str2": 27 | hx_str = "str2" 28 | case "str3": 29 | hx_str = "str2" 30 | case "str4": 31 | hx_str = "str2" 32 | case "str5": 33 | hx_str = "str2" 34 | case "str6": 35 | hx_str = "str2" 36 | default: 37 | hx_str = "str1" 38 | break 39 | } 40 | _ = NSArray(array: [hx_str!]) 41 | 42 | if hx_str == "str1" { 43 | let hx_att = [hx_str] 44 | _ = hx_att 45 | } 46 | else { 47 | let hx_att2 = [hx_str,hx_str,hx_str] 48 | _ = hx_att2 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /python/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /python/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /python/.idea/python.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /python/.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 65 | 66 | 67 | 73 | 74 | 75 | 76 | 77 | true 78 | DEFINITION_ORDER 79 | 80 | 81 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 |