├── CCPageControl ├── CCPageControl.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── cuican.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── cuican.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── CCPageControl.xcscheme │ │ └── xcschememanagement.plist ├── CCPageControl │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── 1.imageset │ │ │ ├── 1.JPG │ │ │ └── Contents.json │ │ ├── 2.imageset │ │ │ ├── 2.JPG │ │ │ └── Contents.json │ │ ├── 3.imageset │ │ │ ├── 3.JPG │ │ │ └── Contents.json │ │ ├── 4.imageset │ │ │ ├── 4.JPG │ │ │ └── Contents.json │ │ ├── 5.imageset │ │ │ ├── 5.JPG │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── PageControlCollectionViewCell.h │ ├── PageControlCollectionViewCell.m │ ├── PageControlCollectionViewCell.xib │ ├── PageControlView.h │ ├── PageControlView.m │ ├── PageControlView.xib │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── CCPageControlTests │ ├── CCPageControlTests.m │ └── Info.plist └── CCPageControlUITests │ ├── CCPageControlUITests.m │ └── Info.plist └── README.md /CCPageControl/CCPageControl.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB1CD2871F457E2D0057511C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD2861F457E2D0057511C /* main.m */; }; 11 | BB1CD28A1F457E2D0057511C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD2891F457E2D0057511C /* AppDelegate.m */; }; 12 | BB1CD28D1F457E2D0057511C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD28C1F457E2D0057511C /* ViewController.m */; }; 13 | BB1CD2901F457E2D0057511C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB1CD28E1F457E2D0057511C /* Main.storyboard */; }; 14 | BB1CD2921F457E2D0057511C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB1CD2911F457E2D0057511C /* Assets.xcassets */; }; 15 | BB1CD2951F457E2D0057511C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB1CD2931F457E2D0057511C /* LaunchScreen.storyboard */; }; 16 | BB1CD2A01F457E2D0057511C /* CCPageControlTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD29F1F457E2D0057511C /* CCPageControlTests.m */; }; 17 | BB1CD2AB1F457E2D0057511C /* CCPageControlUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD2AA1F457E2D0057511C /* CCPageControlUITests.m */; }; 18 | BB1CD2BA1F457E4C0057511C /* PageControlView.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD2B91F457E4C0057511C /* PageControlView.m */; }; 19 | BB1CD2BD1F457E5C0057511C /* PageControlView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB1CD2BC1F457E5C0057511C /* PageControlView.xib */; }; 20 | BB1CD2CF1F4598250057511C /* PageControlCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB1CD2CD1F4598250057511C /* PageControlCollectionViewCell.m */; }; 21 | BB1CD2D01F4598250057511C /* PageControlCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB1CD2CE1F4598250057511C /* PageControlCollectionViewCell.xib */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | BB1CD29C1F457E2D0057511C /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = BB1CD27A1F457E2D0057511C /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = BB1CD2811F457E2D0057511C; 30 | remoteInfo = CCPageControl; 31 | }; 32 | BB1CD2A71F457E2D0057511C /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = BB1CD27A1F457E2D0057511C /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = BB1CD2811F457E2D0057511C; 37 | remoteInfo = CCPageControl; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | BB1CD2821F457E2D0057511C /* CCPageControl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CCPageControl.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | BB1CD2861F457E2D0057511C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | BB1CD2881F457E2D0057511C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | BB1CD2891F457E2D0057511C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | BB1CD28B1F457E2D0057511C /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | BB1CD28C1F457E2D0057511C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | BB1CD28F1F457E2D0057511C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | BB1CD2911F457E2D0057511C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | BB1CD2941F457E2D0057511C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | BB1CD2961F457E2D0057511C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | BB1CD29B1F457E2D0057511C /* CCPageControlTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CCPageControlTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | BB1CD29F1F457E2D0057511C /* CCPageControlTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPageControlTests.m; sourceTree = ""; }; 54 | BB1CD2A11F457E2D0057511C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | BB1CD2A61F457E2D0057511C /* CCPageControlUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CCPageControlUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | BB1CD2AA1F457E2D0057511C /* CCPageControlUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCPageControlUITests.m; sourceTree = ""; }; 57 | BB1CD2AC1F457E2D0057511C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | BB1CD2B81F457E4C0057511C /* PageControlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageControlView.h; sourceTree = ""; }; 59 | BB1CD2B91F457E4C0057511C /* PageControlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PageControlView.m; sourceTree = ""; }; 60 | BB1CD2BC1F457E5C0057511C /* PageControlView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PageControlView.xib; sourceTree = ""; }; 61 | BB1CD2CC1F4598250057511C /* PageControlCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageControlCollectionViewCell.h; sourceTree = ""; }; 62 | BB1CD2CD1F4598250057511C /* PageControlCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PageControlCollectionViewCell.m; sourceTree = ""; }; 63 | BB1CD2CE1F4598250057511C /* PageControlCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PageControlCollectionViewCell.xib; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | BB1CD27F1F457E2D0057511C /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | BB1CD2981F457E2D0057511C /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | BB1CD2A31F457E2D0057511C /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | BB1CD2791F457E2D0057511C = { 92 | isa = PBXGroup; 93 | children = ( 94 | BB1CD2841F457E2D0057511C /* CCPageControl */, 95 | BB1CD29E1F457E2D0057511C /* CCPageControlTests */, 96 | BB1CD2A91F457E2D0057511C /* CCPageControlUITests */, 97 | BB1CD2831F457E2D0057511C /* Products */, 98 | ); 99 | sourceTree = ""; 100 | }; 101 | BB1CD2831F457E2D0057511C /* Products */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | BB1CD2821F457E2D0057511C /* CCPageControl.app */, 105 | BB1CD29B1F457E2D0057511C /* CCPageControlTests.xctest */, 106 | BB1CD2A61F457E2D0057511C /* CCPageControlUITests.xctest */, 107 | ); 108 | name = Products; 109 | sourceTree = ""; 110 | }; 111 | BB1CD2841F457E2D0057511C /* CCPageControl */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | BB1CD2BB1F457E510057511C /* PageControlView */, 115 | BB1CD2881F457E2D0057511C /* AppDelegate.h */, 116 | BB1CD2891F457E2D0057511C /* AppDelegate.m */, 117 | BB1CD28B1F457E2D0057511C /* ViewController.h */, 118 | BB1CD28C1F457E2D0057511C /* ViewController.m */, 119 | BB1CD28E1F457E2D0057511C /* Main.storyboard */, 120 | BB1CD2911F457E2D0057511C /* Assets.xcassets */, 121 | BB1CD2931F457E2D0057511C /* LaunchScreen.storyboard */, 122 | BB1CD2961F457E2D0057511C /* Info.plist */, 123 | BB1CD2851F457E2D0057511C /* Supporting Files */, 124 | ); 125 | path = CCPageControl; 126 | sourceTree = ""; 127 | }; 128 | BB1CD2851F457E2D0057511C /* Supporting Files */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | BB1CD2861F457E2D0057511C /* main.m */, 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | BB1CD29E1F457E2D0057511C /* CCPageControlTests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | BB1CD29F1F457E2D0057511C /* CCPageControlTests.m */, 140 | BB1CD2A11F457E2D0057511C /* Info.plist */, 141 | ); 142 | path = CCPageControlTests; 143 | sourceTree = ""; 144 | }; 145 | BB1CD2A91F457E2D0057511C /* CCPageControlUITests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | BB1CD2AA1F457E2D0057511C /* CCPageControlUITests.m */, 149 | BB1CD2AC1F457E2D0057511C /* Info.plist */, 150 | ); 151 | path = CCPageControlUITests; 152 | sourceTree = ""; 153 | }; 154 | BB1CD2BB1F457E510057511C /* PageControlView */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | BB1CD2CB1F45917B0057511C /* images */, 158 | ); 159 | name = PageControlView; 160 | sourceTree = ""; 161 | }; 162 | BB1CD2CB1F45917B0057511C /* images */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | BB1CD2B81F457E4C0057511C /* PageControlView.h */, 166 | BB1CD2B91F457E4C0057511C /* PageControlView.m */, 167 | BB1CD2BC1F457E5C0057511C /* PageControlView.xib */, 168 | BB1CD2CC1F4598250057511C /* PageControlCollectionViewCell.h */, 169 | BB1CD2CD1F4598250057511C /* PageControlCollectionViewCell.m */, 170 | BB1CD2CE1F4598250057511C /* PageControlCollectionViewCell.xib */, 171 | ); 172 | name = images; 173 | sourceTree = ""; 174 | }; 175 | /* End PBXGroup section */ 176 | 177 | /* Begin PBXNativeTarget section */ 178 | BB1CD2811F457E2D0057511C /* CCPageControl */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = BB1CD2AF1F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControl" */; 181 | buildPhases = ( 182 | BB1CD27E1F457E2D0057511C /* Sources */, 183 | BB1CD27F1F457E2D0057511C /* Frameworks */, 184 | BB1CD2801F457E2D0057511C /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | ); 190 | name = CCPageControl; 191 | productName = CCPageControl; 192 | productReference = BB1CD2821F457E2D0057511C /* CCPageControl.app */; 193 | productType = "com.apple.product-type.application"; 194 | }; 195 | BB1CD29A1F457E2D0057511C /* CCPageControlTests */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = BB1CD2B21F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControlTests" */; 198 | buildPhases = ( 199 | BB1CD2971F457E2D0057511C /* Sources */, 200 | BB1CD2981F457E2D0057511C /* Frameworks */, 201 | BB1CD2991F457E2D0057511C /* Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | BB1CD29D1F457E2D0057511C /* PBXTargetDependency */, 207 | ); 208 | name = CCPageControlTests; 209 | productName = CCPageControlTests; 210 | productReference = BB1CD29B1F457E2D0057511C /* CCPageControlTests.xctest */; 211 | productType = "com.apple.product-type.bundle.unit-test"; 212 | }; 213 | BB1CD2A51F457E2D0057511C /* CCPageControlUITests */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = BB1CD2B51F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControlUITests" */; 216 | buildPhases = ( 217 | BB1CD2A21F457E2D0057511C /* Sources */, 218 | BB1CD2A31F457E2D0057511C /* Frameworks */, 219 | BB1CD2A41F457E2D0057511C /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | BB1CD2A81F457E2D0057511C /* PBXTargetDependency */, 225 | ); 226 | name = CCPageControlUITests; 227 | productName = CCPageControlUITests; 228 | productReference = BB1CD2A61F457E2D0057511C /* CCPageControlUITests.xctest */; 229 | productType = "com.apple.product-type.bundle.ui-testing"; 230 | }; 231 | /* End PBXNativeTarget section */ 232 | 233 | /* Begin PBXProject section */ 234 | BB1CD27A1F457E2D0057511C /* Project object */ = { 235 | isa = PBXProject; 236 | attributes = { 237 | LastUpgradeCheck = 0830; 238 | ORGANIZATIONNAME = cccc; 239 | TargetAttributes = { 240 | BB1CD2811F457E2D0057511C = { 241 | CreatedOnToolsVersion = 8.3.3; 242 | ProvisioningStyle = Automatic; 243 | }; 244 | BB1CD29A1F457E2D0057511C = { 245 | CreatedOnToolsVersion = 8.3.3; 246 | ProvisioningStyle = Automatic; 247 | TestTargetID = BB1CD2811F457E2D0057511C; 248 | }; 249 | BB1CD2A51F457E2D0057511C = { 250 | CreatedOnToolsVersion = 8.3.3; 251 | ProvisioningStyle = Automatic; 252 | TestTargetID = BB1CD2811F457E2D0057511C; 253 | }; 254 | }; 255 | }; 256 | buildConfigurationList = BB1CD27D1F457E2D0057511C /* Build configuration list for PBXProject "CCPageControl" */; 257 | compatibilityVersion = "Xcode 3.2"; 258 | developmentRegion = English; 259 | hasScannedForEncodings = 0; 260 | knownRegions = ( 261 | en, 262 | Base, 263 | ); 264 | mainGroup = BB1CD2791F457E2D0057511C; 265 | productRefGroup = BB1CD2831F457E2D0057511C /* Products */; 266 | projectDirPath = ""; 267 | projectRoot = ""; 268 | targets = ( 269 | BB1CD2811F457E2D0057511C /* CCPageControl */, 270 | BB1CD29A1F457E2D0057511C /* CCPageControlTests */, 271 | BB1CD2A51F457E2D0057511C /* CCPageControlUITests */, 272 | ); 273 | }; 274 | /* End PBXProject section */ 275 | 276 | /* Begin PBXResourcesBuildPhase section */ 277 | BB1CD2801F457E2D0057511C /* Resources */ = { 278 | isa = PBXResourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | BB1CD2951F457E2D0057511C /* LaunchScreen.storyboard in Resources */, 282 | BB1CD2D01F4598250057511C /* PageControlCollectionViewCell.xib in Resources */, 283 | BB1CD2BD1F457E5C0057511C /* PageControlView.xib in Resources */, 284 | BB1CD2921F457E2D0057511C /* Assets.xcassets in Resources */, 285 | BB1CD2901F457E2D0057511C /* Main.storyboard in Resources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | BB1CD2991F457E2D0057511C /* Resources */ = { 290 | isa = PBXResourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | BB1CD2A41F457E2D0057511C /* Resources */ = { 297 | isa = PBXResourcesBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXResourcesBuildPhase section */ 304 | 305 | /* Begin PBXSourcesBuildPhase section */ 306 | BB1CD27E1F457E2D0057511C /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | BB1CD2CF1F4598250057511C /* PageControlCollectionViewCell.m in Sources */, 311 | BB1CD28D1F457E2D0057511C /* ViewController.m in Sources */, 312 | BB1CD2BA1F457E4C0057511C /* PageControlView.m in Sources */, 313 | BB1CD28A1F457E2D0057511C /* AppDelegate.m in Sources */, 314 | BB1CD2871F457E2D0057511C /* main.m in Sources */, 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | BB1CD2971F457E2D0057511C /* Sources */ = { 319 | isa = PBXSourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | BB1CD2A01F457E2D0057511C /* CCPageControlTests.m in Sources */, 323 | ); 324 | runOnlyForDeploymentPostprocessing = 0; 325 | }; 326 | BB1CD2A21F457E2D0057511C /* Sources */ = { 327 | isa = PBXSourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | BB1CD2AB1F457E2D0057511C /* CCPageControlUITests.m in Sources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | /* End PBXSourcesBuildPhase section */ 335 | 336 | /* Begin PBXTargetDependency section */ 337 | BB1CD29D1F457E2D0057511C /* PBXTargetDependency */ = { 338 | isa = PBXTargetDependency; 339 | target = BB1CD2811F457E2D0057511C /* CCPageControl */; 340 | targetProxy = BB1CD29C1F457E2D0057511C /* PBXContainerItemProxy */; 341 | }; 342 | BB1CD2A81F457E2D0057511C /* PBXTargetDependency */ = { 343 | isa = PBXTargetDependency; 344 | target = BB1CD2811F457E2D0057511C /* CCPageControl */; 345 | targetProxy = BB1CD2A71F457E2D0057511C /* PBXContainerItemProxy */; 346 | }; 347 | /* End PBXTargetDependency section */ 348 | 349 | /* Begin PBXVariantGroup section */ 350 | BB1CD28E1F457E2D0057511C /* Main.storyboard */ = { 351 | isa = PBXVariantGroup; 352 | children = ( 353 | BB1CD28F1F457E2D0057511C /* Base */, 354 | ); 355 | name = Main.storyboard; 356 | sourceTree = ""; 357 | }; 358 | BB1CD2931F457E2D0057511C /* LaunchScreen.storyboard */ = { 359 | isa = PBXVariantGroup; 360 | children = ( 361 | BB1CD2941F457E2D0057511C /* Base */, 362 | ); 363 | name = LaunchScreen.storyboard; 364 | sourceTree = ""; 365 | }; 366 | /* End PBXVariantGroup section */ 367 | 368 | /* Begin XCBuildConfiguration section */ 369 | BB1CD2AD1F457E2D0057511C /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_ANALYZER_NONNULL = YES; 374 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 376 | CLANG_CXX_LIBRARY = "libc++"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_WARN_BOOL_CONVERSION = YES; 380 | CLANG_WARN_CONSTANT_CONVERSION = YES; 381 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 382 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 383 | CLANG_WARN_EMPTY_BODY = YES; 384 | CLANG_WARN_ENUM_CONVERSION = YES; 385 | CLANG_WARN_INFINITE_RECURSION = YES; 386 | CLANG_WARN_INT_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 389 | CLANG_WARN_UNREACHABLE_CODE = YES; 390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 391 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 392 | COPY_PHASE_STRIP = NO; 393 | DEBUG_INFORMATION_FORMAT = dwarf; 394 | ENABLE_STRICT_OBJC_MSGSEND = YES; 395 | ENABLE_TESTABILITY = YES; 396 | GCC_C_LANGUAGE_STANDARD = gnu99; 397 | GCC_DYNAMIC_NO_PIC = NO; 398 | GCC_NO_COMMON_BLOCKS = YES; 399 | GCC_OPTIMIZATION_LEVEL = 0; 400 | GCC_PREPROCESSOR_DEFINITIONS = ( 401 | "DEBUG=1", 402 | "$(inherited)", 403 | ); 404 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 405 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 406 | GCC_WARN_UNDECLARED_SELECTOR = YES; 407 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 408 | GCC_WARN_UNUSED_FUNCTION = YES; 409 | GCC_WARN_UNUSED_VARIABLE = YES; 410 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 411 | MTL_ENABLE_DEBUG_INFO = YES; 412 | ONLY_ACTIVE_ARCH = YES; 413 | SDKROOT = iphoneos; 414 | }; 415 | name = Debug; 416 | }; 417 | BB1CD2AE1F457E2D0057511C /* Release */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ALWAYS_SEARCH_USER_PATHS = NO; 421 | CLANG_ANALYZER_NONNULL = YES; 422 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 423 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 424 | CLANG_CXX_LIBRARY = "libc++"; 425 | CLANG_ENABLE_MODULES = YES; 426 | CLANG_ENABLE_OBJC_ARC = YES; 427 | CLANG_WARN_BOOL_CONVERSION = YES; 428 | CLANG_WARN_CONSTANT_CONVERSION = YES; 429 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 430 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 431 | CLANG_WARN_EMPTY_BODY = YES; 432 | CLANG_WARN_ENUM_CONVERSION = YES; 433 | CLANG_WARN_INFINITE_RECURSION = YES; 434 | CLANG_WARN_INT_CONVERSION = YES; 435 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 436 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 437 | CLANG_WARN_UNREACHABLE_CODE = YES; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 440 | COPY_PHASE_STRIP = NO; 441 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 442 | ENABLE_NS_ASSERTIONS = NO; 443 | ENABLE_STRICT_OBJC_MSGSEND = YES; 444 | GCC_C_LANGUAGE_STANDARD = gnu99; 445 | GCC_NO_COMMON_BLOCKS = YES; 446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 448 | GCC_WARN_UNDECLARED_SELECTOR = YES; 449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 450 | GCC_WARN_UNUSED_FUNCTION = YES; 451 | GCC_WARN_UNUSED_VARIABLE = YES; 452 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 453 | MTL_ENABLE_DEBUG_INFO = NO; 454 | SDKROOT = iphoneos; 455 | VALIDATE_PRODUCT = YES; 456 | }; 457 | name = Release; 458 | }; 459 | BB1CD2B01F457E2D0057511C /* Debug */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 463 | INFOPLIST_FILE = CCPageControl/Info.plist; 464 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 465 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControl; 466 | PRODUCT_NAME = "$(TARGET_NAME)"; 467 | }; 468 | name = Debug; 469 | }; 470 | BB1CD2B11F457E2D0057511C /* Release */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 474 | INFOPLIST_FILE = CCPageControl/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 476 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControl; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | }; 479 | name = Release; 480 | }; 481 | BB1CD2B31F457E2D0057511C /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | BUNDLE_LOADER = "$(TEST_HOST)"; 485 | INFOPLIST_FILE = CCPageControlTests/Info.plist; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 487 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControlTests; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCPageControl.app/CCPageControl"; 490 | }; 491 | name = Debug; 492 | }; 493 | BB1CD2B41F457E2D0057511C /* Release */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | BUNDLE_LOADER = "$(TEST_HOST)"; 497 | INFOPLIST_FILE = CCPageControlTests/Info.plist; 498 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 499 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControlTests; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CCPageControl.app/CCPageControl"; 502 | }; 503 | name = Release; 504 | }; 505 | BB1CD2B61F457E2D0057511C /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | INFOPLIST_FILE = CCPageControlUITests/Info.plist; 509 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 510 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControlUITests; 511 | PRODUCT_NAME = "$(TARGET_NAME)"; 512 | TEST_TARGET_NAME = CCPageControl; 513 | }; 514 | name = Debug; 515 | }; 516 | BB1CD2B71F457E2D0057511C /* Release */ = { 517 | isa = XCBuildConfiguration; 518 | buildSettings = { 519 | INFOPLIST_FILE = CCPageControlUITests/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 521 | PRODUCT_BUNDLE_IDENTIFIER = cccc.CCPageControlUITests; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | TEST_TARGET_NAME = CCPageControl; 524 | }; 525 | name = Release; 526 | }; 527 | /* End XCBuildConfiguration section */ 528 | 529 | /* Begin XCConfigurationList section */ 530 | BB1CD27D1F457E2D0057511C /* Build configuration list for PBXProject "CCPageControl" */ = { 531 | isa = XCConfigurationList; 532 | buildConfigurations = ( 533 | BB1CD2AD1F457E2D0057511C /* Debug */, 534 | BB1CD2AE1F457E2D0057511C /* Release */, 535 | ); 536 | defaultConfigurationIsVisible = 0; 537 | defaultConfigurationName = Release; 538 | }; 539 | BB1CD2AF1F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControl" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | BB1CD2B01F457E2D0057511C /* Debug */, 543 | BB1CD2B11F457E2D0057511C /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | }; 547 | BB1CD2B21F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControlTests" */ = { 548 | isa = XCConfigurationList; 549 | buildConfigurations = ( 550 | BB1CD2B31F457E2D0057511C /* Debug */, 551 | BB1CD2B41F457E2D0057511C /* Release */, 552 | ); 553 | defaultConfigurationIsVisible = 0; 554 | }; 555 | BB1CD2B51F457E2D0057511C /* Build configuration list for PBXNativeTarget "CCPageControlUITests" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | BB1CD2B61F457E2D0057511C /* Debug */, 559 | BB1CD2B71F457E2D0057511C /* Release */, 560 | ); 561 | defaultConfigurationIsVisible = 0; 562 | }; 563 | /* End XCConfigurationList section */ 564 | }; 565 | rootObject = BB1CD27A1F457E2D0057511C /* Project object */; 566 | } 567 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl.xcodeproj/project.xcworkspace/xcuserdata/cuican.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl.xcodeproj/project.xcworkspace/xcuserdata/cuican.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CCPageControl/CCPageControl.xcodeproj/xcuserdata/cuican.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl.xcodeproj/xcuserdata/cuican.xcuserdatad/xcschemes/CCPageControl.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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl.xcodeproj/xcuserdata/cuican.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CCPageControl.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BB1CD2811F457E2D0057511C 16 | 17 | primary 18 | 19 | 20 | BB1CD29A1F457E2D0057511C 21 | 22 | primary 23 | 24 | 25 | BB1CD2A51F457E2D0057511C 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. 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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. 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 | 20 | 21 | // Override point for customization after application launch. 22 | return YES; 23 | } 24 | 25 | 26 | - (void)applicationWillResignActive:(UIApplication *)application { 27 | // 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. 28 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 29 | } 30 | 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application { 39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // 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. 45 | } 46 | 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/1.imageset/1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl/Assets.xcassets/1.imageset/1.JPG -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "1.JPG", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/2.imageset/2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl/Assets.xcassets/2.imageset/2.JPG -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "2.JPG", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/3.imageset/3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl/Assets.xcassets/3.imageset/3.JPG -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "3.JPG", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/4.imageset/4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl/Assets.xcassets/4.imageset/4.JPG -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "4.JPG", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/5.imageset/5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CccciOS/CCPageControl/04580dcd28ee10d3a9d538127bca18b04a2770fd/CCPageControl/CCPageControl/Assets.xcassets/5.imageset/5.JPG -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "5.JPG", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // PageControlCollectionViewCell.h 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PageControlCollectionViewCell : UICollectionViewCell 12 | @property (strong, nonatomic) IBOutlet UIImageView *imageV; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // PageControlCollectionViewCell.m 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import "PageControlCollectionViewCell.h" 10 | 11 | @implementation PageControlCollectionViewCell 12 | 13 | - (void)awakeFromNib { 14 | [super awakeFromNib]; 15 | // Initialization code 16 | } 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlCollectionViewCell.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 | 39 | 40 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PageControlView.h 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PageControlView : UIView 12 | +(PageControlView *)instance; 13 | - (instancetype)initWithFrame:(CGRect)frame andImageList:(NSArray *)arr; 14 | @property (strong, nonatomic) IBOutlet UICollectionView *collectionV; 15 | @property (strong, nonatomic) IBOutlet UIButton *btn; 16 | @property (strong, nonatomic) IBOutlet UIPageControl *pageV; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PageControlView.m 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import "PageControlView.h" 10 | #import "PageControlCollectionViewCell.h" 11 | 12 | #define kHighlighted [UIColor colorWithRed:230/255.0 green:230/255.0 blue:230/255.0 alpha:1.0] 13 | #define kAfterDelayTime 0.3 //最后按钮显示的延迟时间 14 | static NSString *reuseIdentifier = @"PageControlCollectionViewCell"; 15 | @interface PageControlView() 16 | < 17 | UICollectionViewDelegate, 18 | UICollectionViewDataSource, 19 | UIScrollViewDelegate 20 | > 21 | @property (strong , nonatomic) NSArray *imageArr; 22 | @end 23 | 24 | @implementation PageControlView 25 | 26 | /* 27 | // Only override drawRect: if you perform custom drawing. 28 | // An empty implementation adversely affects performance during animation. 29 | - (void)drawRect:(CGRect)rect { 30 | // Drawing code 31 | } 32 | */ 33 | +(PageControlView *)instance 34 | { 35 | NSArray *nibView=[[NSBundle mainBundle]loadNibNamed:@"PageControlView" owner:self options:nil]; 36 | return [nibView objectAtIndex:0]; 37 | } 38 | 39 | 40 | - (instancetype)initWithFrame:(CGRect)frame andImageList:(NSArray *)arr{ 41 | self = [super initWithFrame:frame]; 42 | if (self) { 43 | // 设置默认值 44 | self.frame = frame; 45 | self.backgroundColor = [UIColor brownColor]; 46 | 47 | self.imageArr = arr; 48 | 49 | 50 | 51 | [self setViews]; 52 | 53 | } 54 | return self; 55 | } 56 | 57 | - (void)setViews 58 | { 59 | self.collectionV.frame = self.frame; 60 | self.collectionV.dataSource = self; 61 | self.collectionV.delegate = self; 62 | self.collectionV.pagingEnabled = YES; 63 | self.collectionV.showsHorizontalScrollIndicator = NO; 64 | self.collectionV.bounces = NO; 65 | self.collectionV.showsVerticalScrollIndicator = NO; 66 | self.collectionV.showsHorizontalScrollIndicator = NO; 67 | [self.collectionV registerClass:[PageControlCollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier]; 68 | 69 | self.pageV.frame=CGRectMake(0, 0, self.frame.size.width, self.frame.size.height * 0.1); 70 | self.pageV.center=CGPointMake(self.frame.size.width/2, self.frame.size.height - self.pageV.frame.size.height/2); 71 | self.pageV.numberOfPages = self.imageArr.count;//指定页面个数 72 | self.pageV.currentPage = 0;//指定pagecontroll的值,默认选中的小白点(第一个) 73 | self.pageV.pageIndicatorTintColor = [UIColor lightGrayColor];// 设置非选中页的圆点颜色 74 | self.pageV.currentPageIndicatorTintColor = [UIColor whiteColor]; // 设置选中页的圆点颜色 75 | 76 | 77 | 78 | self.btn.frame = CGRectMake(0, 0, self.frame.size.width * 0.5, self.frame.size.height * 0.05); 79 | self.btn.center = CGPointMake(self.frame.size.width/2, self.pageV.frame.origin.y - self.btn.frame.size.height/2); 80 | self.btn.hidden = YES; 81 | self.btn.backgroundColor = [UIColor clearColor]; 82 | self.btn.layer.masksToBounds = YES; 83 | self.btn.layer.cornerRadius = self.btn.frame.size.height/2; 84 | self.btn.layer.borderWidth = 1.0; 85 | self.btn.layer.borderColor=[UIColor whiteColor].CGColor; 86 | [self.btn addTarget:self action:@selector(buttonBackGroundHighlighted:) forControlEvents:UIControlEventTouchDown]; 87 | [self.btn addTarget:self action:@selector(removeViewBtn:) forControlEvents:UIControlEventTouchUpInside]; 88 | [self.btn setTitle:@"开始体验" forState:UIControlStateNormal]; 89 | 90 | } 91 | 92 | -(void)btnHidden:(UIButton *)btn 93 | { 94 | btn.hidden=NO; 95 | } 96 | 97 | -(void)removeViewBtn:(UIButton *)sender 98 | { 99 | sender.backgroundColor = [UIColor clearColor]; 100 | [self removeFromSuperview]; 101 | } 102 | 103 | - (void)buttonBackGroundHighlighted:(UIButton *)sender 104 | { 105 | sender.backgroundColor = kHighlighted; 106 | } 107 | 108 | #pragma mark - UICollectionView 109 | -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView 110 | { 111 | return 1; 112 | } 113 | -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section 114 | { 115 | 116 | return self.imageArr.count; 117 | } 118 | 119 | -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 120 | { 121 | 122 | 123 | UINib *nib = [UINib nibWithNibName:@"PageControlCollectionViewCell" bundle: [NSBundle mainBundle]]; 124 | [collectionView registerNib:nib forCellWithReuseIdentifier:reuseIdentifier]; 125 | PageControlCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; 126 | 127 | 128 | cell.imageV.frame=CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); 129 | cell.imageV.image = [UIImage imageNamed:self.imageArr[indexPath.row]]; 130 | 131 | return cell; 132 | 133 | 134 | } 135 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath 136 | { 137 | 138 | return CGSizeMake(collectionView.frame.size.width, collectionView.frame.size.height); 139 | 140 | } 141 | -(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section 142 | { 143 | 144 | return UIEdgeInsetsMake(0, 0, 0, 0); 145 | } 146 | // 两行之间的最小间距 147 | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section 148 | { 149 | 150 | return 0; 151 | 152 | } 153 | 154 | // 两个cell之间的最小间距,是由API自动计算的,只有当间距小于该值时,cell会进行换行 155 | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section 156 | { 157 | return 0; 158 | 159 | } 160 | 161 | #pragma mark - UIScrollView 162 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView; 163 | { 164 | 165 | 166 | if ((scrollView.contentOffset.x/self.frame.size.width)==self.imageArr.count-1){ 167 | [self performSelector:@selector(btnHidden:) withObject:self.btn afterDelay:kAfterDelayTime]; 168 | } 169 | else 170 | { 171 | self.btn.hidden=YES; 172 | } 173 | 174 | 175 | } 176 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 177 | { 178 | 179 | int page = scrollView.contentOffset.x / scrollView.frame.size.width; 180 | self.pageV.currentPage = page; 181 | } 182 | 183 | 184 | @end 185 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/PageControlView.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 | 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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "PageControlView.h" 11 | @interface ViewController () 12 | @property(strong , nonatomic)PageControlView *pageControlV; 13 | @property(strong , nonatomic)NSArray *imageArr; 14 | @end 15 | 16 | @implementation ViewController 17 | - (NSArray *)imageArr 18 | { 19 | if (!_imageArr) { 20 | _imageArr = [NSArray arrayWithObjects:@"1",@"2",@"3",@"4",@"5", nil]; 21 | } 22 | return _imageArr; 23 | } 24 | 25 | - (PageControlView *)pageControlV 26 | { 27 | if (!_pageControlV) { 28 | _pageControlV = [[PageControlView instance] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) andImageList:self.imageArr]; 29 | } 30 | return _pageControlV; 31 | } 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | 35 | 36 | [self.view addSubview:self.pageControlV]; 37 | // Do any additional setup after loading the view, typically from a nib. 38 | } 39 | 40 | 41 | - (void)didReceiveMemoryWarning { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControl/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CCPageControl 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. 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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControlTests/CCPageControlTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CCPageControlTests.m 3 | // CCPageControlTests 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CCPageControlTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CCPageControlTests 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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControlTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControlUITests/CCPageControlUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CCPageControlUITests.m 3 | // CCPageControlUITests 4 | // 5 | // Created by 崔璨 on 2017/8/17. 6 | // Copyright © 2017年 cccc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CCPageControlUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CCPageControlUITests 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 | -------------------------------------------------------------------------------- /CCPageControl/CCPageControlUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CCPageControl 2 | --------------------------------------------------------------------------------