├── LICENSE ├── MultipleSelectMutedDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── huangyibiao.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── huangyibiao.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── MultipleSelectMutedDemo.xcscheme │ └── xcschememanagement.plist ├── MultipleSelectMutedDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── HYBTestCell.h ├── HYBTestCell.m ├── HYBTestModel.h ├── HYBTestModel.m ├── Info.plist ├── ViewController.h ├── ViewController.m ├── main.m ├── selected@2x.png ├── selected@3x.png ├── unselec@2x.png └── unselect@3x.png ├── MultipleSelectMutedDemoTests ├── Info.plist └── MultipleSelectMutedDemoTests.m ├── MultipleSelectMutedDemoUITests ├── Info.plist └── MultipleSelectMutedDemoUITests.m └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 JackyHuang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 69573DDC1C88337100C8F041 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573DDB1C88337100C8F041 /* main.m */; }; 11 | 69573DDF1C88337100C8F041 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573DDE1C88337100C8F041 /* AppDelegate.m */; }; 12 | 69573DE21C88337100C8F041 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573DE11C88337100C8F041 /* ViewController.m */; }; 13 | 69573DE51C88337100C8F041 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69573DE31C88337100C8F041 /* Main.storyboard */; }; 14 | 69573DE71C88337100C8F041 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 69573DE61C88337100C8F041 /* Assets.xcassets */; }; 15 | 69573DEA1C88337100C8F041 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 69573DE81C88337100C8F041 /* LaunchScreen.storyboard */; }; 16 | 69573DF51C88337100C8F041 /* MultipleSelectMutedDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573DF41C88337100C8F041 /* MultipleSelectMutedDemoTests.m */; }; 17 | 69573E001C88337100C8F041 /* MultipleSelectMutedDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573DFF1C88337100C8F041 /* MultipleSelectMutedDemoUITests.m */; }; 18 | 69573E0F1C8833C000C8F041 /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E0E1C8833C000C8F041 /* HYBTestModel.m */; }; 19 | 69573E101C8833C000C8F041 /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E0E1C8833C000C8F041 /* HYBTestModel.m */; }; 20 | 69573E111C8833C000C8F041 /* HYBTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E0E1C8833C000C8F041 /* HYBTestModel.m */; }; 21 | 69573E141C8833D900C8F041 /* HYBTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E131C8833D900C8F041 /* HYBTestCell.m */; }; 22 | 69573E151C8833D900C8F041 /* HYBTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E131C8833D900C8F041 /* HYBTestCell.m */; }; 23 | 69573E161C8833D900C8F041 /* HYBTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 69573E131C8833D900C8F041 /* HYBTestCell.m */; }; 24 | 69573E1B1C8838A900C8F041 /* selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E171C8838A900C8F041 /* selected@2x.png */; }; 25 | 69573E1C1C8838A900C8F041 /* selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E171C8838A900C8F041 /* selected@2x.png */; }; 26 | 69573E1D1C8838A900C8F041 /* selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E171C8838A900C8F041 /* selected@2x.png */; }; 27 | 69573E1E1C8838A900C8F041 /* selected@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E181C8838A900C8F041 /* selected@3x.png */; }; 28 | 69573E1F1C8838A900C8F041 /* selected@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E181C8838A900C8F041 /* selected@3x.png */; }; 29 | 69573E201C8838A900C8F041 /* selected@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E181C8838A900C8F041 /* selected@3x.png */; }; 30 | 69573E211C8838A900C8F041 /* unselec@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E191C8838A900C8F041 /* unselec@2x.png */; }; 31 | 69573E221C8838A900C8F041 /* unselec@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E191C8838A900C8F041 /* unselec@2x.png */; }; 32 | 69573E231C8838A900C8F041 /* unselec@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E191C8838A900C8F041 /* unselec@2x.png */; }; 33 | 69573E241C8838A900C8F041 /* unselect@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E1A1C8838A900C8F041 /* unselect@3x.png */; }; 34 | 69573E251C8838A900C8F041 /* unselect@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E1A1C8838A900C8F041 /* unselect@3x.png */; }; 35 | 69573E261C8838A900C8F041 /* unselect@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 69573E1A1C8838A900C8F041 /* unselect@3x.png */; }; 36 | /* End PBXBuildFile section */ 37 | 38 | /* Begin PBXContainerItemProxy section */ 39 | 69573DF11C88337100C8F041 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 69573DCF1C88337100C8F041 /* Project object */; 42 | proxyType = 1; 43 | remoteGlobalIDString = 69573DD61C88337100C8F041; 44 | remoteInfo = MultipleSelectMutedDemo; 45 | }; 46 | 69573DFC1C88337100C8F041 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 69573DCF1C88337100C8F041 /* Project object */; 49 | proxyType = 1; 50 | remoteGlobalIDString = 69573DD61C88337100C8F041; 51 | remoteInfo = MultipleSelectMutedDemo; 52 | }; 53 | /* End PBXContainerItemProxy section */ 54 | 55 | /* Begin PBXFileReference section */ 56 | 69573DD71C88337100C8F041 /* MultipleSelectMutedDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MultipleSelectMutedDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 69573DDB1C88337100C8F041 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 58 | 69573DDD1C88337100C8F041 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 59 | 69573DDE1C88337100C8F041 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 60 | 69573DE01C88337100C8F041 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 61 | 69573DE11C88337100C8F041 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 62 | 69573DE41C88337100C8F041 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63 | 69573DE61C88337100C8F041 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | 69573DE91C88337100C8F041 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 65 | 69573DEB1C88337100C8F041 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 69573DF01C88337100C8F041 /* MultipleSelectMutedDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MultipleSelectMutedDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 69573DF41C88337100C8F041 /* MultipleSelectMutedDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MultipleSelectMutedDemoTests.m; sourceTree = ""; }; 68 | 69573DF61C88337100C8F041 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | 69573DFB1C88337100C8F041 /* MultipleSelectMutedDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MultipleSelectMutedDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 69573DFF1C88337100C8F041 /* MultipleSelectMutedDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MultipleSelectMutedDemoUITests.m; sourceTree = ""; }; 71 | 69573E011C88337100C8F041 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 69573E0D1C8833C000C8F041 /* HYBTestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBTestModel.h; sourceTree = ""; }; 73 | 69573E0E1C8833C000C8F041 /* HYBTestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBTestModel.m; sourceTree = ""; }; 74 | 69573E121C8833D900C8F041 /* HYBTestCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYBTestCell.h; sourceTree = ""; }; 75 | 69573E131C8833D900C8F041 /* HYBTestCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYBTestCell.m; sourceTree = ""; }; 76 | 69573E171C8838A900C8F041 /* selected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "selected@2x.png"; sourceTree = ""; }; 77 | 69573E181C8838A900C8F041 /* selected@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "selected@3x.png"; sourceTree = ""; }; 78 | 69573E191C8838A900C8F041 /* unselec@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "unselec@2x.png"; sourceTree = ""; }; 79 | 69573E1A1C8838A900C8F041 /* unselect@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "unselect@3x.png"; sourceTree = ""; }; 80 | /* End PBXFileReference section */ 81 | 82 | /* Begin PBXFrameworksBuildPhase section */ 83 | 69573DD41C88337100C8F041 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | 69573DED1C88337100C8F041 /* Frameworks */ = { 91 | isa = PBXFrameworksBuildPhase; 92 | buildActionMask = 2147483647; 93 | files = ( 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 69573DF81C88337100C8F041 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | /* End PBXFrameworksBuildPhase section */ 105 | 106 | /* Begin PBXGroup section */ 107 | 69573DCE1C88337100C8F041 = { 108 | isa = PBXGroup; 109 | children = ( 110 | 69573DD91C88337100C8F041 /* MultipleSelectMutedDemo */, 111 | 69573DF31C88337100C8F041 /* MultipleSelectMutedDemoTests */, 112 | 69573DFE1C88337100C8F041 /* MultipleSelectMutedDemoUITests */, 113 | 69573DD81C88337100C8F041 /* Products */, 114 | ); 115 | sourceTree = ""; 116 | }; 117 | 69573DD81C88337100C8F041 /* Products */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 69573DD71C88337100C8F041 /* MultipleSelectMutedDemo.app */, 121 | 69573DF01C88337100C8F041 /* MultipleSelectMutedDemoTests.xctest */, 122 | 69573DFB1C88337100C8F041 /* MultipleSelectMutedDemoUITests.xctest */, 123 | ); 124 | name = Products; 125 | sourceTree = ""; 126 | }; 127 | 69573DD91C88337100C8F041 /* MultipleSelectMutedDemo */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 69573E171C8838A900C8F041 /* selected@2x.png */, 131 | 69573E181C8838A900C8F041 /* selected@3x.png */, 132 | 69573E191C8838A900C8F041 /* unselec@2x.png */, 133 | 69573E1A1C8838A900C8F041 /* unselect@3x.png */, 134 | 69573E121C8833D900C8F041 /* HYBTestCell.h */, 135 | 69573E131C8833D900C8F041 /* HYBTestCell.m */, 136 | 69573E0D1C8833C000C8F041 /* HYBTestModel.h */, 137 | 69573E0E1C8833C000C8F041 /* HYBTestModel.m */, 138 | 69573DDD1C88337100C8F041 /* AppDelegate.h */, 139 | 69573DDE1C88337100C8F041 /* AppDelegate.m */, 140 | 69573DE01C88337100C8F041 /* ViewController.h */, 141 | 69573DE11C88337100C8F041 /* ViewController.m */, 142 | 69573DE31C88337100C8F041 /* Main.storyboard */, 143 | 69573DE61C88337100C8F041 /* Assets.xcassets */, 144 | 69573DE81C88337100C8F041 /* LaunchScreen.storyboard */, 145 | 69573DEB1C88337100C8F041 /* Info.plist */, 146 | 69573DDA1C88337100C8F041 /* Supporting Files */, 147 | ); 148 | path = MultipleSelectMutedDemo; 149 | sourceTree = ""; 150 | }; 151 | 69573DDA1C88337100C8F041 /* Supporting Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 69573DDB1C88337100C8F041 /* main.m */, 155 | ); 156 | name = "Supporting Files"; 157 | sourceTree = ""; 158 | }; 159 | 69573DF31C88337100C8F041 /* MultipleSelectMutedDemoTests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 69573DF41C88337100C8F041 /* MultipleSelectMutedDemoTests.m */, 163 | 69573DF61C88337100C8F041 /* Info.plist */, 164 | ); 165 | path = MultipleSelectMutedDemoTests; 166 | sourceTree = ""; 167 | }; 168 | 69573DFE1C88337100C8F041 /* MultipleSelectMutedDemoUITests */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 69573DFF1C88337100C8F041 /* MultipleSelectMutedDemoUITests.m */, 172 | 69573E011C88337100C8F041 /* Info.plist */, 173 | ); 174 | path = MultipleSelectMutedDemoUITests; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXGroup section */ 178 | 179 | /* Begin PBXNativeTarget section */ 180 | 69573DD61C88337100C8F041 /* MultipleSelectMutedDemo */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = 69573E041C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemo" */; 183 | buildPhases = ( 184 | 69573DD31C88337100C8F041 /* Sources */, 185 | 69573DD41C88337100C8F041 /* Frameworks */, 186 | 69573DD51C88337100C8F041 /* Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = MultipleSelectMutedDemo; 193 | productName = MultipleSelectMutedDemo; 194 | productReference = 69573DD71C88337100C8F041 /* MultipleSelectMutedDemo.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | 69573DEF1C88337100C8F041 /* MultipleSelectMutedDemoTests */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 69573E071C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemoTests" */; 200 | buildPhases = ( 201 | 69573DEC1C88337100C8F041 /* Sources */, 202 | 69573DED1C88337100C8F041 /* Frameworks */, 203 | 69573DEE1C88337100C8F041 /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | 69573DF21C88337100C8F041 /* PBXTargetDependency */, 209 | ); 210 | name = MultipleSelectMutedDemoTests; 211 | productName = MultipleSelectMutedDemoTests; 212 | productReference = 69573DF01C88337100C8F041 /* MultipleSelectMutedDemoTests.xctest */; 213 | productType = "com.apple.product-type.bundle.unit-test"; 214 | }; 215 | 69573DFA1C88337100C8F041 /* MultipleSelectMutedDemoUITests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 69573E0A1C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemoUITests" */; 218 | buildPhases = ( 219 | 69573DF71C88337100C8F041 /* Sources */, 220 | 69573DF81C88337100C8F041 /* Frameworks */, 221 | 69573DF91C88337100C8F041 /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | 69573DFD1C88337100C8F041 /* PBXTargetDependency */, 227 | ); 228 | name = MultipleSelectMutedDemoUITests; 229 | productName = MultipleSelectMutedDemoUITests; 230 | productReference = 69573DFB1C88337100C8F041 /* MultipleSelectMutedDemoUITests.xctest */; 231 | productType = "com.apple.product-type.bundle.ui-testing"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | 69573DCF1C88337100C8F041 /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | LastUpgradeCheck = 0720; 240 | ORGANIZATIONNAME = huangyibiao; 241 | TargetAttributes = { 242 | 69573DD61C88337100C8F041 = { 243 | CreatedOnToolsVersion = 7.2.1; 244 | }; 245 | 69573DEF1C88337100C8F041 = { 246 | CreatedOnToolsVersion = 7.2.1; 247 | TestTargetID = 69573DD61C88337100C8F041; 248 | }; 249 | 69573DFA1C88337100C8F041 = { 250 | CreatedOnToolsVersion = 7.2.1; 251 | TestTargetID = 69573DD61C88337100C8F041; 252 | }; 253 | }; 254 | }; 255 | buildConfigurationList = 69573DD21C88337100C8F041 /* Build configuration list for PBXProject "MultipleSelectMutedDemo" */; 256 | compatibilityVersion = "Xcode 3.2"; 257 | developmentRegion = English; 258 | hasScannedForEncodings = 0; 259 | knownRegions = ( 260 | en, 261 | Base, 262 | ); 263 | mainGroup = 69573DCE1C88337100C8F041; 264 | productRefGroup = 69573DD81C88337100C8F041 /* Products */; 265 | projectDirPath = ""; 266 | projectRoot = ""; 267 | targets = ( 268 | 69573DD61C88337100C8F041 /* MultipleSelectMutedDemo */, 269 | 69573DEF1C88337100C8F041 /* MultipleSelectMutedDemoTests */, 270 | 69573DFA1C88337100C8F041 /* MultipleSelectMutedDemoUITests */, 271 | ); 272 | }; 273 | /* End PBXProject section */ 274 | 275 | /* Begin PBXResourcesBuildPhase section */ 276 | 69573DD51C88337100C8F041 /* Resources */ = { 277 | isa = PBXResourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | 69573E211C8838A900C8F041 /* unselec@2x.png in Resources */, 281 | 69573E241C8838A900C8F041 /* unselect@3x.png in Resources */, 282 | 69573E1E1C8838A900C8F041 /* selected@3x.png in Resources */, 283 | 69573DEA1C88337100C8F041 /* LaunchScreen.storyboard in Resources */, 284 | 69573E1B1C8838A900C8F041 /* selected@2x.png in Resources */, 285 | 69573DE71C88337100C8F041 /* Assets.xcassets in Resources */, 286 | 69573DE51C88337100C8F041 /* Main.storyboard in Resources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 69573DEE1C88337100C8F041 /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 69573E251C8838A900C8F041 /* unselect@3x.png in Resources */, 295 | 69573E221C8838A900C8F041 /* unselec@2x.png in Resources */, 296 | 69573E1F1C8838A900C8F041 /* selected@3x.png in Resources */, 297 | 69573E1C1C8838A900C8F041 /* selected@2x.png in Resources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | 69573DF91C88337100C8F041 /* Resources */ = { 302 | isa = PBXResourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | 69573E261C8838A900C8F041 /* unselect@3x.png in Resources */, 306 | 69573E231C8838A900C8F041 /* unselec@2x.png in Resources */, 307 | 69573E201C8838A900C8F041 /* selected@3x.png in Resources */, 308 | 69573E1D1C8838A900C8F041 /* selected@2x.png in Resources */, 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | /* End PBXResourcesBuildPhase section */ 313 | 314 | /* Begin PBXSourcesBuildPhase section */ 315 | 69573DD31C88337100C8F041 /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 69573E141C8833D900C8F041 /* HYBTestCell.m in Sources */, 320 | 69573DE21C88337100C8F041 /* ViewController.m in Sources */, 321 | 69573E0F1C8833C000C8F041 /* HYBTestModel.m in Sources */, 322 | 69573DDF1C88337100C8F041 /* AppDelegate.m in Sources */, 323 | 69573DDC1C88337100C8F041 /* main.m in Sources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | 69573DEC1C88337100C8F041 /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 69573DF51C88337100C8F041 /* MultipleSelectMutedDemoTests.m in Sources */, 332 | 69573E101C8833C000C8F041 /* HYBTestModel.m in Sources */, 333 | 69573E151C8833D900C8F041 /* HYBTestCell.m in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | 69573DF71C88337100C8F041 /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | 69573E001C88337100C8F041 /* MultipleSelectMutedDemoUITests.m in Sources */, 342 | 69573E111C8833C000C8F041 /* HYBTestModel.m in Sources */, 343 | 69573E161C8833D900C8F041 /* HYBTestCell.m in Sources */, 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | }; 347 | /* End PBXSourcesBuildPhase section */ 348 | 349 | /* Begin PBXTargetDependency section */ 350 | 69573DF21C88337100C8F041 /* PBXTargetDependency */ = { 351 | isa = PBXTargetDependency; 352 | target = 69573DD61C88337100C8F041 /* MultipleSelectMutedDemo */; 353 | targetProxy = 69573DF11C88337100C8F041 /* PBXContainerItemProxy */; 354 | }; 355 | 69573DFD1C88337100C8F041 /* PBXTargetDependency */ = { 356 | isa = PBXTargetDependency; 357 | target = 69573DD61C88337100C8F041 /* MultipleSelectMutedDemo */; 358 | targetProxy = 69573DFC1C88337100C8F041 /* PBXContainerItemProxy */; 359 | }; 360 | /* End PBXTargetDependency section */ 361 | 362 | /* Begin PBXVariantGroup section */ 363 | 69573DE31C88337100C8F041 /* Main.storyboard */ = { 364 | isa = PBXVariantGroup; 365 | children = ( 366 | 69573DE41C88337100C8F041 /* Base */, 367 | ); 368 | name = Main.storyboard; 369 | sourceTree = ""; 370 | }; 371 | 69573DE81C88337100C8F041 /* LaunchScreen.storyboard */ = { 372 | isa = PBXVariantGroup; 373 | children = ( 374 | 69573DE91C88337100C8F041 /* Base */, 375 | ); 376 | name = LaunchScreen.storyboard; 377 | sourceTree = ""; 378 | }; 379 | /* End PBXVariantGroup section */ 380 | 381 | /* Begin XCBuildConfiguration section */ 382 | 69573E021C88337100C8F041 /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_CONSTANT_CONVERSION = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 393 | CLANG_WARN_EMPTY_BODY = YES; 394 | CLANG_WARN_ENUM_CONVERSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = dwarf; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | ENABLE_TESTABILITY = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_OPTIMIZATION_LEVEL = 0; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "DEBUG=1", 410 | "$(inherited)", 411 | ); 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | SDKROOT = iphoneos; 422 | }; 423 | name = Debug; 424 | }; 425 | 69573E031C88337100C8F041 /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ALWAYS_SEARCH_USER_PATHS = NO; 429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 430 | CLANG_CXX_LIBRARY = "libc++"; 431 | CLANG_ENABLE_MODULES = YES; 432 | CLANG_ENABLE_OBJC_ARC = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_CONSTANT_CONVERSION = YES; 435 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 436 | CLANG_WARN_EMPTY_BODY = YES; 437 | CLANG_WARN_ENUM_CONVERSION = YES; 438 | CLANG_WARN_INT_CONVERSION = YES; 439 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 440 | CLANG_WARN_UNREACHABLE_CODE = YES; 441 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 442 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 443 | COPY_PHASE_STRIP = NO; 444 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 445 | ENABLE_NS_ASSERTIONS = NO; 446 | ENABLE_STRICT_OBJC_MSGSEND = YES; 447 | GCC_C_LANGUAGE_STANDARD = gnu99; 448 | GCC_NO_COMMON_BLOCKS = YES; 449 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 450 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 451 | GCC_WARN_UNDECLARED_SELECTOR = YES; 452 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 453 | GCC_WARN_UNUSED_FUNCTION = YES; 454 | GCC_WARN_UNUSED_VARIABLE = YES; 455 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 456 | MTL_ENABLE_DEBUG_INFO = NO; 457 | SDKROOT = iphoneos; 458 | VALIDATE_PRODUCT = YES; 459 | }; 460 | name = Release; 461 | }; 462 | 69573E051C88337100C8F041 /* Debug */ = { 463 | isa = XCBuildConfiguration; 464 | buildSettings = { 465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 466 | INFOPLIST_FILE = MultipleSelectMutedDemo/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 468 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemo; 469 | PRODUCT_NAME = "$(TARGET_NAME)"; 470 | }; 471 | name = Debug; 472 | }; 473 | 69573E061C88337100C8F041 /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 477 | INFOPLIST_FILE = MultipleSelectMutedDemo/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 479 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemo; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | }; 482 | name = Release; 483 | }; 484 | 69573E081C88337100C8F041 /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | buildSettings = { 487 | BUNDLE_LOADER = "$(TEST_HOST)"; 488 | INFOPLIST_FILE = MultipleSelectMutedDemoTests/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 490 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemoTests; 491 | PRODUCT_NAME = "$(TARGET_NAME)"; 492 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultipleSelectMutedDemo.app/MultipleSelectMutedDemo"; 493 | }; 494 | name = Debug; 495 | }; 496 | 69573E091C88337100C8F041 /* Release */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | BUNDLE_LOADER = "$(TEST_HOST)"; 500 | INFOPLIST_FILE = MultipleSelectMutedDemoTests/Info.plist; 501 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 502 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemoTests; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultipleSelectMutedDemo.app/MultipleSelectMutedDemo"; 505 | }; 506 | name = Release; 507 | }; 508 | 69573E0B1C88337100C8F041 /* Debug */ = { 509 | isa = XCBuildConfiguration; 510 | buildSettings = { 511 | INFOPLIST_FILE = MultipleSelectMutedDemoUITests/Info.plist; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 513 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemoUITests; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | TEST_TARGET_NAME = MultipleSelectMutedDemo; 516 | USES_XCTRUNNER = YES; 517 | }; 518 | name = Debug; 519 | }; 520 | 69573E0C1C88337100C8F041 /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | INFOPLIST_FILE = MultipleSelectMutedDemoUITests/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 525 | PRODUCT_BUNDLE_IDENTIFIER = com.huangyibiao.MultipleSelectMutedDemoUITests; 526 | PRODUCT_NAME = "$(TARGET_NAME)"; 527 | TEST_TARGET_NAME = MultipleSelectMutedDemo; 528 | USES_XCTRUNNER = YES; 529 | }; 530 | name = Release; 531 | }; 532 | /* End XCBuildConfiguration section */ 533 | 534 | /* Begin XCConfigurationList section */ 535 | 69573DD21C88337100C8F041 /* Build configuration list for PBXProject "MultipleSelectMutedDemo" */ = { 536 | isa = XCConfigurationList; 537 | buildConfigurations = ( 538 | 69573E021C88337100C8F041 /* Debug */, 539 | 69573E031C88337100C8F041 /* Release */, 540 | ); 541 | defaultConfigurationIsVisible = 0; 542 | defaultConfigurationName = Release; 543 | }; 544 | 69573E041C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemo" */ = { 545 | isa = XCConfigurationList; 546 | buildConfigurations = ( 547 | 69573E051C88337100C8F041 /* Debug */, 548 | 69573E061C88337100C8F041 /* Release */, 549 | ); 550 | defaultConfigurationIsVisible = 0; 551 | }; 552 | 69573E071C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemoTests" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | 69573E081C88337100C8F041 /* Debug */, 556 | 69573E091C88337100C8F041 /* Release */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | }; 560 | 69573E0A1C88337100C8F041 /* Build configuration list for PBXNativeTarget "MultipleSelectMutedDemoUITests" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | 69573E0B1C88337100C8F041 /* Debug */, 564 | 69573E0C1C88337100C8F041 /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | }; 568 | /* End XCConfigurationList section */ 569 | }; 570 | rootObject = 69573DCF1C88337100C8F041 /* Project object */; 571 | } 572 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/MultiSelectMutexDemo/b5983c19005b300f0e2d17813f42b616f036e26d/MultipleSelectMutedDemo.xcodeproj/project.xcworkspace/xcuserdata/huangyibiao.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/MultipleSelectMutedDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo.xcodeproj/xcuserdata/huangyibiao.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MultipleSelectMutedDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 69573DD61C88337100C8F041 16 | 17 | primary 18 | 19 | 20 | 69573DEF1C88337100C8F041 21 | 22 | primary 23 | 24 | 25 | 69573DFA1C88337100C8F041 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/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 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/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 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/HYBTestCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestCell.h 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class HYBOptionalAnswerModel; 12 | 13 | @interface HYBTestCell : UITableViewCell 14 | 15 | - (void)configCellWithModel:(HYBOptionalAnswerModel *)model atIndexPath:(NSIndexPath *)indexPath; 16 | 17 | - (void)setCellSelected:(BOOL)selected; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/HYBTestCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestCell.m 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBTestCell.h" 10 | #import "HYBTestModel.h" 11 | 12 | @interface HYBTestCell () 13 | 14 | @property (nonatomic, strong) UILabel *optionalAnswerLabel; 15 | @property (nonatomic, strong) UIButton *radioButton; 16 | @property (nonatomic, copy) NSIndexPath *indexPath; 17 | 18 | @end 19 | 20 | @implementation HYBTestCell 21 | 22 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 23 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 24 | self.radioButton = [UIButton buttonWithType:UIButtonTypeCustom]; 25 | [self.radioButton setImage:[UIImage imageNamed:@"unselect"] forState:UIControlStateNormal]; 26 | [self.radioButton setImage:[UIImage imageNamed:@"selected"] forState:UIControlStateSelected]; 27 | [self.radioButton sizeToFit]; 28 | self.radioButton.center = CGPointMake(self.radioButton.frame.size.width / 2 + 15, 29 | self.contentView.center.y); 30 | [self.contentView addSubview:self.radioButton]; 31 | self.radioButton.userInteractionEnabled = NO; 32 | 33 | self.optionalAnswerLabel = [[UILabel alloc] init]; 34 | CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width; 35 | CGFloat x = self.radioButton.frame.size.width + self.radioButton.frame.origin.x + 20; 36 | self.optionalAnswerLabel.frame = CGRectMake(x, 37 | 0, 38 | screenWidth - x - 15, 39 | self.contentView.frame.size.height); 40 | self.optionalAnswerLabel.numberOfLines = 0; 41 | [self.contentView addSubview:self.optionalAnswerLabel]; 42 | } 43 | 44 | return self; 45 | } 46 | 47 | 48 | - (void)configCellWithModel:(HYBOptionalAnswerModel *)model atIndexPath:(NSIndexPath *)indexPath { 49 | self.indexPath = [indexPath copy]; 50 | 51 | self.radioButton.selected = model.isSelected; 52 | self.optionalAnswerLabel.text = model.optionalAnswerSummary; 53 | } 54 | 55 | - (void)setCellSelected:(BOOL)selected { 56 | self.radioButton.selected = selected; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/HYBTestModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestModel.h 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HYBTestModel : NSObject 12 | 13 | // 问题id 14 | @property (nonatomic, copy) NSString *qid; 15 | @property (nonatomic, copy) NSString *questionSummary; 16 | @property (nonatomic, strong) NSMutableArray *optionalAnswers; 17 | 18 | @end 19 | 20 | @interface HYBOptionalAnswerModel : NSObject 21 | 22 | // 选项答案id 23 | @property (nonatomic, copy) NSString *aid; 24 | // 选项答案内容描述 25 | @property (nonatomic, copy) NSString *optionalAnswerSummary; 26 | 27 | // 辅助字段,标识是否选中 28 | @property (nonatomic, assign) BOOL isSelected; 29 | 30 | // 互斥的选项,以英文逗号分割 31 | @property (nonatomic, copy) NSString *strMutex_id; 32 | 33 | - (NSArray *)mutexIds; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/HYBTestModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // HYBTestModel.m 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "HYBTestModel.h" 10 | 11 | @implementation HYBTestModel 12 | 13 | - (NSMutableArray *)optionalAnswers { 14 | if (_optionalAnswers == nil) { 15 | _optionalAnswers = [[NSMutableArray alloc] init]; 16 | } 17 | 18 | return _optionalAnswers; 19 | } 20 | 21 | @end 22 | 23 | @implementation HYBOptionalAnswerModel 24 | 25 | - (NSArray *)mutexIds { 26 | if (self.strMutex_id == nil || self.strMutex_id.length == 0) { 27 | return nil; 28 | } 29 | 30 | NSArray *array = [self.strMutex_id componentsSeparatedByString:@","]; 31 | return array; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "HYBTestModel.h" 11 | #import "HYBTestCell.h" 12 | 13 | static NSString *kCellIdentifier = @"identifier"; 14 | 15 | @interface ViewController () 16 | 17 | @property (nonatomic, strong) UITableView *tableView; 18 | @property (nonatomic, strong) NSMutableArray *datasource; 19 | 20 | @end 21 | 22 | @implementation ViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | 27 | self.tableView = [[UITableView alloc] init]; 28 | self.tableView.frame = self.view.bounds; 29 | self.tableView.dataSource = self; 30 | self.tableView.delegate = self; 31 | [self.tableView registerClass:[HYBTestCell class] forCellReuseIdentifier:kCellIdentifier]; 32 | [self.view addSubview:self.tableView]; 33 | 34 | for (NSUInteger section = 0; section < 20; ++section) { 35 | HYBTestModel *model = [[HYBTestModel alloc] init]; 36 | model.questionSummary = [NSString stringWithFormat:@"问题:这是第%ld题?", section]; 37 | model.qid = [NSString stringWithFormat:@"%ld", section + 1]; 38 | 39 | for (NSUInteger answers = 0; answers < 4; ++ answers) { 40 | HYBOptionalAnswerModel *answerModel = [[HYBOptionalAnswerModel alloc] init]; 41 | answerModel.aid = [NSString stringWithFormat:@"%ld", answers + 1]; 42 | answerModel.optionalAnswerSummary = [NSString stringWithFormat:@"%c. 可选答案%ld", (char)('A' + answers), answers]; 43 | [model.optionalAnswers addObject:answerModel]; 44 | } 45 | 46 | // // 分配互斥A/B/C与D互斥的情况 47 | // for (NSUInteger answers = 0; answers < 4; ++ answers) { 48 | // HYBOptionalAnswerModel *answerModel = [model.optionalAnswers objectAtIndex:answers]; 49 | // // 模拟前三个答案与最后一个互斥 50 | // if (answers < 3) { 51 | // answerModel.strMutex_id = @"4"; 52 | // } else { 53 | // answerModel.strMutex_id = @"1,2,3"; 54 | // } 55 | // } 56 | 57 | // 分配互斥A与B互斥、C与D互斥的情况 58 | HYBOptionalAnswerModel *modelA = [model.optionalAnswers objectAtIndex:0]; 59 | modelA.strMutex_id = @"2"; 60 | HYBOptionalAnswerModel *modelB = [model.optionalAnswers objectAtIndex:1]; 61 | modelB.strMutex_id = @"1"; 62 | HYBOptionalAnswerModel *modelC = [model.optionalAnswers objectAtIndex:2]; 63 | modelC.strMutex_id = @"4"; 64 | HYBOptionalAnswerModel *modelD = [model.optionalAnswers objectAtIndex:3]; 65 | modelD.strMutex_id = @"3"; 66 | 67 | [self.datasource addObject:model]; 68 | } 69 | } 70 | 71 | - (NSMutableArray *)datasource { 72 | if (_datasource == nil) { 73 | _datasource = [[NSMutableArray alloc] init]; 74 | } 75 | 76 | return _datasource; 77 | } 78 | 79 | #pragma mark - UITableViewDataSource & UITableViewDelegate 80 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | HYBTestCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier forIndexPath:indexPath]; 82 | 83 | HYBTestModel *model = [self.datasource objectAtIndex:indexPath.section]; 84 | HYBOptionalAnswerModel *answerModel = [model.optionalAnswers objectAtIndex:indexPath.row]; 85 | 86 | [cell configCellWithModel:answerModel atIndexPath:indexPath]; 87 | 88 | return cell; 89 | } 90 | 91 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 92 | HYBTestModel *model = [self.datasource objectAtIndex:indexPath.section]; 93 | HYBOptionalAnswerModel *answerModel = [model.optionalAnswers objectAtIndex:indexPath.row]; 94 | 95 | answerModel.isSelected = !answerModel.isSelected; 96 | 97 | // 这里假设的是互斥是单一的,也就是说不存在多个相互互斥的状态。这里只考虑A/B/C/D中A/B/C都到D互斥的情况 98 | if (answerModel.isSelected) { 99 | for (HYBOptionalAnswerModel *otherAnswerModel in model.optionalAnswers) { 100 | if (otherAnswerModel != answerModel && [answerModel.mutexIds containsObject:otherAnswerModel.aid]) { 101 | // 互斥 102 | otherAnswerModel.isSelected = !answerModel.isSelected; 103 | } 104 | } 105 | } 106 | 107 | [tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] 108 | withRowAnimation:UITableViewRowAnimationFade]; 109 | } 110 | 111 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 112 | return 44; 113 | } 114 | 115 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 116 | return 44; 117 | } 118 | 119 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 120 | UIView *view = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"headerIdentifeir"]; 121 | UILabel *questionLabel = nil; 122 | if (view == nil) { 123 | view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)]; 124 | view.backgroundColor = [UIColor lightGrayColor]; 125 | 126 | questionLabel = [[UILabel alloc] init]; 127 | questionLabel.frame = CGRectMake(15, 0, view.frame.size.width - 30, 44); 128 | questionLabel.numberOfLines = 0; 129 | [view addSubview:questionLabel]; 130 | questionLabel.tag = 100; 131 | } 132 | 133 | if (questionLabel == nil) { 134 | questionLabel = [view viewWithTag:100]; 135 | } 136 | 137 | HYBTestModel *model = [self.datasource objectAtIndex:section]; 138 | questionLabel.text = model.questionSummary; 139 | 140 | return view; 141 | } 142 | 143 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 144 | return self.datasource.count; 145 | } 146 | 147 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 148 | HYBTestModel *model = [self.datasource objectAtIndex:section]; 149 | return model.optionalAnswers.count; 150 | } 151 | 152 | @end 153 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MultipleSelectMutedDemo 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/MultiSelectMutexDemo/b5983c19005b300f0e2d17813f42b616f036e26d/MultipleSelectMutedDemo/selected@2x.png -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/selected@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/MultiSelectMutexDemo/b5983c19005b300f0e2d17813f42b616f036e26d/MultipleSelectMutedDemo/selected@3x.png -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/unselec@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/MultiSelectMutexDemo/b5983c19005b300f0e2d17813f42b616f036e26d/MultipleSelectMutedDemo/unselec@2x.png -------------------------------------------------------------------------------- /MultipleSelectMutedDemo/unselect@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoderJackyHuang/MultiSelectMutexDemo/b5983c19005b300f0e2d17813f42b616f036e26d/MultipleSelectMutedDemo/unselect@3x.png -------------------------------------------------------------------------------- /MultipleSelectMutedDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemoTests/MultipleSelectMutedDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MultipleSelectMutedDemoTests.m 3 | // MultipleSelectMutedDemoTests 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MultipleSelectMutedDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MultipleSelectMutedDemoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /MultipleSelectMutedDemoUITests/MultipleSelectMutedDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MultipleSelectMutedDemoUITests.m 3 | // MultipleSelectMutedDemoUITests 4 | // 5 | // Created by huangyibiao on 16/3/3. 6 | // Copyright © 2016年 huangyibiao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MultipleSelectMutedDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MultipleSelectMutedDemoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MultiSelectMutexDemo 2 | 在多选题处理中,A、B、C与D互斥和A与B互斥、C与D互斥学习如何处理。 3 | 4 | 5 | #文章讲解 6 | 7 | [iOS多选Cell处理互斥问题](http://www.henishuo.com/ios-cell-mutex-multiselect/) 8 | --------------------------------------------------------------------------------