├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── apple.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── apple.xcuserdatad │ │ └── xcschemes │ │ ├── Example.xcscheme │ │ └── xcschememanagement.plist ├── Example.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── apple.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Buttons │ │ │ ├── Contents.json │ │ │ ├── icon_close.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── close-btn2.pdf │ │ │ ├── icon_home.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── home-btn2-1.pdf │ │ │ ├── icon_menu.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── Menu-btn2.pdf │ │ │ ├── icon_search.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── search-btn2.pdf │ │ │ ├── nearby-btn.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── nearby-btn2.pdf │ │ │ ├── notifications-btn.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── notifications-btn.pdf │ │ │ └── settings-btn.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── settings-btn.pdf │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── ExampleTests │ ├── ExampleTests.swift │ └── Info.plist ├── Podfile ├── Podfile.lock └── Pods │ ├── Local Podspecs │ └── PopCircleMenu.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── apple.xcuserdatad │ │ └── xcschemes │ │ ├── Pods.xcscheme │ │ ├── PopCircleMenu.xcscheme │ │ └── xcschememanagement.plist │ ├── PopCircleMenu │ ├── README.md │ └── Source │ │ ├── CircleMenu.swift │ │ ├── CircleMenuButton.swift │ │ ├── PopCirCleMenuView.swift │ │ └── Utility.swift │ └── Target Support Files │ ├── Pods │ ├── Info.plist │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-frameworks.sh │ ├── Pods-resources.sh │ ├── Pods-umbrella.h │ ├── Pods.debug.xcconfig │ ├── Pods.modulemap │ └── Pods.release.xcconfig │ └── PopCircleMenu │ ├── Info.plist │ ├── PopCircleMenu-dummy.m │ ├── PopCircleMenu-prefix.pch │ ├── PopCircleMenu-umbrella.h │ ├── PopCircleMenu.modulemap │ └── PopCircleMenu.xcconfig ├── PopCircleMenu.podspec ├── README.md ├── README ├── README.html ├── adptive.gif ├── index.html ├── main.css └── pop.gif └── Source ├── CircleMenu.swift ├── CircleMenuButton.swift ├── PopCirCleMenuView.swift └── Utility.swift /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 189FE9AC1D2F997300947230 14 | 15 | children 16 | 17 | 189FE9B71D2F997300947230 18 | 189FE9CC1D2F997300947230 19 | 189FE9B61D2F997300947230 20 | 2D3FD63120DB6A7CB20621F6 21 | 37DB5C0D53B670F6F9904628 22 | 23 | isa 24 | PBXGroup 25 | sourceTree 26 | <group> 27 | 28 | 189FE9AD1D2F997300947230 29 | 30 | attributes 31 | 32 | LastSwiftUpdateCheck 33 | 0730 34 | LastUpgradeCheck 35 | 0730 36 | ORGANIZATIONNAME 37 | luiyezheng 38 | TargetAttributes 39 | 40 | 189FE9B41D2F997300947230 41 | 42 | CreatedOnToolsVersion 43 | 7.3.1 44 | 45 | 189FE9C81D2F997300947230 46 | 47 | CreatedOnToolsVersion 48 | 7.3.1 49 | TestTargetID 50 | 189FE9B41D2F997300947230 51 | 52 | 53 | 54 | buildConfigurationList 55 | 189FE9B01D2F997300947230 56 | compatibilityVersion 57 | Xcode 3.2 58 | developmentRegion 59 | English 60 | hasScannedForEncodings 61 | 0 62 | isa 63 | PBXProject 64 | knownRegions 65 | 66 | en 67 | Base 68 | 69 | mainGroup 70 | 189FE9AC1D2F997300947230 71 | productRefGroup 72 | 189FE9B61D2F997300947230 73 | projectDirPath 74 | 75 | projectReferences 76 | 77 | projectRoot 78 | 79 | targets 80 | 81 | 189FE9B41D2F997300947230 82 | 189FE9C81D2F997300947230 83 | 84 | 85 | 189FE9B01D2F997300947230 86 | 87 | buildConfigurations 88 | 89 | 189FE9D01D2F997300947230 90 | 189FE9D11D2F997300947230 91 | 92 | defaultConfigurationIsVisible 93 | 0 94 | defaultConfigurationName 95 | Release 96 | isa 97 | XCConfigurationList 98 | 99 | 189FE9B11D2F997300947230 100 | 101 | buildActionMask 102 | 2147483647 103 | files 104 | 105 | 189FE9BB1D2F997300947230 106 | 189FE9B91D2F997300947230 107 | 108 | isa 109 | PBXSourcesBuildPhase 110 | runOnlyForDeploymentPostprocessing 111 | 0 112 | 113 | 189FE9B21D2F997300947230 114 | 115 | buildActionMask 116 | 2147483647 117 | files 118 | 119 | 55BBC0FFE56639EF7345BB93 120 | 121 | isa 122 | PBXFrameworksBuildPhase 123 | runOnlyForDeploymentPostprocessing 124 | 0 125 | 126 | 189FE9B31D2F997300947230 127 | 128 | buildActionMask 129 | 2147483647 130 | files 131 | 132 | 189FE9C31D2F997300947230 133 | 189FE9C01D2F997300947230 134 | 189FE9BE1D2F997300947230 135 | 136 | isa 137 | PBXResourcesBuildPhase 138 | runOnlyForDeploymentPostprocessing 139 | 0 140 | 141 | 189FE9B41D2F997300947230 142 | 143 | buildConfigurationList 144 | 189FE9D21D2F997300947230 145 | buildPhases 146 | 147 | 7F44BFB2B00C60EED9B6AD08 148 | 189FE9B11D2F997300947230 149 | 189FE9B21D2F997300947230 150 | 189FE9B31D2F997300947230 151 | 283229954B087F2D976E156D 152 | A0798B3914A5E09B59CC2AB6 153 | 154 | buildRules 155 | 156 | dependencies 157 | 158 | isa 159 | PBXNativeTarget 160 | name 161 | Example 162 | productName 163 | Example 164 | productReference 165 | 189FE9B51D2F997300947230 166 | productType 167 | com.apple.product-type.application 168 | 169 | 189FE9B51D2F997300947230 170 | 171 | explicitFileType 172 | wrapper.application 173 | includeInIndex 174 | 0 175 | isa 176 | PBXFileReference 177 | path 178 | Example.app 179 | sourceTree 180 | BUILT_PRODUCTS_DIR 181 | 182 | 189FE9B61D2F997300947230 183 | 184 | children 185 | 186 | 189FE9B51D2F997300947230 187 | 189FE9C91D2F997300947230 188 | 189 | isa 190 | PBXGroup 191 | name 192 | Products 193 | sourceTree 194 | <group> 195 | 196 | 189FE9B71D2F997300947230 197 | 198 | children 199 | 200 | 189FE9B81D2F997300947230 201 | 189FE9BA1D2F997300947230 202 | 189FE9BC1D2F997300947230 203 | 189FE9BF1D2F997300947230 204 | 189FE9C11D2F997300947230 205 | 189FE9C41D2F997300947230 206 | 207 | isa 208 | PBXGroup 209 | path 210 | Example 211 | sourceTree 212 | <group> 213 | 214 | 189FE9B81D2F997300947230 215 | 216 | isa 217 | PBXFileReference 218 | lastKnownFileType 219 | sourcecode.swift 220 | path 221 | AppDelegate.swift 222 | sourceTree 223 | <group> 224 | 225 | 189FE9B91D2F997300947230 226 | 227 | fileRef 228 | 189FE9B81D2F997300947230 229 | isa 230 | PBXBuildFile 231 | 232 | 189FE9BA1D2F997300947230 233 | 234 | isa 235 | PBXFileReference 236 | lastKnownFileType 237 | sourcecode.swift 238 | path 239 | ViewController.swift 240 | sourceTree 241 | <group> 242 | 243 | 189FE9BB1D2F997300947230 244 | 245 | fileRef 246 | 189FE9BA1D2F997300947230 247 | isa 248 | PBXBuildFile 249 | 250 | 189FE9BC1D2F997300947230 251 | 252 | children 253 | 254 | 189FE9BD1D2F997300947230 255 | 256 | isa 257 | PBXVariantGroup 258 | name 259 | Main.storyboard 260 | sourceTree 261 | <group> 262 | 263 | 189FE9BD1D2F997300947230 264 | 265 | isa 266 | PBXFileReference 267 | lastKnownFileType 268 | file.storyboard 269 | name 270 | Base 271 | path 272 | Base.lproj/Main.storyboard 273 | sourceTree 274 | <group> 275 | 276 | 189FE9BE1D2F997300947230 277 | 278 | fileRef 279 | 189FE9BC1D2F997300947230 280 | isa 281 | PBXBuildFile 282 | 283 | 189FE9BF1D2F997300947230 284 | 285 | isa 286 | PBXFileReference 287 | lastKnownFileType 288 | folder.assetcatalog 289 | path 290 | Assets.xcassets 291 | sourceTree 292 | <group> 293 | 294 | 189FE9C01D2F997300947230 295 | 296 | fileRef 297 | 189FE9BF1D2F997300947230 298 | isa 299 | PBXBuildFile 300 | 301 | 189FE9C11D2F997300947230 302 | 303 | children 304 | 305 | 189FE9C21D2F997300947230 306 | 307 | isa 308 | PBXVariantGroup 309 | name 310 | LaunchScreen.storyboard 311 | sourceTree 312 | <group> 313 | 314 | 189FE9C21D2F997300947230 315 | 316 | isa 317 | PBXFileReference 318 | lastKnownFileType 319 | file.storyboard 320 | name 321 | Base 322 | path 323 | Base.lproj/LaunchScreen.storyboard 324 | sourceTree 325 | <group> 326 | 327 | 189FE9C31D2F997300947230 328 | 329 | fileRef 330 | 189FE9C11D2F997300947230 331 | isa 332 | PBXBuildFile 333 | 334 | 189FE9C41D2F997300947230 335 | 336 | isa 337 | PBXFileReference 338 | lastKnownFileType 339 | text.plist.xml 340 | path 341 | Info.plist 342 | sourceTree 343 | <group> 344 | 345 | 189FE9C51D2F997300947230 346 | 347 | buildActionMask 348 | 2147483647 349 | files 350 | 351 | 189FE9CE1D2F997300947230 352 | 353 | isa 354 | PBXSourcesBuildPhase 355 | runOnlyForDeploymentPostprocessing 356 | 0 357 | 358 | 189FE9C61D2F997300947230 359 | 360 | buildActionMask 361 | 2147483647 362 | files 363 | 364 | isa 365 | PBXFrameworksBuildPhase 366 | runOnlyForDeploymentPostprocessing 367 | 0 368 | 369 | 189FE9C71D2F997300947230 370 | 371 | buildActionMask 372 | 2147483647 373 | files 374 | 375 | isa 376 | PBXResourcesBuildPhase 377 | runOnlyForDeploymentPostprocessing 378 | 0 379 | 380 | 189FE9C81D2F997300947230 381 | 382 | buildConfigurationList 383 | 189FE9D51D2F997300947230 384 | buildPhases 385 | 386 | 189FE9C51D2F997300947230 387 | 189FE9C61D2F997300947230 388 | 189FE9C71D2F997300947230 389 | 390 | buildRules 391 | 392 | dependencies 393 | 394 | 189FE9CB1D2F997300947230 395 | 396 | isa 397 | PBXNativeTarget 398 | name 399 | ExampleTests 400 | productName 401 | ExampleTests 402 | productReference 403 | 189FE9C91D2F997300947230 404 | productType 405 | com.apple.product-type.bundle.unit-test 406 | 407 | 189FE9C91D2F997300947230 408 | 409 | explicitFileType 410 | wrapper.cfbundle 411 | includeInIndex 412 | 0 413 | isa 414 | PBXFileReference 415 | path 416 | ExampleTests.xctest 417 | sourceTree 418 | BUILT_PRODUCTS_DIR 419 | 420 | 189FE9CA1D2F997300947230 421 | 422 | containerPortal 423 | 189FE9AD1D2F997300947230 424 | isa 425 | PBXContainerItemProxy 426 | proxyType 427 | 1 428 | remoteGlobalIDString 429 | 189FE9B41D2F997300947230 430 | remoteInfo 431 | Example 432 | 433 | 189FE9CB1D2F997300947230 434 | 435 | isa 436 | PBXTargetDependency 437 | target 438 | 189FE9B41D2F997300947230 439 | targetProxy 440 | 189FE9CA1D2F997300947230 441 | 442 | 189FE9CC1D2F997300947230 443 | 444 | children 445 | 446 | 189FE9CD1D2F997300947230 447 | 189FE9CF1D2F997300947230 448 | 449 | isa 450 | PBXGroup 451 | path 452 | ExampleTests 453 | sourceTree 454 | <group> 455 | 456 | 189FE9CD1D2F997300947230 457 | 458 | isa 459 | PBXFileReference 460 | lastKnownFileType 461 | sourcecode.swift 462 | path 463 | ExampleTests.swift 464 | sourceTree 465 | <group> 466 | 467 | 189FE9CE1D2F997300947230 468 | 469 | fileRef 470 | 189FE9CD1D2F997300947230 471 | isa 472 | PBXBuildFile 473 | 474 | 189FE9CF1D2F997300947230 475 | 476 | isa 477 | PBXFileReference 478 | lastKnownFileType 479 | text.plist.xml 480 | path 481 | Info.plist 482 | sourceTree 483 | <group> 484 | 485 | 189FE9D01D2F997300947230 486 | 487 | buildSettings 488 | 489 | ALWAYS_SEARCH_USER_PATHS 490 | NO 491 | CLANG_ANALYZER_NONNULL 492 | YES 493 | CLANG_CXX_LANGUAGE_STANDARD 494 | gnu++0x 495 | CLANG_CXX_LIBRARY 496 | libc++ 497 | CLANG_ENABLE_MODULES 498 | YES 499 | CLANG_ENABLE_OBJC_ARC 500 | YES 501 | CLANG_WARN_BOOL_CONVERSION 502 | YES 503 | CLANG_WARN_CONSTANT_CONVERSION 504 | YES 505 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 506 | YES_ERROR 507 | CLANG_WARN_EMPTY_BODY 508 | YES 509 | CLANG_WARN_ENUM_CONVERSION 510 | YES 511 | CLANG_WARN_INT_CONVERSION 512 | YES 513 | CLANG_WARN_OBJC_ROOT_CLASS 514 | YES_ERROR 515 | CLANG_WARN_UNREACHABLE_CODE 516 | YES 517 | CLANG_WARN__DUPLICATE_METHOD_MATCH 518 | YES 519 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 520 | iPhone Developer 521 | COPY_PHASE_STRIP 522 | NO 523 | DEBUG_INFORMATION_FORMAT 524 | dwarf 525 | ENABLE_STRICT_OBJC_MSGSEND 526 | YES 527 | ENABLE_TESTABILITY 528 | YES 529 | GCC_C_LANGUAGE_STANDARD 530 | gnu99 531 | GCC_DYNAMIC_NO_PIC 532 | NO 533 | GCC_NO_COMMON_BLOCKS 534 | YES 535 | GCC_OPTIMIZATION_LEVEL 536 | 0 537 | GCC_PREPROCESSOR_DEFINITIONS 538 | 539 | DEBUG=1 540 | $(inherited) 541 | 542 | GCC_WARN_64_TO_32_BIT_CONVERSION 543 | YES 544 | GCC_WARN_ABOUT_RETURN_TYPE 545 | YES_ERROR 546 | GCC_WARN_UNDECLARED_SELECTOR 547 | YES 548 | GCC_WARN_UNINITIALIZED_AUTOS 549 | YES_AGGRESSIVE 550 | GCC_WARN_UNUSED_FUNCTION 551 | YES 552 | GCC_WARN_UNUSED_VARIABLE 553 | YES 554 | IPHONEOS_DEPLOYMENT_TARGET 555 | 9.3 556 | MTL_ENABLE_DEBUG_INFO 557 | YES 558 | ONLY_ACTIVE_ARCH 559 | YES 560 | SDKROOT 561 | iphoneos 562 | SWIFT_OPTIMIZATION_LEVEL 563 | -Onone 564 | 565 | isa 566 | XCBuildConfiguration 567 | name 568 | Debug 569 | 570 | 189FE9D11D2F997300947230 571 | 572 | buildSettings 573 | 574 | ALWAYS_SEARCH_USER_PATHS 575 | NO 576 | CLANG_ANALYZER_NONNULL 577 | YES 578 | CLANG_CXX_LANGUAGE_STANDARD 579 | gnu++0x 580 | CLANG_CXX_LIBRARY 581 | libc++ 582 | CLANG_ENABLE_MODULES 583 | YES 584 | CLANG_ENABLE_OBJC_ARC 585 | YES 586 | CLANG_WARN_BOOL_CONVERSION 587 | YES 588 | CLANG_WARN_CONSTANT_CONVERSION 589 | YES 590 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 591 | YES_ERROR 592 | CLANG_WARN_EMPTY_BODY 593 | YES 594 | CLANG_WARN_ENUM_CONVERSION 595 | YES 596 | CLANG_WARN_INT_CONVERSION 597 | YES 598 | CLANG_WARN_OBJC_ROOT_CLASS 599 | YES_ERROR 600 | CLANG_WARN_UNREACHABLE_CODE 601 | YES 602 | CLANG_WARN__DUPLICATE_METHOD_MATCH 603 | YES 604 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 605 | iPhone Developer 606 | COPY_PHASE_STRIP 607 | NO 608 | DEBUG_INFORMATION_FORMAT 609 | dwarf-with-dsym 610 | ENABLE_NS_ASSERTIONS 611 | NO 612 | ENABLE_STRICT_OBJC_MSGSEND 613 | YES 614 | GCC_C_LANGUAGE_STANDARD 615 | gnu99 616 | GCC_NO_COMMON_BLOCKS 617 | YES 618 | GCC_WARN_64_TO_32_BIT_CONVERSION 619 | YES 620 | GCC_WARN_ABOUT_RETURN_TYPE 621 | YES_ERROR 622 | GCC_WARN_UNDECLARED_SELECTOR 623 | YES 624 | GCC_WARN_UNINITIALIZED_AUTOS 625 | YES_AGGRESSIVE 626 | GCC_WARN_UNUSED_FUNCTION 627 | YES 628 | GCC_WARN_UNUSED_VARIABLE 629 | YES 630 | IPHONEOS_DEPLOYMENT_TARGET 631 | 9.3 632 | MTL_ENABLE_DEBUG_INFO 633 | NO 634 | SDKROOT 635 | iphoneos 636 | VALIDATE_PRODUCT 637 | YES 638 | 639 | isa 640 | XCBuildConfiguration 641 | name 642 | Release 643 | 644 | 189FE9D21D2F997300947230 645 | 646 | buildConfigurations 647 | 648 | 189FE9D31D2F997300947230 649 | 189FE9D41D2F997300947230 650 | 651 | defaultConfigurationIsVisible 652 | 0 653 | isa 654 | XCConfigurationList 655 | 656 | 189FE9D31D2F997300947230 657 | 658 | baseConfigurationReference 659 | 8BD577743F907F5971B055C4 660 | buildSettings 661 | 662 | ASSETCATALOG_COMPILER_APPICON_NAME 663 | AppIcon 664 | INFOPLIST_FILE 665 | Example/Info.plist 666 | LD_RUNPATH_SEARCH_PATHS 667 | $(inherited) @executable_path/Frameworks 668 | PRODUCT_BUNDLE_IDENTIFIER 669 | luiyezheng.Example 670 | PRODUCT_NAME 671 | $(TARGET_NAME) 672 | 673 | isa 674 | XCBuildConfiguration 675 | name 676 | Debug 677 | 678 | 189FE9D41D2F997300947230 679 | 680 | baseConfigurationReference 681 | E333F1857AADC6F13A10F56F 682 | buildSettings 683 | 684 | ASSETCATALOG_COMPILER_APPICON_NAME 685 | AppIcon 686 | INFOPLIST_FILE 687 | Example/Info.plist 688 | LD_RUNPATH_SEARCH_PATHS 689 | $(inherited) @executable_path/Frameworks 690 | PRODUCT_BUNDLE_IDENTIFIER 691 | luiyezheng.Example 692 | PRODUCT_NAME 693 | $(TARGET_NAME) 694 | 695 | isa 696 | XCBuildConfiguration 697 | name 698 | Release 699 | 700 | 189FE9D51D2F997300947230 701 | 702 | buildConfigurations 703 | 704 | 189FE9D61D2F997300947230 705 | 189FE9D71D2F997300947230 706 | 707 | defaultConfigurationIsVisible 708 | 0 709 | isa 710 | XCConfigurationList 711 | 712 | 189FE9D61D2F997300947230 713 | 714 | buildSettings 715 | 716 | BUNDLE_LOADER 717 | $(TEST_HOST) 718 | INFOPLIST_FILE 719 | ExampleTests/Info.plist 720 | LD_RUNPATH_SEARCH_PATHS 721 | $(inherited) @executable_path/Frameworks @loader_path/Frameworks 722 | PRODUCT_BUNDLE_IDENTIFIER 723 | luiyezheng.ExampleTests 724 | PRODUCT_NAME 725 | $(TARGET_NAME) 726 | TEST_HOST 727 | $(BUILT_PRODUCTS_DIR)/Example.app/Example 728 | 729 | isa 730 | XCBuildConfiguration 731 | name 732 | Debug 733 | 734 | 189FE9D71D2F997300947230 735 | 736 | buildSettings 737 | 738 | BUNDLE_LOADER 739 | $(TEST_HOST) 740 | INFOPLIST_FILE 741 | ExampleTests/Info.plist 742 | LD_RUNPATH_SEARCH_PATHS 743 | $(inherited) @executable_path/Frameworks @loader_path/Frameworks 744 | PRODUCT_BUNDLE_IDENTIFIER 745 | luiyezheng.ExampleTests 746 | PRODUCT_NAME 747 | $(TARGET_NAME) 748 | TEST_HOST 749 | $(BUILT_PRODUCTS_DIR)/Example.app/Example 750 | 751 | isa 752 | XCBuildConfiguration 753 | name 754 | Release 755 | 756 | 283229954B087F2D976E156D 757 | 758 | buildActionMask 759 | 2147483647 760 | files 761 | 762 | inputPaths 763 | 764 | isa 765 | PBXShellScriptBuildPhase 766 | name 767 | Embed Pods Frameworks 768 | outputPaths 769 | 770 | runOnlyForDeploymentPostprocessing 771 | 0 772 | shellPath 773 | /bin/sh 774 | shellScript 775 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" 776 | 777 | showEnvVarsInLog 778 | 0 779 | 780 | 2D3FD63120DB6A7CB20621F6 781 | 782 | children 783 | 784 | 8BD577743F907F5971B055C4 785 | E333F1857AADC6F13A10F56F 786 | 787 | isa 788 | PBXGroup 789 | name 790 | Pods 791 | sourceTree 792 | <group> 793 | 794 | 37DB5C0D53B670F6F9904628 795 | 796 | children 797 | 798 | 6AE8EB6113123A38B29473F9 799 | 800 | isa 801 | PBXGroup 802 | name 803 | Frameworks 804 | sourceTree 805 | <group> 806 | 807 | 55BBC0FFE56639EF7345BB93 808 | 809 | fileRef 810 | 6AE8EB6113123A38B29473F9 811 | isa 812 | PBXBuildFile 813 | 814 | 6AE8EB6113123A38B29473F9 815 | 816 | explicitFileType 817 | wrapper.framework 818 | includeInIndex 819 | 0 820 | isa 821 | PBXFileReference 822 | path 823 | Pods.framework 824 | sourceTree 825 | BUILT_PRODUCTS_DIR 826 | 827 | 7F44BFB2B00C60EED9B6AD08 828 | 829 | buildActionMask 830 | 2147483647 831 | files 832 | 833 | inputPaths 834 | 835 | isa 836 | PBXShellScriptBuildPhase 837 | name 838 | Check Pods Manifest.lock 839 | outputPaths 840 | 841 | runOnlyForDeploymentPostprocessing 842 | 0 843 | shellPath 844 | /bin/sh 845 | shellScript 846 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 847 | if [[ $? != 0 ]] ; then 848 | cat << EOM 849 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 850 | EOM 851 | exit 1 852 | fi 853 | 854 | showEnvVarsInLog 855 | 0 856 | 857 | 8BD577743F907F5971B055C4 858 | 859 | includeInIndex 860 | 1 861 | isa 862 | PBXFileReference 863 | lastKnownFileType 864 | text.xcconfig 865 | name 866 | Pods.debug.xcconfig 867 | path 868 | Pods/Target Support Files/Pods/Pods.debug.xcconfig 869 | sourceTree 870 | <group> 871 | 872 | A0798B3914A5E09B59CC2AB6 873 | 874 | buildActionMask 875 | 2147483647 876 | files 877 | 878 | inputPaths 879 | 880 | isa 881 | PBXShellScriptBuildPhase 882 | name 883 | Copy Pods Resources 884 | outputPaths 885 | 886 | runOnlyForDeploymentPostprocessing 887 | 0 888 | shellPath 889 | /bin/sh 890 | shellScript 891 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 892 | 893 | showEnvVarsInLog 894 | 0 895 | 896 | E333F1857AADC6F13A10F56F 897 | 898 | includeInIndex 899 | 1 900 | isa 901 | PBXFileReference 902 | lastKnownFileType 903 | text.xcconfig 904 | name 905 | Pods.release.xcconfig 906 | path 907 | Pods/Target Support Files/Pods/Pods.release.xcconfig 908 | sourceTree 909 | <group> 910 | 911 | 912 | rootObject 913 | 189FE9AD1D2F997300947230 914 | 915 | 916 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Example.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 189FE9B41D2F997300947230 16 | 17 | primary 18 | 19 | 20 | 189FE9C81D2F997300947230 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Example.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/Example/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 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal" 5 | }, 6 | { 7 | "idiom" : "universal", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "idiom" : "universal", 12 | "filename" : "close-btn2.pdf", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "idiom" : "universal", 17 | "scale" : "3x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_close.imageset/close-btn2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/icon_close.imageset/close-btn2.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_home.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal" 5 | }, 6 | { 7 | "idiom" : "universal", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "idiom" : "universal", 12 | "filename" : "home-btn2-1.pdf", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "idiom" : "universal", 17 | "scale" : "3x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_home.imageset/home-btn2-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/icon_home.imageset/home-btn2-1.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_menu.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal" 5 | }, 6 | { 7 | "idiom" : "universal", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "idiom" : "universal", 12 | "filename" : "Menu-btn2.pdf", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "idiom" : "universal", 17 | "scale" : "3x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_menu.imageset/Menu-btn2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/icon_menu.imageset/Menu-btn2.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_search.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal" 5 | }, 6 | { 7 | "idiom" : "universal", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "idiom" : "universal", 12 | "filename" : "search-btn2.pdf", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "idiom" : "universal", 17 | "scale" : "3x" 18 | } 19 | ], 20 | "info" : { 21 | "version" : 1, 22 | "author" : "xcode" 23 | } 24 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/icon_search.imageset/search-btn2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/icon_search.imageset/search-btn2.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/nearby-btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "nearby-btn2.pdf", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/nearby-btn.imageset/nearby-btn2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/nearby-btn.imageset/nearby-btn2.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/notifications-btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "notifications-btn.pdf", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/notifications-btn.imageset/notifications-btn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/notifications-btn.imageset/notifications-btn.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/settings-btn.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "settings-btn.pdf", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Buttons/settings-btn.imageset/settings-btn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/Example/Example/Assets.xcassets/Buttons/settings-btn.imageset/settings-btn.pdf -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import PopCircleMenu 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet var popMenuView: PopCirCleMenuView! 15 | 16 | let items: [(icon: String, color: UIColor, text: String)] = [ 17 | ("icon_home", UIColor(red:0.19, green:0.57, blue:1, alpha:1), "home"), 18 | ("icon_search", UIColor(red:0.22, green:0.74, blue:0, alpha:1), "search"), 19 | ("notifications-btn", UIColor(red:0.96, green:0.23, blue:0.21, alpha:1), "bell"), 20 | ("settings-btn", UIColor(red:0.51, green:0.15, blue:1, alpha:1), "setting"), 21 | ("nearby-btn", UIColor(red:1, green:0.39, blue:0, alpha:1), "nearby"), 22 | ] 23 | 24 | override func viewDidLoad() { 25 | super.viewDidLoad() 26 | 27 | popMenuView.circleButton?.delegate = self 28 | //Buttons count 29 | popMenuView.circleButton?.buttonsCount = 4 30 | 31 | //Distance between buttons and the red circle 32 | popMenuView.circleButton?.distance = 105 33 | 34 | //Delay between show buttons 35 | popMenuView.circleButton?.showDelay = 0.03 36 | 37 | //Animation Duration 38 | popMenuView.circleButton?.duration = 0.8 39 | 40 | guard let button = popMenuView.circleButton else {return} 41 | button.layer.cornerRadius = button.bounds.size.width / 2.0 42 | } 43 | 44 | func circleMenu(circleMenu: CircleMenu, willDisplay button: CircleMenuButton, atIndex: Int) { 45 | //set color 46 | button.backgroundColor = UIColor.lightGrayColor() 47 | button.setImage(UIImage(imageLiteral: items[atIndex].icon), forState: .Normal) 48 | button.layer.borderWidth = 5.0 49 | button.layer.borderColor = UIColor.whiteColor().CGColor 50 | 51 | // set highlited image 52 | let highlightedImage = UIImage(imageLiteral: items[atIndex].icon).imageWithRenderingMode(.AlwaysTemplate) 53 | button.setImage(highlightedImage, forState: .Highlighted) 54 | button.tintColor = UIColor.init(colorLiteralRed: 0, green: 0, blue: 0, alpha: 0.3) 55 | 56 | //set text 57 | guard let textLabel = button.textLabel else {return} 58 | textLabel.text = items[atIndex].text 59 | 60 | } 61 | 62 | func circleMenu(circleMenu: CircleMenu, buttonWillSelected button: CircleMenuButton, atIndex: Int) { 63 | print("button!!!!! will selected: \(atIndex)") 64 | } 65 | 66 | func circleMenu(circleMenu: CircleMenu, buttonDidSelected button: CircleMenuButton, atIndex: Int) { 67 | print("button!!!!! did selected: \(atIndex)") 68 | } 69 | 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /Example/ExampleTests/ExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleTests.swift 3 | // ExampleTests 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Example 11 | 12 | class ExampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/ExampleTests/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 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | pod ‘PopCircleMenu’, :git => 'https://github.com/luiyezheng/PopCircleMenu.git' -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - PopCircleMenu (0.1) 3 | 4 | DEPENDENCIES: 5 | - PopCircleMenu (from `https://github.com/luiyezheng/PopCircleMenu.git`) 6 | 7 | EXTERNAL SOURCES: 8 | PopCircleMenu: 9 | :git: https://github.com/luiyezheng/PopCircleMenu.git 10 | 11 | CHECKOUT OPTIONS: 12 | PopCircleMenu: 13 | :commit: f954d33eeca77d20954d4600ba2c069638ede41c 14 | :git: https://github.com/luiyezheng/PopCircleMenu.git 15 | 16 | SPEC CHECKSUMS: 17 | PopCircleMenu: a70376eccd790ce3a5fa07a02fd20675a840c210 18 | 19 | COCOAPODS: 0.39.0 20 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/PopCircleMenu.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PopCircleMenu", 3 | "version": "0.1", 4 | "license": "MIT", 5 | "summary": "Pinterest like pop circle menu", 6 | "homepage": "https://github.com/luiyezheng/PopCircleMenu", 7 | "authors": { 8 | "luiyezheng": "luiyezheng@foxmail.com" 9 | }, 10 | "source": { 11 | "git": "https://github.com/luiyezheng/PopCircleMenu.git", 12 | "tag": "0.1" 13 | }, 14 | "platforms": { 15 | "ios": "8.0" 16 | }, 17 | "source_files": "Source", 18 | "requires_arc": false 19 | } 20 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - PopCircleMenu (0.1) 3 | 4 | DEPENDENCIES: 5 | - PopCircleMenu (from `https://github.com/luiyezheng/PopCircleMenu.git`) 6 | 7 | EXTERNAL SOURCES: 8 | PopCircleMenu: 9 | :git: https://github.com/luiyezheng/PopCircleMenu.git 10 | 11 | CHECKOUT OPTIONS: 12 | PopCircleMenu: 13 | :commit: f954d33eeca77d20954d4600ba2c069638ede41c 14 | :git: https://github.com/luiyezheng/PopCircleMenu.git 15 | 16 | SPEC CHECKSUMS: 17 | PopCircleMenu: a70376eccd790ce3a5fa07a02fd20675a840c210 18 | 19 | COCOAPODS: 0.39.0 20 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 0D8A758758C690803A0A2339876AB8E1 14 | 15 | buildActionMask 16 | 2147483647 17 | files 18 | 19 | 2CB03AE36EB99EB512E1820CE9108F58 20 | 21 | isa 22 | PBXFrameworksBuildPhase 23 | runOnlyForDeploymentPostprocessing 24 | 0 25 | 26 | 1DC62F0BB3077FCCA0C3301796FAA902 27 | 28 | fileRef 29 | 2BCC458FDD5F692BBB2BFC64BB5701FC 30 | isa 31 | PBXBuildFile 32 | settings 33 | 34 | ATTRIBUTES 35 | 36 | Public 37 | 38 | 39 | 40 | 2B389FAB51F6EEA43F72CA7BDC8E8E28 41 | 42 | buildSettings 43 | 44 | ALWAYS_SEARCH_USER_PATHS 45 | NO 46 | CLANG_CXX_LANGUAGE_STANDARD 47 | gnu++0x 48 | CLANG_CXX_LIBRARY 49 | libc++ 50 | CLANG_ENABLE_MODULES 51 | YES 52 | CLANG_ENABLE_OBJC_ARC 53 | YES 54 | CLANG_WARN_BOOL_CONVERSION 55 | YES 56 | CLANG_WARN_CONSTANT_CONVERSION 57 | YES 58 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 59 | YES 60 | CLANG_WARN_EMPTY_BODY 61 | YES 62 | CLANG_WARN_ENUM_CONVERSION 63 | YES 64 | CLANG_WARN_INT_CONVERSION 65 | YES 66 | CLANG_WARN_OBJC_ROOT_CLASS 67 | YES 68 | CLANG_WARN_UNREACHABLE_CODE 69 | YES 70 | CLANG_WARN__DUPLICATE_METHOD_MATCH 71 | YES 72 | COPY_PHASE_STRIP 73 | NO 74 | GCC_C_LANGUAGE_STANDARD 75 | gnu99 76 | GCC_DYNAMIC_NO_PIC 77 | NO 78 | GCC_OPTIMIZATION_LEVEL 79 | 0 80 | GCC_PREPROCESSOR_DEFINITIONS 81 | 82 | DEBUG=1 83 | $(inherited) 84 | 85 | GCC_SYMBOLS_PRIVATE_EXTERN 86 | NO 87 | GCC_WARN_64_TO_32_BIT_CONVERSION 88 | YES 89 | GCC_WARN_ABOUT_RETURN_TYPE 90 | YES 91 | GCC_WARN_UNDECLARED_SELECTOR 92 | YES 93 | GCC_WARN_UNINITIALIZED_AUTOS 94 | YES 95 | GCC_WARN_UNUSED_FUNCTION 96 | YES 97 | GCC_WARN_UNUSED_VARIABLE 98 | YES 99 | IPHONEOS_DEPLOYMENT_TARGET 100 | 9.3 101 | ONLY_ACTIVE_ARCH 102 | YES 103 | STRIP_INSTALLED_PRODUCT 104 | NO 105 | SYMROOT 106 | ${SRCROOT}/../build 107 | 108 | isa 109 | XCBuildConfiguration 110 | name 111 | Debug 112 | 113 | 2BCC458FDD5F692BBB2BFC64BB5701FC 114 | 115 | includeInIndex 116 | 1 117 | isa 118 | PBXFileReference 119 | lastKnownFileType 120 | sourcecode.c.h 121 | path 122 | Pods-umbrella.h 123 | sourceTree 124 | <group> 125 | 126 | 2CB03AE36EB99EB512E1820CE9108F58 127 | 128 | fileRef 129 | 3E4E89230EF59BC255123B67864ACF77 130 | isa 131 | PBXBuildFile 132 | 133 | 2D8E8EC45A3A1A1D94AE762CB5028504 134 | 135 | buildConfigurations 136 | 137 | 2B389FAB51F6EEA43F72CA7BDC8E8E28 138 | 5A0C6FE968931D888F00C9EC18DDF5BC 139 | 140 | defaultConfigurationIsVisible 141 | 0 142 | defaultConfigurationName 143 | Release 144 | isa 145 | XCConfigurationList 146 | 147 | 2FF1ABFAFA94F6210A59ACC77277B326 148 | 149 | includeInIndex 150 | 1 151 | isa 152 | PBXFileReference 153 | lastKnownFileType 154 | text.plist.xml 155 | path 156 | Info.plist 157 | sourceTree 158 | <group> 159 | 160 | 35C6312B85FD731A56DD7A39FBE598CD 161 | 162 | children 163 | 164 | C5CD463F0FE06C700911087A07221BE4 165 | E98171AE44F2DA9A9553CB5C2FE99A13 166 | F4DFC82053E879F23BB628424487F047 167 | C8BEECE03635B597D686E05021067C09 168 | 4FC3523176908F8B01893586124B2BF9 169 | 170 | isa 171 | PBXGroup 172 | name 173 | PopCircleMenu 174 | path 175 | PopCircleMenu 176 | sourceTree 177 | <group> 178 | 179 | 36F89DC22C713AAB1F17822A2581C113 180 | 181 | children 182 | 183 | 35C6312B85FD731A56DD7A39FBE598CD 184 | 185 | isa 186 | PBXGroup 187 | name 188 | Pods 189 | sourceTree 190 | <group> 191 | 192 | 3E4E89230EF59BC255123B67864ACF77 193 | 194 | isa 195 | PBXFileReference 196 | lastKnownFileType 197 | wrapper.framework 198 | name 199 | Foundation.framework 200 | path 201 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework 202 | sourceTree 203 | DEVELOPER_DIR 204 | 205 | 44687D18B5F6A31CBFA0FC58BEAC3CA8 206 | 207 | buildConfigurations 208 | 209 | F081829287D2F30514FE4B7E2D32BB80 210 | A0280074D4634D8D4D72B68BC837AE37 211 | 212 | defaultConfigurationIsVisible 213 | 0 214 | defaultConfigurationName 215 | Release 216 | isa 217 | XCConfigurationList 218 | 219 | 49CA90DF5C57DBE60AE3DC8C6500977F 220 | 221 | fileRef 222 | 660FEB693239E0B0AFD04B76AB452BF3 223 | isa 224 | PBXBuildFile 225 | settings 226 | 227 | ATTRIBUTES 228 | 229 | Public 230 | 231 | 232 | 233 | 4FC3523176908F8B01893586124B2BF9 234 | 235 | children 236 | 237 | 2FF1ABFAFA94F6210A59ACC77277B326 238 | 921AAAE32DEB1E73F85C18CDF43150BA 239 | 965FF1EE220E464617FC091BB33B8937 240 | 8399011918E1770A99E5AD232942F2A3 241 | BD7CD2ED23F4D651FE490AE4B6400AF2 242 | 660FEB693239E0B0AFD04B76AB452BF3 243 | 244 | isa 245 | PBXGroup 246 | name 247 | Support Files 248 | path 249 | ../Target Support Files/PopCircleMenu 250 | sourceTree 251 | <group> 252 | 253 | 520D5C231A684A6B823DB749B1328411 254 | 255 | buildActionMask 256 | 2147483647 257 | files 258 | 259 | 1DC62F0BB3077FCCA0C3301796FAA902 260 | 261 | isa 262 | PBXHeadersBuildPhase 263 | runOnlyForDeploymentPostprocessing 264 | 0 265 | 266 | 564DA18DCA48CA0A403D5CC5A7FF9590 267 | 268 | explicitFileType 269 | wrapper.framework 270 | includeInIndex 271 | 0 272 | isa 273 | PBXFileReference 274 | name 275 | PopCircleMenu.framework 276 | path 277 | PopCircleMenu.framework 278 | sourceTree 279 | BUILT_PRODUCTS_DIR 280 | 281 | 5A0C6FE968931D888F00C9EC18DDF5BC 282 | 283 | buildSettings 284 | 285 | ALWAYS_SEARCH_USER_PATHS 286 | NO 287 | CLANG_CXX_LANGUAGE_STANDARD 288 | gnu++0x 289 | CLANG_CXX_LIBRARY 290 | libc++ 291 | CLANG_ENABLE_MODULES 292 | YES 293 | CLANG_ENABLE_OBJC_ARC 294 | YES 295 | CLANG_WARN_BOOL_CONVERSION 296 | YES 297 | CLANG_WARN_CONSTANT_CONVERSION 298 | YES 299 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 300 | YES 301 | CLANG_WARN_EMPTY_BODY 302 | YES 303 | CLANG_WARN_ENUM_CONVERSION 304 | YES 305 | CLANG_WARN_INT_CONVERSION 306 | YES 307 | CLANG_WARN_OBJC_ROOT_CLASS 308 | YES 309 | CLANG_WARN_UNREACHABLE_CODE 310 | YES 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH 312 | YES 313 | COPY_PHASE_STRIP 314 | YES 315 | ENABLE_NS_ASSERTIONS 316 | NO 317 | GCC_C_LANGUAGE_STANDARD 318 | gnu99 319 | GCC_PREPROCESSOR_DEFINITIONS 320 | 321 | RELEASE=1 322 | 323 | GCC_WARN_64_TO_32_BIT_CONVERSION 324 | YES 325 | GCC_WARN_ABOUT_RETURN_TYPE 326 | YES 327 | GCC_WARN_UNDECLARED_SELECTOR 328 | YES 329 | GCC_WARN_UNINITIALIZED_AUTOS 330 | YES 331 | GCC_WARN_UNUSED_FUNCTION 332 | YES 333 | GCC_WARN_UNUSED_VARIABLE 334 | YES 335 | IPHONEOS_DEPLOYMENT_TARGET 336 | 9.3 337 | STRIP_INSTALLED_PRODUCT 338 | NO 339 | SYMROOT 340 | ${SRCROOT}/../build 341 | VALIDATE_PRODUCT 342 | YES 343 | 344 | isa 345 | XCBuildConfiguration 346 | name 347 | Release 348 | 349 | 660FEB693239E0B0AFD04B76AB452BF3 350 | 351 | includeInIndex 352 | 1 353 | isa 354 | PBXFileReference 355 | lastKnownFileType 356 | sourcecode.c.h 357 | path 358 | PopCircleMenu-umbrella.h 359 | sourceTree 360 | <group> 361 | 362 | 69C73B06C9D2F3110D3057D2F8F29E78 363 | 364 | baseConfigurationReference 365 | 965FF1EE220E464617FC091BB33B8937 366 | buildSettings 367 | 368 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 369 | iPhone Developer 370 | CURRENT_PROJECT_VERSION 371 | 1 372 | DEFINES_MODULE 373 | YES 374 | DYLIB_COMPATIBILITY_VERSION 375 | 1 376 | DYLIB_CURRENT_VERSION 377 | 1 378 | DYLIB_INSTALL_NAME_BASE 379 | @rpath 380 | ENABLE_STRICT_OBJC_MSGSEND 381 | YES 382 | GCC_PREFIX_HEADER 383 | Target Support Files/PopCircleMenu/PopCircleMenu-prefix.pch 384 | INFOPLIST_FILE 385 | Target Support Files/PopCircleMenu/Info.plist 386 | INSTALL_PATH 387 | $(LOCAL_LIBRARY_DIR)/Frameworks 388 | IPHONEOS_DEPLOYMENT_TARGET 389 | 9.3 390 | LD_RUNPATH_SEARCH_PATHS 391 | 392 | $(inherited) 393 | @executable_path/Frameworks 394 | @loader_path/Frameworks 395 | 396 | MODULEMAP_FILE 397 | Target Support Files/PopCircleMenu/PopCircleMenu.modulemap 398 | MTL_ENABLE_DEBUG_INFO 399 | NO 400 | PRODUCT_NAME 401 | PopCircleMenu 402 | SDKROOT 403 | iphoneos 404 | SKIP_INSTALL 405 | YES 406 | TARGETED_DEVICE_FAMILY 407 | 1,2 408 | VERSIONING_SYSTEM 409 | apple-generic 410 | VERSION_INFO_PREFIX 411 | 412 | 413 | isa 414 | XCBuildConfiguration 415 | name 416 | Release 417 | 418 | 6C5C7DE072C62D025FD03FC44F41B70E 419 | 420 | fileRef 421 | 8399011918E1770A99E5AD232942F2A3 422 | isa 423 | PBXBuildFile 424 | 425 | 75D98FF52E597A11900E131B6C4E1ADA 426 | 427 | children 428 | 429 | E8446514FBAD26C0E18F24A5715AEF67 430 | 79A9DEDC89FE8336BF5FEDAAF75BF7FC 431 | D0405803033A2A777B8E4DFA0C1800ED 432 | 87B213035BAC5F75386F62D3C75D2342 433 | 894E5DA93A9F359521A89826BE6DA777 434 | E7F21354943D9F42A70697D5A5EF72E9 435 | CBC0F7C552B739C909B650A0F42F7F38 436 | 2BCC458FDD5F692BBB2BFC64BB5701FC 437 | 977577C045EDA9D9D1F46E2598D19FC7 438 | DA312349A49333542E6F4B36B329960E 439 | 440 | isa 441 | PBXGroup 442 | name 443 | Pods 444 | path 445 | Target Support Files/Pods 446 | sourceTree 447 | <group> 448 | 449 | 79A9DEDC89FE8336BF5FEDAAF75BF7FC 450 | 451 | includeInIndex 452 | 1 453 | isa 454 | PBXFileReference 455 | path 456 | Pods.modulemap 457 | sourceTree 458 | <group> 459 | 460 | 7DB346D0F39D3F0E887471402A8071AB 461 | 462 | children 463 | 464 | BA6428E9F66FD5A23C0A2E06ED26CD2F 465 | BC3CA7F9E30CC8F7E2DD044DD34432FC 466 | 36F89DC22C713AAB1F17822A2581C113 467 | 89B5AE6D3909F2F42B03B131B855CBEA 468 | B7B80995527643776607AFFA75B91E24 469 | 470 | isa 471 | PBXGroup 472 | sourceTree 473 | <group> 474 | 475 | 80E8EC2753EF0F44E0DA1B48B8C50852 476 | 477 | buildConfigurationList 478 | 44687D18B5F6A31CBFA0FC58BEAC3CA8 479 | buildPhases 480 | 481 | EC43A550E2FEA6E7267F9B3CF337E569 482 | DB0EF24E827966FB67E4F72B2DC3294A 483 | 520D5C231A684A6B823DB749B1328411 484 | 485 | buildRules 486 | 487 | dependencies 488 | 489 | FFFFE202EF9FBE3C03E340099BE15005 490 | 491 | isa 492 | PBXNativeTarget 493 | name 494 | Pods 495 | productName 496 | Pods 497 | productReference 498 | 93EA5253F6FA52467663E30F1D0D81E9 499 | productType 500 | com.apple.product-type.framework 501 | 502 | 8399011918E1770A99E5AD232942F2A3 503 | 504 | includeInIndex 505 | 1 506 | isa 507 | PBXFileReference 508 | lastKnownFileType 509 | sourcecode.c.objc 510 | path 511 | PopCircleMenu-dummy.m 512 | sourceTree 513 | <group> 514 | 515 | 87B213035BAC5F75386F62D3C75D2342 516 | 517 | includeInIndex 518 | 1 519 | isa 520 | PBXFileReference 521 | lastKnownFileType 522 | text.plist.xml 523 | path 524 | Pods-acknowledgements.plist 525 | sourceTree 526 | <group> 527 | 528 | 894E5DA93A9F359521A89826BE6DA777 529 | 530 | includeInIndex 531 | 1 532 | isa 533 | PBXFileReference 534 | lastKnownFileType 535 | sourcecode.c.objc 536 | path 537 | Pods-dummy.m 538 | sourceTree 539 | <group> 540 | 541 | 89B5AE6D3909F2F42B03B131B855CBEA 542 | 543 | children 544 | 545 | 93EA5253F6FA52467663E30F1D0D81E9 546 | 564DA18DCA48CA0A403D5CC5A7FF9590 547 | 548 | isa 549 | PBXGroup 550 | name 551 | Products 552 | sourceTree 553 | <group> 554 | 555 | 8BE9C92244E0B24965049952439D86BA 556 | 557 | buildActionMask 558 | 2147483647 559 | files 560 | 561 | 49CA90DF5C57DBE60AE3DC8C6500977F 562 | 563 | isa 564 | PBXHeadersBuildPhase 565 | runOnlyForDeploymentPostprocessing 566 | 0 567 | 568 | 8EE2E6701CD3339D9521EEAEB2A96C2E 569 | 570 | fileRef 571 | C5CD463F0FE06C700911087A07221BE4 572 | isa 573 | PBXBuildFile 574 | settings 575 | 576 | COMPILER_FLAGS 577 | -fno-objc-arc 578 | 579 | 580 | 921AAAE32DEB1E73F85C18CDF43150BA 581 | 582 | includeInIndex 583 | 1 584 | isa 585 | PBXFileReference 586 | path 587 | PopCircleMenu.modulemap 588 | sourceTree 589 | <group> 590 | 591 | 93EA5253F6FA52467663E30F1D0D81E9 592 | 593 | explicitFileType 594 | wrapper.framework 595 | includeInIndex 596 | 0 597 | isa 598 | PBXFileReference 599 | name 600 | Pods.framework 601 | path 602 | Pods.framework 603 | sourceTree 604 | BUILT_PRODUCTS_DIR 605 | 606 | 965FF1EE220E464617FC091BB33B8937 607 | 608 | includeInIndex 609 | 1 610 | isa 611 | PBXFileReference 612 | lastKnownFileType 613 | text.xcconfig 614 | path 615 | PopCircleMenu.xcconfig 616 | sourceTree 617 | <group> 618 | 619 | 977577C045EDA9D9D1F46E2598D19FC7 620 | 621 | includeInIndex 622 | 1 623 | isa 624 | PBXFileReference 625 | lastKnownFileType 626 | text.xcconfig 627 | path 628 | Pods.debug.xcconfig 629 | sourceTree 630 | <group> 631 | 632 | 9D8EE42336859851FF49B84EA7B8D99D 633 | 634 | containerPortal 635 | D41D8CD98F00B204E9800998ECF8427E 636 | isa 637 | PBXContainerItemProxy 638 | proxyType 639 | 1 640 | remoteGlobalIDString 641 | E7B4BBBC3F96048848BA486BF1E421DA 642 | remoteInfo 643 | PopCircleMenu 644 | 645 | 9EE4E2A953AE1EEB58740955099E14C0 646 | 647 | fileRef 648 | F4DFC82053E879F23BB628424487F047 649 | isa 650 | PBXBuildFile 651 | settings 652 | 653 | COMPILER_FLAGS 654 | -fno-objc-arc 655 | 656 | 657 | A0280074D4634D8D4D72B68BC837AE37 658 | 659 | baseConfigurationReference 660 | DA312349A49333542E6F4B36B329960E 661 | buildSettings 662 | 663 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 664 | iPhone Developer 665 | CURRENT_PROJECT_VERSION 666 | 1 667 | DEFINES_MODULE 668 | YES 669 | DYLIB_COMPATIBILITY_VERSION 670 | 1 671 | DYLIB_CURRENT_VERSION 672 | 1 673 | DYLIB_INSTALL_NAME_BASE 674 | @rpath 675 | ENABLE_STRICT_OBJC_MSGSEND 676 | YES 677 | INFOPLIST_FILE 678 | Target Support Files/Pods/Info.plist 679 | INSTALL_PATH 680 | $(LOCAL_LIBRARY_DIR)/Frameworks 681 | IPHONEOS_DEPLOYMENT_TARGET 682 | 9.3 683 | LD_RUNPATH_SEARCH_PATHS 684 | 685 | $(inherited) 686 | @executable_path/Frameworks 687 | @loader_path/Frameworks 688 | 689 | MACH_O_TYPE 690 | staticlib 691 | MODULEMAP_FILE 692 | Target Support Files/Pods/Pods.modulemap 693 | MTL_ENABLE_DEBUG_INFO 694 | NO 695 | OTHER_LDFLAGS 696 | 697 | OTHER_LIBTOOLFLAGS 698 | 699 | PODS_ROOT 700 | $(SRCROOT) 701 | PRODUCT_NAME 702 | Pods 703 | SDKROOT 704 | iphoneos 705 | SKIP_INSTALL 706 | YES 707 | TARGETED_DEVICE_FAMILY 708 | 1,2 709 | VERSIONING_SYSTEM 710 | apple-generic 711 | VERSION_INFO_PREFIX 712 | 713 | 714 | isa 715 | XCBuildConfiguration 716 | name 717 | Release 718 | 719 | B3914CE32781C127FC648D8F2D49B3D8 720 | 721 | buildActionMask 722 | 2147483647 723 | files 724 | 725 | 8EE2E6701CD3339D9521EEAEB2A96C2E 726 | CCBA8D4DE3D09C8F55A44671F280BE5F 727 | 6C5C7DE072C62D025FD03FC44F41B70E 728 | 9EE4E2A953AE1EEB58740955099E14C0 729 | FDBB453B41914712D4CA53805FF2E3BD 730 | 731 | isa 732 | PBXSourcesBuildPhase 733 | runOnlyForDeploymentPostprocessing 734 | 0 735 | 736 | B7B80995527643776607AFFA75B91E24 737 | 738 | children 739 | 740 | 75D98FF52E597A11900E131B6C4E1ADA 741 | 742 | isa 743 | PBXGroup 744 | name 745 | Targets Support Files 746 | sourceTree 747 | <group> 748 | 749 | BA6428E9F66FD5A23C0A2E06ED26CD2F 750 | 751 | includeInIndex 752 | 1 753 | isa 754 | PBXFileReference 755 | lastKnownFileType 756 | text 757 | name 758 | Podfile 759 | path 760 | ../Podfile 761 | sourceTree 762 | SOURCE_ROOT 763 | xcLanguageSpecificationIdentifier 764 | xcode.lang.ruby 765 | 766 | BC3CA7F9E30CC8F7E2DD044DD34432FC 767 | 768 | children 769 | 770 | BF6342C8B29F4CEEA088EFF7AB4DE362 771 | 772 | isa 773 | PBXGroup 774 | name 775 | Frameworks 776 | sourceTree 777 | <group> 778 | 779 | BD7CD2ED23F4D651FE490AE4B6400AF2 780 | 781 | includeInIndex 782 | 1 783 | isa 784 | PBXFileReference 785 | lastKnownFileType 786 | sourcecode.c.h 787 | path 788 | PopCircleMenu-prefix.pch 789 | sourceTree 790 | <group> 791 | 792 | BF6342C8B29F4CEEA088EFF7AB4DE362 793 | 794 | children 795 | 796 | 3E4E89230EF59BC255123B67864ACF77 797 | 798 | isa 799 | PBXGroup 800 | name 801 | iOS 802 | sourceTree 803 | <group> 804 | 805 | C5BE976532C716C398EF9A37215A4A5C 806 | 807 | fileRef 808 | 3E4E89230EF59BC255123B67864ACF77 809 | isa 810 | PBXBuildFile 811 | 812 | C5CD463F0FE06C700911087A07221BE4 813 | 814 | includeInIndex 815 | 1 816 | isa 817 | PBXFileReference 818 | lastKnownFileType 819 | sourcecode.swift 820 | name 821 | CircleMenu.swift 822 | path 823 | Source/CircleMenu.swift 824 | sourceTree 825 | <group> 826 | 827 | C8BEECE03635B597D686E05021067C09 828 | 829 | includeInIndex 830 | 1 831 | isa 832 | PBXFileReference 833 | lastKnownFileType 834 | sourcecode.swift 835 | name 836 | Utility.swift 837 | path 838 | Source/Utility.swift 839 | sourceTree 840 | <group> 841 | 842 | CBC0F7C552B739C909B650A0F42F7F38 843 | 844 | includeInIndex 845 | 1 846 | isa 847 | PBXFileReference 848 | lastKnownFileType 849 | text.script.sh 850 | path 851 | Pods-resources.sh 852 | sourceTree 853 | <group> 854 | 855 | CCBA8D4DE3D09C8F55A44671F280BE5F 856 | 857 | fileRef 858 | E98171AE44F2DA9A9553CB5C2FE99A13 859 | isa 860 | PBXBuildFile 861 | settings 862 | 863 | COMPILER_FLAGS 864 | -fno-objc-arc 865 | 866 | 867 | D0405803033A2A777B8E4DFA0C1800ED 868 | 869 | includeInIndex 870 | 1 871 | isa 872 | PBXFileReference 873 | lastKnownFileType 874 | text 875 | path 876 | Pods-acknowledgements.markdown 877 | sourceTree 878 | <group> 879 | 880 | D0B91A6A4D8EC6CA60AFCEC11569E6B6 881 | 882 | buildConfigurations 883 | 884 | E2F7330DEA7E37C9F13C230070C52F7C 885 | 69C73B06C9D2F3110D3057D2F8F29E78 886 | 887 | defaultConfigurationIsVisible 888 | 0 889 | defaultConfigurationName 890 | Release 891 | isa 892 | XCConfigurationList 893 | 894 | D41D8CD98F00B204E9800998ECF8427E 895 | 896 | attributes 897 | 898 | LastSwiftUpdateCheck 899 | 0700 900 | LastUpgradeCheck 901 | 0700 902 | 903 | buildConfigurationList 904 | 2D8E8EC45A3A1A1D94AE762CB5028504 905 | compatibilityVersion 906 | Xcode 3.2 907 | developmentRegion 908 | English 909 | hasScannedForEncodings 910 | 0 911 | isa 912 | PBXProject 913 | knownRegions 914 | 915 | en 916 | 917 | mainGroup 918 | 7DB346D0F39D3F0E887471402A8071AB 919 | productRefGroup 920 | 89B5AE6D3909F2F42B03B131B855CBEA 921 | projectDirPath 922 | 923 | projectReferences 924 | 925 | projectRoot 926 | 927 | targets 928 | 929 | 80E8EC2753EF0F44E0DA1B48B8C50852 930 | E7B4BBBC3F96048848BA486BF1E421DA 931 | 932 | 933 | DA312349A49333542E6F4B36B329960E 934 | 935 | includeInIndex 936 | 1 937 | isa 938 | PBXFileReference 939 | lastKnownFileType 940 | text.xcconfig 941 | path 942 | Pods.release.xcconfig 943 | sourceTree 944 | <group> 945 | 946 | DB0EF24E827966FB67E4F72B2DC3294A 947 | 948 | buildActionMask 949 | 2147483647 950 | files 951 | 952 | C5BE976532C716C398EF9A37215A4A5C 953 | 954 | isa 955 | PBXFrameworksBuildPhase 956 | runOnlyForDeploymentPostprocessing 957 | 0 958 | 959 | E2F7330DEA7E37C9F13C230070C52F7C 960 | 961 | baseConfigurationReference 962 | 965FF1EE220E464617FC091BB33B8937 963 | buildSettings 964 | 965 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 966 | iPhone Developer 967 | CURRENT_PROJECT_VERSION 968 | 1 969 | DEFINES_MODULE 970 | YES 971 | DYLIB_COMPATIBILITY_VERSION 972 | 1 973 | DYLIB_CURRENT_VERSION 974 | 1 975 | DYLIB_INSTALL_NAME_BASE 976 | @rpath 977 | ENABLE_STRICT_OBJC_MSGSEND 978 | YES 979 | GCC_PREFIX_HEADER 980 | Target Support Files/PopCircleMenu/PopCircleMenu-prefix.pch 981 | INFOPLIST_FILE 982 | Target Support Files/PopCircleMenu/Info.plist 983 | INSTALL_PATH 984 | $(LOCAL_LIBRARY_DIR)/Frameworks 985 | IPHONEOS_DEPLOYMENT_TARGET 986 | 9.3 987 | LD_RUNPATH_SEARCH_PATHS 988 | 989 | $(inherited) 990 | @executable_path/Frameworks 991 | @loader_path/Frameworks 992 | 993 | MODULEMAP_FILE 994 | Target Support Files/PopCircleMenu/PopCircleMenu.modulemap 995 | MTL_ENABLE_DEBUG_INFO 996 | YES 997 | PRODUCT_NAME 998 | PopCircleMenu 999 | SDKROOT 1000 | iphoneos 1001 | SKIP_INSTALL 1002 | YES 1003 | SWIFT_OPTIMIZATION_LEVEL 1004 | -Onone 1005 | TARGETED_DEVICE_FAMILY 1006 | 1,2 1007 | VERSIONING_SYSTEM 1008 | apple-generic 1009 | VERSION_INFO_PREFIX 1010 | 1011 | 1012 | isa 1013 | XCBuildConfiguration 1014 | name 1015 | Debug 1016 | 1017 | E761292A3FB4C9496ED88103CA999405 1018 | 1019 | fileRef 1020 | 894E5DA93A9F359521A89826BE6DA777 1021 | isa 1022 | PBXBuildFile 1023 | 1024 | E7B4BBBC3F96048848BA486BF1E421DA 1025 | 1026 | buildConfigurationList 1027 | D0B91A6A4D8EC6CA60AFCEC11569E6B6 1028 | buildPhases 1029 | 1030 | B3914CE32781C127FC648D8F2D49B3D8 1031 | 0D8A758758C690803A0A2339876AB8E1 1032 | 8BE9C92244E0B24965049952439D86BA 1033 | 1034 | buildRules 1035 | 1036 | dependencies 1037 | 1038 | isa 1039 | PBXNativeTarget 1040 | name 1041 | PopCircleMenu 1042 | productName 1043 | PopCircleMenu 1044 | productReference 1045 | 564DA18DCA48CA0A403D5CC5A7FF9590 1046 | productType 1047 | com.apple.product-type.framework 1048 | 1049 | E7F21354943D9F42A70697D5A5EF72E9 1050 | 1051 | includeInIndex 1052 | 1 1053 | isa 1054 | PBXFileReference 1055 | lastKnownFileType 1056 | text.script.sh 1057 | path 1058 | Pods-frameworks.sh 1059 | sourceTree 1060 | <group> 1061 | 1062 | E8446514FBAD26C0E18F24A5715AEF67 1063 | 1064 | includeInIndex 1065 | 1 1066 | isa 1067 | PBXFileReference 1068 | lastKnownFileType 1069 | text.plist.xml 1070 | path 1071 | Info.plist 1072 | sourceTree 1073 | <group> 1074 | 1075 | E98171AE44F2DA9A9553CB5C2FE99A13 1076 | 1077 | includeInIndex 1078 | 1 1079 | isa 1080 | PBXFileReference 1081 | lastKnownFileType 1082 | sourcecode.swift 1083 | name 1084 | CircleMenuButton.swift 1085 | path 1086 | Source/CircleMenuButton.swift 1087 | sourceTree 1088 | <group> 1089 | 1090 | EC43A550E2FEA6E7267F9B3CF337E569 1091 | 1092 | buildActionMask 1093 | 2147483647 1094 | files 1095 | 1096 | E761292A3FB4C9496ED88103CA999405 1097 | 1098 | isa 1099 | PBXSourcesBuildPhase 1100 | runOnlyForDeploymentPostprocessing 1101 | 0 1102 | 1103 | F081829287D2F30514FE4B7E2D32BB80 1104 | 1105 | baseConfigurationReference 1106 | 977577C045EDA9D9D1F46E2598D19FC7 1107 | buildSettings 1108 | 1109 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 1110 | iPhone Developer 1111 | CURRENT_PROJECT_VERSION 1112 | 1 1113 | DEFINES_MODULE 1114 | YES 1115 | DYLIB_COMPATIBILITY_VERSION 1116 | 1 1117 | DYLIB_CURRENT_VERSION 1118 | 1 1119 | DYLIB_INSTALL_NAME_BASE 1120 | @rpath 1121 | ENABLE_STRICT_OBJC_MSGSEND 1122 | YES 1123 | INFOPLIST_FILE 1124 | Target Support Files/Pods/Info.plist 1125 | INSTALL_PATH 1126 | $(LOCAL_LIBRARY_DIR)/Frameworks 1127 | IPHONEOS_DEPLOYMENT_TARGET 1128 | 9.3 1129 | LD_RUNPATH_SEARCH_PATHS 1130 | 1131 | $(inherited) 1132 | @executable_path/Frameworks 1133 | @loader_path/Frameworks 1134 | 1135 | MACH_O_TYPE 1136 | staticlib 1137 | MODULEMAP_FILE 1138 | Target Support Files/Pods/Pods.modulemap 1139 | MTL_ENABLE_DEBUG_INFO 1140 | YES 1141 | OTHER_LDFLAGS 1142 | 1143 | OTHER_LIBTOOLFLAGS 1144 | 1145 | PODS_ROOT 1146 | $(SRCROOT) 1147 | PRODUCT_NAME 1148 | Pods 1149 | SDKROOT 1150 | iphoneos 1151 | SKIP_INSTALL 1152 | YES 1153 | SWIFT_OPTIMIZATION_LEVEL 1154 | -Onone 1155 | TARGETED_DEVICE_FAMILY 1156 | 1,2 1157 | VERSIONING_SYSTEM 1158 | apple-generic 1159 | VERSION_INFO_PREFIX 1160 | 1161 | 1162 | isa 1163 | XCBuildConfiguration 1164 | name 1165 | Debug 1166 | 1167 | F4DFC82053E879F23BB628424487F047 1168 | 1169 | includeInIndex 1170 | 1 1171 | isa 1172 | PBXFileReference 1173 | lastKnownFileType 1174 | sourcecode.swift 1175 | name 1176 | PopCirCleMenuView.swift 1177 | path 1178 | Source/PopCirCleMenuView.swift 1179 | sourceTree 1180 | <group> 1181 | 1182 | FDBB453B41914712D4CA53805FF2E3BD 1183 | 1184 | fileRef 1185 | C8BEECE03635B597D686E05021067C09 1186 | isa 1187 | PBXBuildFile 1188 | settings 1189 | 1190 | COMPILER_FLAGS 1191 | -fno-objc-arc 1192 | 1193 | 1194 | FFFFE202EF9FBE3C03E340099BE15005 1195 | 1196 | isa 1197 | PBXTargetDependency 1198 | name 1199 | PopCircleMenu 1200 | target 1201 | E7B4BBBC3F96048848BA486BF1E421DA 1202 | targetProxy 1203 | 9D8EE42336859851FF49B84EA7B8D99D 1204 | 1205 | 1206 | rootObject 1207 | D41D8CD98F00B204E9800998ECF8427E 1208 | 1209 | 1210 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/PopCircleMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods.xcscheme 8 | 9 | isShown 10 | 11 | 12 | PopCircleMenu.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 80E8EC2753EF0F44E0DA1B48B8C50852 21 | 22 | primary 23 | 24 | 25 | E7B4BBBC3F96048848BA486BF1E421DA 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Example/Pods/PopCircleMenu/README.md: -------------------------------------------------------------------------------- 1 | # PopCircleMenu 2 | Pinterest like pop circle Menu 3 | 4 | 5 | 6 | 7 | ##Features 8 | * Adaptive direction 9 | * You can add a text above buttons 10 | * Customize the appearance 11 | * Written in Swift 12 | 13 | 14 | -------------------------------------------------------------------------------- /Example/Pods/PopCircleMenu/Source/CircleMenu.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenu1.swift 3 | // PopCircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | 10 | import UIKit 11 | 12 | // MARK: helpers 13 | 14 | @warn_unused_result 15 | func Init(value: Type, @noescape block: (object: Type) -> Void) -> Type { 16 | block(object: value) 17 | return value 18 | } 19 | 20 | // MARK: Protocol 21 | 22 | /** 23 | * CircleMenuDelegate 24 | */ 25 | @objc public protocol CircleMenuDelegate { 26 | 27 | /** 28 | Tells the delegate the circle menu is about to draw a button for a particular index. 29 | 30 | - parameter circleMenu: The circle menu object informing the delegate of this impending event. 31 | - parameter button: A circle menu button object that circle menu is going to use when drawing the row. Don't change button.tag 32 | - parameter atIndex: An button index. 33 | */ 34 | optional func circleMenu(circleMenu: CircleMenu, willDisplay button: CircleMenuButton, atIndex: Int) 35 | 36 | /** 37 | Tells the delegate that a specified index is about to be selected. 38 | 39 | - parameter circleMenu: A circle menu object informing the delegate about the impending selection. 40 | - parameter button: A selected circle menu button. Don't change button.tag 41 | - parameter atIndex: Selected button index 42 | */ 43 | optional func circleMenu(circleMenu: CircleMenu, buttonWillSelected button: CircleMenuButton, atIndex: Int) 44 | 45 | /** 46 | Tells the delegate that the specified index is now selected. 47 | 48 | - parameter circleMenu: A circle menu object informing the delegate about the new index selection. 49 | - parameter button: A selected circle menu button. Don't change button.tag 50 | - parameter atIndex: Selected button index 51 | */ 52 | optional func circleMenu(circleMenu: CircleMenu, buttonDidSelected button: CircleMenuButton, atIndex: Int) 53 | } 54 | 55 | // MARK: CircleMenu 56 | 57 | /// A Button object with pop ups buttons 58 | public class CircleMenu: UIButton { 59 | 60 | // MARK: properties 61 | 62 | /// Buttons count 63 | public var buttonsCount: Int = 3 64 | /// Circle animation duration 65 | public var duration: Double = 2 66 | /// Distance between center button and buttons 67 | public var distance: Float = 100 68 | /// Delay between show buttons 69 | public var showDelay: Double = 0.0 70 | /// Highlighted border Color 71 | public var highlightedBorderColor: UIColor = UIColor.color(255, green: 22, blue: 93, alpha: 1.0) 72 | /// Normal border Color 73 | public var normalBorderColor: UIColor = UIColor.whiteColor() 74 | 75 | /// The object that acts as the delegate of the circle menu. 76 | @IBOutlet weak public var delegate: AnyObject? //CircleMenuDelegate? 77 | 78 | var buttons: [CircleMenuButton]? 79 | 80 | // MARK: life cycle 81 | 82 | /** 83 | Initializes and returns a circle menu object. 84 | 85 | - parameter frame: A rectangle specifying the initial location and size of the circle menu in its superview’€™s coordinates. 86 | - parameter normalIcon: The image to use for the specified normal state. 87 | - parameter selectedIcon: The image to use for the specified selected state. 88 | - parameter buttonsCount: The number of buttons. 89 | - parameter duration: The duration, in seconds, of the animation. 90 | - parameter distance: Distance between center button and sub buttons. 91 | 92 | - returns: A newly created circle menu. 93 | */ 94 | public init(frame: CGRect, buttonsCount: Int = 3, duration: Double = 2, 95 | distance: Float = 100) { 96 | super.init(frame: frame) 97 | 98 | self.buttonsCount = buttonsCount 99 | self.duration = duration 100 | self.distance = distance 101 | 102 | commonInit() 103 | } 104 | 105 | required public init?(coder aDecoder: NSCoder) { 106 | super.init(coder: aDecoder) 107 | 108 | commonInit() 109 | } 110 | 111 | private func commonInit() { 112 | translatesAutoresizingMaskIntoConstraints = true 113 | layer.borderColor = highlightedBorderColor.colorWithAlphaComponent(0.5).CGColor 114 | 115 | setImage(UIImage(), forState: .Normal) 116 | setImage(UIImage(), forState: .Selected) 117 | } 118 | 119 | // MARK: methods 120 | 121 | /** 122 | Hide button 123 | 124 | - parameter duration: The duration, in seconds, of the animation. 125 | - parameter hideDelay: The time to delay, in seconds. 126 | */ 127 | public func hideButtons(duration: Double, hideDelay: Double = 0) { 128 | if buttons == nil { 129 | return 130 | } 131 | 132 | buttonsAnimationIsShow(isShow: false, duration: duration, hideDelay: hideDelay) 133 | 134 | tapBounceAnimation() 135 | tapRotatedAnimation(0.3, isSelected: false) 136 | } 137 | 138 | /** 139 | Check is sub buttons showed 140 | */ 141 | public func buttonsIsShown() -> Bool { 142 | guard let buttons = self.buttons else { 143 | return false 144 | } 145 | 146 | for button in buttons { 147 | if button.alpha == 0 { 148 | return false 149 | } 150 | } 151 | return true 152 | } 153 | 154 | // MARK: create 155 | 156 | private func createButtons() -> [CircleMenuButton] { 157 | var buttons = [CircleMenuButton]() 158 | 159 | let step: Float = 360.0 / Float(self.buttonsCount) 160 | for index in 0.. Void in 251 | self.transform = CGAffineTransformMakeScale(1, 1) 252 | }, 253 | completion: nil) 254 | } 255 | 256 | private func tapRotatedAnimation(duration: Float, isSelected: Bool) { 257 | 258 | selected = isSelected 259 | self.alpha = 1.0 260 | } 261 | 262 | internal func hideCenterButton(duration duration: Double, delay: Double = 0) { 263 | UIView.animateWithDuration( NSTimeInterval(duration), delay: NSTimeInterval(delay), 264 | options: UIViewAnimationOptions.CurveEaseOut, 265 | animations: { () -> Void in 266 | self.transform = CGAffineTransformMakeScale(0.001, 0.001) 267 | }, completion: nil) 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /Example/Pods/PopCircleMenu/Source/CircleMenuButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenuButton.swift 3 | // PopCircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class CircleMenuButton: UIButton { 12 | 13 | // MARK: properties 14 | 15 | internal weak var circleMenu: CircleMenu? 16 | 17 | internal weak var container: UIView? 18 | 19 | private var rotateTransform: CATransform3D? 20 | 21 | internal var newAngle: Float = 0.0 22 | 23 | internal var view = UIView() 24 | 25 | public weak var textLabel: UITextField? 26 | 27 | // MARK: life cycle 28 | 29 | init(size: CGSize, circleMenu: CircleMenu, distance: Float, angle: Float = 0, index: Int) { 30 | super.init(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 31 | 32 | self.circleMenu = circleMenu 33 | 34 | self.backgroundColor = UIColor(colorLiteralRed: 0.79, green: 0.24, blue: 0.27, alpha: 1) 35 | self.layer.cornerRadius = size.height / 2.0 36 | 37 | let aContainer = createContainer(CGSize(width: size.width, height:CGFloat(distance)), circleMenu: circleMenu) 38 | 39 | // hack view for rotate 40 | view = UIView(frame: CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.height)) 41 | view.backgroundColor = UIColor.clearColor() 42 | view.addSubview(self) 43 | 44 | //Create textLabel 45 | textLabel = UITextField(frame: CGRect(x: 0.0, y: 0.0, width: self.bounds.width, height: self.bounds.height)) 46 | guard let textLabel = textLabel else {return} 47 | 48 | textLabel.font = UIFont(name: "Helvetica-Bold", size: 12) 49 | textLabel.hidden = true 50 | textLabel.textColor = UIColor.whiteColor() 51 | textLabel.textAlignment = .Center 52 | textLabel.adjustsFontSizeToFitWidth = true 53 | textLabel.backgroundColor = UIColor.clearColor() 54 | textLabel.userInteractionEnabled = false 55 | textLabel.contentVerticalAlignment = .Top 56 | 57 | aContainer.addSubview(view) 58 | aContainer.addSubview(textLabel) 59 | 60 | //... 61 | container = aContainer 62 | 63 | self.rotatedZ(angle: angle, animated: false, distance: distance) 64 | } 65 | 66 | required public init?(coder aDecoder: NSCoder) { 67 | fatalError("init(coder:) has not been implemented") 68 | } 69 | 70 | // MARK: configure 71 | 72 | private func createContainer(size: CGSize, circleMenu: CircleMenu) -> UIView { 73 | 74 | guard let circleMenuSuperView = circleMenu.superview else { 75 | fatalError("wront circle menu") 76 | } 77 | 78 | let container = Init(UIView(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: size))) { 79 | $0.backgroundColor = UIColor.clearColor() 80 | $0.translatesAutoresizingMaskIntoConstraints = false 81 | $0.layer.anchorPoint = CGPoint(x: 0.5, y: 1) 82 | } 83 | circleMenuSuperView.insertSubview(container, belowSubview: circleMenu) 84 | 85 | // added constraints 86 | let height = NSLayoutConstraint(item: container, 87 | attribute: .Height, 88 | relatedBy: .Equal, 89 | toItem: nil, 90 | attribute: .Height, 91 | multiplier: 1, 92 | constant: size.height) 93 | height.identifier = "height" 94 | container.addConstraint(height) 95 | 96 | container.addConstraint(NSLayoutConstraint(item: container, 97 | attribute: .Width, 98 | relatedBy: .Equal, 99 | toItem: nil, 100 | attribute: .Width, 101 | multiplier: 1, 102 | constant: size.width)) 103 | 104 | circleMenuSuperView.addConstraint(NSLayoutConstraint(item: circleMenu, 105 | attribute: .CenterX, 106 | relatedBy: .Equal, 107 | toItem: container, 108 | attribute: .CenterX, 109 | multiplier: 1, 110 | constant:0)) 111 | 112 | circleMenuSuperView.addConstraint(NSLayoutConstraint(item: circleMenu, 113 | attribute: .CenterY, 114 | relatedBy: .Equal, 115 | toItem: container, 116 | attribute: .CenterY, 117 | multiplier: 1, 118 | constant:0)) 119 | 120 | return container 121 | } 122 | 123 | // MARK: methods 124 | 125 | internal func rotatedZ(angle angle: Float, animated: Bool, duration: Double = 0, delay: Double = 0, distance: Float) { 126 | guard let container = self.container else { 127 | fatalError("contaner don't create") 128 | } 129 | 130 | guard let superViewWidth = (circleMenu!.superview?.bounds.width) else {return} 131 | guard let superViewX = circleMenu!.superview?.bounds.maxX else {return} 132 | let circleMenuY = circleMenu!.center.y 133 | let circleMenuX = circleMenu!.center.x 134 | let distanceX = circleMenu!.center.distanceTo(CGPoint(x: superViewX, y: circleMenuY)) 135 | let distanceY = circleMenu!.center.distanceTo(CGPoint(x: circleMenuX, y: 0.0)) 136 | let circleMenuWidth = circleMenu!.bounds.width 137 | 138 | let inset = CGFloat(distance) 139 | let yinset = CGFloat(distance) + 2 * circleMenuWidth 140 | 141 | guard let textLabel = textLabel else {return} 142 | 143 | //Top 144 | if circleMenuY < yinset && circleMenuX > inset && circleMenuX < (superViewWidth - inset) { 145 | let newAngle = angle + 270 146 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 147 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 148 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 149 | 150 | } 151 | //Bottom 152 | else if circleMenuX > inset && circleMenuX < (superViewWidth - inset) { 153 | let newAngle = angle - 120 154 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 155 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 156 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 157 | 158 | //Top-left 159 | } else if distanceX - inset > 0 && (distanceY - yinset) < 0 { 160 | let newAngle = angle + 180 161 | rotateTransform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 162 | view.layer.transform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 163 | textLabel.layer.transform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 164 | 165 | //Top-right 166 | } else if (distanceX - inset) < 0 && (distanceY - yinset) < 0 { 167 | let newAngle = angle + 180 168 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 169 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 170 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 171 | 172 | //Bottom-left 173 | } else if (distanceX - inset) > 0 && (distanceY - yinset) > 0 { 174 | rotateTransform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 175 | view.layer.transform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 176 | textLabel.layer.transform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 177 | 178 | //Regular 179 | } else { 180 | rotateTransform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 181 | view.layer.transform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 182 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 183 | 184 | } 185 | textLabel.bounds.size.height = self.bounds.width * 2.0 186 | 187 | guard let transform = rotateTransform else {return} 188 | 189 | if animated { 190 | UIView.animateWithDuration( 191 | duration, 192 | delay: delay, 193 | options: UIViewAnimationOptions.CurveEaseInOut, 194 | animations: { () -> Void in 195 | container.layer.transform = transform 196 | 197 | textLabel.center = self.view.center 198 | 199 | }, 200 | completion: nil) 201 | } else { 202 | container.layer.transform = transform 203 | 204 | textLabel.center = self.view.center 205 | 206 | } 207 | } 208 | } 209 | 210 | // MARK: Animations 211 | 212 | internal extension CircleMenuButton { 213 | internal func showAnimation(distance distance: Float, duration: Double, delay: Double = 0) { 214 | guard let container = self.container else { 215 | fatalError() 216 | } 217 | 218 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 219 | 220 | guard heightConstraint != nil else { 221 | return 222 | } 223 | self.transform = CGAffineTransformMakeScale(0, 0) 224 | container.layoutIfNeeded() 225 | 226 | self.alpha = 0 227 | 228 | heightConstraint?.constant = CGFloat(distance) 229 | UIView.animateWithDuration( 230 | duration, 231 | delay: delay, 232 | usingSpringWithDamping: 0.7, 233 | initialSpringVelocity: 0, 234 | options: UIViewAnimationOptions.CurveLinear, 235 | animations: { () -> Void in 236 | container.layoutIfNeeded() 237 | self.transform = CGAffineTransformMakeScale(1.0, 1.0) 238 | self.alpha = 1 239 | }, completion: { (success) -> Void in 240 | }) 241 | } 242 | 243 | internal func hideAnimation(distance distance: Float, duration: Double, delay: Double = 0) { 244 | 245 | guard let container = self.container else { 246 | fatalError() 247 | } 248 | 249 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 250 | 251 | guard heightConstraint != nil else { 252 | return 253 | } 254 | heightConstraint?.constant = CGFloat(distance) 255 | UIView.animateWithDuration( 256 | duration, 257 | delay: delay, 258 | options: UIViewAnimationOptions.CurveEaseIn, 259 | animations: { () -> Void in 260 | container.layoutIfNeeded() 261 | self.transform = CGAffineTransformMakeScale(0.01, 0.01) 262 | }, completion: { (success) -> Void in 263 | self.alpha = 0 264 | 265 | if let _ = self.container { 266 | if let textLabel = self.textLabel { 267 | textLabel.removeFromSuperview() // remove textLabel 268 | } 269 | container.removeFromSuperview() // remove container 270 | } 271 | }) 272 | } 273 | 274 | internal func changeDistance(distance: CGFloat, animated: Bool, duration: Double = 0, delay: Double = 0) { 275 | 276 | guard let container = self.container else { 277 | fatalError() 278 | } 279 | 280 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 281 | 282 | guard heightConstraint != nil else { 283 | return 284 | } 285 | 286 | heightConstraint?.constant = distance 287 | 288 | UIView.animateWithDuration( 289 | 0.4, 290 | delay: 0.0, 291 | usingSpringWithDamping: 0.4, 292 | initialSpringVelocity: 5, 293 | options: .CurveEaseInOut, 294 | animations: { () -> Void in 295 | container.layoutIfNeeded() 296 | 297 | }, completion: nil) 298 | } 299 | 300 | // MARK: layer animation 301 | 302 | internal func rotationLayerAnimation(angle: Float, duration: Double) { 303 | if let aContainer = container { 304 | rotationLayerAnimation(aContainer, angle: angle, duration: duration) 305 | } 306 | } 307 | } 308 | 309 | internal extension UIView { 310 | internal func rotationLayerAnimation(view: UIView, angle: Float, duration: Double) { 311 | 312 | let rotation = Init(CABasicAnimation(keyPath: "transform.rotation")) { 313 | $0.duration = NSTimeInterval(duration) 314 | $0.toValue = (angle.degrees) 315 | $0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) 316 | } 317 | view.layer.addAnimation(rotation, forKey: "rotation") 318 | } 319 | } 320 | -------------------------------------------------------------------------------- /Example/Pods/PopCircleMenu/Source/PopCirCleMenuView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PopCirCleMenuView.swift 3 | // CircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/2. 6 | // Copyright © 2016年 Alex K. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class PopCirCleMenuView: UIView, UIGestureRecognizerDelegate { 12 | 13 | public var circleButton: CircleMenu? 14 | 15 | private weak var selectedButton: CircleMenuButton? 16 | 17 | private lazy var longPressGestureRecognizer: UILongPressGestureRecognizer = { 18 | let recognizer = UILongPressGestureRecognizer(target: self, action: #selector(PopCirCleMenuView.onPress(_:))) 19 | recognizer.delegate = self 20 | return recognizer 21 | }() 22 | 23 | init(frame: CGRect, buttonSize: CGSize, buttonsCount: Int = 3, duration: Double = 2, 24 | distance: Float = 100) { 25 | super.init(frame: frame) 26 | 27 | let rect = CGRect(x: 0.0, y: 0.0, width: buttonSize.width, height: buttonSize.height) 28 | circleButton = CircleMenu(frame: rect, buttonsCount: buttonsCount, duration: duration, distance: distance) 29 | guard let circleButton = circleButton else {return} 30 | addSubview(circleButton) 31 | 32 | addGestureRecognizer(longPressGestureRecognizer) 33 | 34 | } 35 | 36 | override init(frame: CGRect) { 37 | super.init(frame: frame) 38 | 39 | setup() 40 | 41 | addGestureRecognizer(longPressGestureRecognizer) 42 | 43 | } 44 | 45 | required public init?(coder aDecoder: NSCoder) { 46 | super.init(coder: aDecoder) 47 | 48 | setup() 49 | 50 | addGestureRecognizer(longPressGestureRecognizer) 51 | 52 | } 53 | 54 | func onPress(sender: UILongPressGestureRecognizer) { 55 | guard let circleButton = circleButton else {return} 56 | circleButton.backgroundColor = UIColor.clearColor() 57 | 58 | //circleButton.layer.borderColor = UIColor.color(255, green: 22, blue: 93, alpha: 1.0).CGColor 59 | circleButton.layer.borderWidth = 7.0 60 | bringSubviewToFront(circleButton) 61 | 62 | let buttonWidth = circleButton.bounds.width 63 | 64 | if sender.state == .Began { 65 | circleButton.center = sender.locationInView(self) 66 | circleButton.onTap() 67 | circleButton.hidden = false 68 | } else if sender.state == .Changed { 69 | guard let buttons = circleButton.buttons else {return} 70 | for button in buttons { 71 | guard let textLabel = button.textLabel else {return} 72 | let distance = button.center.distanceTo(sender.locationInView(button)) 73 | 74 | if distance <= buttonWidth / 2.0 { 75 | let color = circleButton.highlightedBorderColor 76 | 77 | button.changeDistance(CGFloat(circleButton.distance) + 15.0, animated: true) 78 | button.layer.borderColor = color.CGColor 79 | 80 | selectedButton = button 81 | textLabel.hidden = false 82 | 83 | } else if distance >= 15.0 + buttonWidth / 2.0 { 84 | let color = circleButton.normalBorderColor 85 | 86 | button.changeDistance(CGFloat(circleButton.distance), animated: false) 87 | button.layer.borderColor = color.CGColor 88 | 89 | textLabel.hidden = true 90 | 91 | } 92 | } 93 | 94 | } else if sender.state == .Ended { 95 | let duration = circleButton.duration 96 | if let button = selectedButton { 97 | let distance = button.center.distanceTo(sender.locationInView(button)) 98 | if distance <= button.bounds.width / 2.0 { 99 | circleButton.buttonHandler(button) 100 | 101 | } else { 102 | circleButton.onTap() 103 | circleButton.hideCenterButton(duration: min(duration, 0.2)) 104 | 105 | } 106 | } else { 107 | circleButton.onTap() 108 | circleButton.hideCenterButton(duration: min(duration, 0.2)) 109 | 110 | } 111 | } 112 | } 113 | 114 | func setup() { 115 | let rect = CGRect(x: 0.0, y: 0.0, width: 44.0, height: 44.0) 116 | circleButton = CircleMenu(frame: rect) 117 | guard let circleButton = circleButton else {return} 118 | addSubview(circleButton) 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Example/Pods/PopCircleMenu/Source/Utility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utility.swift 3 | // CircleMenu 4 | // 5 | // Created by 刘业臻 on 16/6/25. 6 | // Copyright © 2016年 Alex K. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension CGPoint { 13 | func distanceTo(pointB: CGPoint) -> CGFloat { 14 | let diffX = self.x - pointB.x 15 | let diffY = self.y - pointB.y 16 | 17 | return CGFloat(hypotf(Float(diffX), Float(diffY))) 18 | } 19 | } 20 | 21 | extension UIColor { 22 | static func color(red: Int, green: Int, blue: Int, alpha: Float) -> UIColor { 23 | return UIColor( 24 | colorLiteralRed: Float(1.0) / Float(255.0) * Float(red), 25 | green: Float(1.0) / Float(255.0) * Float(green), 26 | blue: Float(1.0) / Float(255.0) * Float(blue), 27 | alpha: alpha) 28 | } 29 | } 30 | 31 | internal extension Float { 32 | var radians: Float { 33 | return self * (Float(180) / Float(M_PI)) 34 | } 35 | 36 | var degrees: Float { 37 | return self * Float(M_PI) / 180.0 38 | } 39 | } 40 | 41 | internal extension UIView { 42 | 43 | var angleZ: Float { 44 | let radians: Float = atan2(Float(self.transform.b), Float(self.transform.a)) 45 | return radians.radians 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - http://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - http://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "Pods/PopCircleMenu.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "Pods/PopCircleMenu.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double PodsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char PodsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/PopCircleMenu.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "PopCircleMenu" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods { 2 | umbrella header "Pods-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/PopCircleMenu.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "PopCircleMenu" 6 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/PopCircleMenu-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PopCircleMenu : NSObject 3 | @end 4 | @implementation PodsDummy_PopCircleMenu 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/PopCircleMenu-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/PopCircleMenu-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double PopCircleMenuVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char PopCircleMenuVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/PopCircleMenu.modulemap: -------------------------------------------------------------------------------- 1 | framework module PopCircleMenu { 2 | umbrella header "PopCircleMenu-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PopCircleMenu/PopCircleMenu.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PopCircleMenu" "${PODS_ROOT}/Headers/Public" 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /PopCircleMenu.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'PopCircleMenu' 3 | s.version = '0.1.1' 4 | s.license = 'MIT' 5 | s.summary = 'Pinterest like pop circle menu' 6 | s.homepage = 'https://github.com/luiyezheng/PopCircleMenu' 7 | s.authors = { 'luiyezheng' => 'luiyezheng@foxmail.com' } 8 | s.source = { :git => 'https://github.com/luiyezheng/PopCircleMenu.git', :tag => s.version } 9 | 10 | s.ios.deployment_target = '8.0' 11 | 12 | s.source_files = 'Source' 13 | 14 | s.requires_arc = false 15 | end 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PopCircleMenu 2 | Pinterest like pop circle Menu 3 | 4 | 5 | 6 | 7 | ##Features 8 | * Adaptive direction 9 | * You can add a text above buttons 10 | * Customize the appearance 11 | * Written in Swift 12 | 13 | ##Usage 14 | 15 | ###Setup 16 | ```Swift 17 | popMenuView.circleButton?.delegate = self 18 | //Buttons count 19 | popMenuView.circleButton?.buttonsCount = 4 20 | 21 | //Distance between buttons and the red circle 22 | popMenuView.circleButton?.distance = 105 23 | 24 | //Delay between show buttons 25 | popMenuView.circleButton?.showDelay = 0.03 26 | 27 | //Animation Duration 28 | popMenuView.circleButton?.duration = 0.8 29 | ``` 30 | 31 | ###Delegate methods 32 | ```Swift 33 | func circleMenu(circleMenu: CircleMenu, buttonWillSelected button: CircleMenuButton, atIndex: Int) { 34 | print("button!!!!! will selected: \(atIndex)") 35 | } 36 | 37 | func circleMenu(circleMenu: CircleMenu, buttonDidSelected button: CircleMenuButton, atIndex: Int) { 38 | print("button!!!!! did selected: \(atIndex)") 39 | } 40 | ``` 41 | 42 | ###Customization 43 | ```Swift 44 | func circleMenu(circleMenu: CircleMenu, willDisplay button: CircleMenuButton, atIndex: Int) { 45 | //set text 46 | guard let textLabel = button.textLabel else {return} 47 | textLabel.text = items[atIndex].text 48 | 49 | //set color 50 | button.backgroundColor = UIColor.lightGrayColor() 51 | button.setImage(UIImage(imageLiteral: items[atIndex].icon), forState: .Normal) 52 | button.layer.borderWidth = 5.0 53 | button.layer.borderColor = UIColor.whiteColor().CGColor 54 | 55 | // set highlited image 56 | let highlightedImage = UIImage(imageLiteral: items[atIndex].icon).imageWithRenderingMode(.AlwaysTemplate) 57 | button.setImage(highlightedImage, forState: .Highlighted) 58 | button.tintColor = UIColor.init(colorLiteralRed: 0, green: 0, blue: 0, alpha: 0.3) 59 | 60 | } 61 | 62 | ``` 63 | Take a look at Example for more information. 64 | 65 | 66 | ##Install 67 | ###Cocoapods 68 | ```Ruby 69 | use_frameworks! 70 | pod ‘PopCircleMenu’, :git => 'https://github.com/luiyezheng/PopCircleMenu.git' 71 | ``` 72 | 73 | ##Plan 74 | - [ ] Dynamic center button 75 | - [ ] [Frisbee Pop Style](https://www.pinterest.com/pin/43136108910485890/) 76 | 77 | ##Acknowledgement 78 | Inspired by [circle-menu](https://github.com/fdzsergio/SFFocusViewLayout) and Pinterst 79 | 80 | Based on [circle-menu](https://github.com/fdzsergio/SFFocusViewLayout) 81 | 82 | ##Author 83 | Luiyezheng ,luiyezheng@foxmail.com 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /README/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

PopCircleMenu

13 |
14 |
15 |

Adaptive direction

16 |

Pop buttons with text

17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /README/adptive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/README/adptive.gif -------------------------------------------------------------------------------- /README/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

PopCircleMenu

13 |
14 |
15 |

Adaptive direction

16 |

Pop buttons with text

17 |
18 |
19 | 20 | 21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /README/main.css: -------------------------------------------------------------------------------- 1 | div#container { 2 | position: absolute; 3 | 4 | width: 100%; 5 | } 6 | 7 | div#img-container { 8 | display: -webkit-flex; 9 | display: flex; 10 | 11 | width: 100%; 12 | 13 | position: relative; 14 | 15 | } 16 | 17 | div#text-container { 18 | margin-bottom: 20px; 19 | 20 | position: relative; 21 | } 22 | 23 | h2 { 24 | width: 240px; 25 | 26 | display: inline; 27 | margin: 0 120px 0 0; 28 | text-align: center; 29 | } 30 | 31 | img { 32 | width: 240px; 33 | height: 460px; 34 | 35 | margin: 0 100px 0 0; 36 | 37 | position: relative 38 | } -------------------------------------------------------------------------------- /README/pop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/PopCircleMenu/c75925dfaf12fd6234f4b63ec6f6c35f5fcb34fb/README/pop.gif -------------------------------------------------------------------------------- /Source/CircleMenu.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenu1.swift 3 | // PopCircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | 10 | import UIKit 11 | 12 | // MARK: helpers 13 | 14 | @warn_unused_result 15 | func Init(value: Type, @noescape block: (object: Type) -> Void) -> Type { 16 | block(object: value) 17 | return value 18 | } 19 | 20 | // MARK: Protocol 21 | 22 | /** 23 | * CircleMenuDelegate 24 | */ 25 | @objc public protocol CircleMenuDelegate { 26 | 27 | /** 28 | Tells the delegate the circle menu is about to draw a button for a particular index. 29 | 30 | - parameter circleMenu: The circle menu object informing the delegate of this impending event. 31 | - parameter button: A circle menu button object that circle menu is going to use when drawing the row. Don't change button.tag 32 | - parameter atIndex: An button index. 33 | */ 34 | optional func circleMenu(circleMenu: CircleMenu, willDisplay button: CircleMenuButton, atIndex: Int) 35 | 36 | /** 37 | Tells the delegate that a specified index is about to be selected. 38 | 39 | - parameter circleMenu: A circle menu object informing the delegate about the impending selection. 40 | - parameter button: A selected circle menu button. Don't change button.tag 41 | - parameter atIndex: Selected button index 42 | */ 43 | optional func circleMenu(circleMenu: CircleMenu, buttonWillSelected button: CircleMenuButton, atIndex: Int) 44 | 45 | /** 46 | Tells the delegate that the specified index is now selected. 47 | 48 | - parameter circleMenu: A circle menu object informing the delegate about the new index selection. 49 | - parameter button: A selected circle menu button. Don't change button.tag 50 | - parameter atIndex: Selected button index 51 | */ 52 | optional func circleMenu(circleMenu: CircleMenu, buttonDidSelected button: CircleMenuButton, atIndex: Int) 53 | } 54 | 55 | // MARK: CircleMenu 56 | 57 | /// A Button object with pop ups buttons 58 | public class CircleMenu: UIButton { 59 | 60 | // MARK: properties 61 | 62 | /// Buttons count 63 | public var buttonsCount: Int = 3 64 | /// Circle animation duration 65 | public var duration: Double = 2 66 | /// Distance between center button and buttons 67 | public var distance: Float = 100 68 | /// Delay between show buttons 69 | public var showDelay: Double = 0.0 70 | /// Highlighted border Color 71 | public var highlightedBorderColor: UIColor = UIColor.color(255, green: 22, blue: 93, alpha: 1.0) 72 | /// Normal border Color 73 | public var normalBorderColor: UIColor = UIColor.whiteColor() 74 | 75 | /// The object that acts as the delegate of the circle menu. 76 | @IBOutlet weak public var delegate: AnyObject? //CircleMenuDelegate? 77 | 78 | var buttons: [CircleMenuButton]? 79 | 80 | // MARK: life cycle 81 | 82 | /** 83 | Initializes and returns a circle menu object. 84 | 85 | - parameter frame: A rectangle specifying the initial location and size of the circle menu in its superview’€™s coordinates. 86 | - parameter normalIcon: The image to use for the specified normal state. 87 | - parameter selectedIcon: The image to use for the specified selected state. 88 | - parameter buttonsCount: The number of buttons. 89 | - parameter duration: The duration, in seconds, of the animation. 90 | - parameter distance: Distance between center button and sub buttons. 91 | 92 | - returns: A newly created circle menu. 93 | */ 94 | public init(frame: CGRect, buttonsCount: Int = 3, duration: Double = 2, 95 | distance: Float = 100) { 96 | super.init(frame: frame) 97 | 98 | self.buttonsCount = buttonsCount 99 | self.duration = duration 100 | self.distance = distance 101 | 102 | commonInit() 103 | } 104 | 105 | required public init?(coder aDecoder: NSCoder) { 106 | super.init(coder: aDecoder) 107 | 108 | commonInit() 109 | } 110 | 111 | private func commonInit() { 112 | translatesAutoresizingMaskIntoConstraints = true 113 | layer.borderColor = highlightedBorderColor.colorWithAlphaComponent(0.5).CGColor 114 | 115 | setImage(UIImage(), forState: .Normal) 116 | setImage(UIImage(), forState: .Selected) 117 | } 118 | 119 | // MARK: methods 120 | 121 | /** 122 | Hide button 123 | 124 | - parameter duration: The duration, in seconds, of the animation. 125 | - parameter hideDelay: The time to delay, in seconds. 126 | */ 127 | public func hideButtons(duration: Double, hideDelay: Double = 0) { 128 | if buttons == nil { 129 | return 130 | } 131 | 132 | buttonsAnimationIsShow(isShow: false, duration: duration, hideDelay: hideDelay) 133 | 134 | tapBounceAnimation() 135 | tapRotatedAnimation(0.3, isSelected: false) 136 | } 137 | 138 | /** 139 | Check is sub buttons showed 140 | */ 141 | public func buttonsIsShown() -> Bool { 142 | guard let buttons = self.buttons else { 143 | return false 144 | } 145 | 146 | for button in buttons { 147 | if button.alpha == 0 { 148 | return false 149 | } 150 | } 151 | return true 152 | } 153 | 154 | // MARK: create 155 | 156 | private func createButtons() -> [CircleMenuButton] { 157 | var buttons = [CircleMenuButton]() 158 | 159 | let step: Float = 360.0 / Float(self.buttonsCount) 160 | for index in 0.. Void in 251 | self.transform = CGAffineTransformMakeScale(1, 1) 252 | }, 253 | completion: nil) 254 | } 255 | 256 | private func tapRotatedAnimation(duration: Float, isSelected: Bool) { 257 | 258 | selected = isSelected 259 | self.alpha = 1.0 260 | } 261 | 262 | internal func hideCenterButton(duration duration: Double, delay: Double = 0) { 263 | UIView.animateWithDuration( NSTimeInterval(duration), delay: NSTimeInterval(delay), 264 | options: UIViewAnimationOptions.CurveEaseOut, 265 | animations: { () -> Void in 266 | self.transform = CGAffineTransformMakeScale(0.001, 0.001) 267 | }, completion: nil) 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /Source/CircleMenuButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenuButton.swift 3 | // PopCircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/8. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class CircleMenuButton: UIButton { 12 | 13 | // MARK: properties 14 | 15 | internal weak var circleMenu: CircleMenu? 16 | 17 | internal weak var container: UIView? 18 | 19 | private var rotateTransform: CATransform3D? 20 | 21 | internal var newAngle: Float = 0.0 22 | 23 | internal var view = UIView() 24 | 25 | internal weak var textLabel: UITextField? 26 | 27 | // MARK: life cycle 28 | 29 | init(size: CGSize, circleMenu: CircleMenu, distance: Float, angle: Float = 0, index: Int) { 30 | super.init(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: size)) 31 | 32 | self.circleMenu = circleMenu 33 | 34 | self.backgroundColor = UIColor(colorLiteralRed: 0.79, green: 0.24, blue: 0.27, alpha: 1) 35 | self.layer.cornerRadius = size.height / 2.0 36 | 37 | let aContainer = createContainer(CGSize(width: size.width, height:CGFloat(distance)), circleMenu: circleMenu) 38 | 39 | // hack view for rotate 40 | view = UIView(frame: CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.height)) 41 | view.backgroundColor = UIColor.clearColor() 42 | view.addSubview(self) 43 | 44 | //Create textLabel 45 | textLabel = UITextField(frame: CGRect(x: 0.0, y: 0.0, width: self.bounds.width, height: self.bounds.height)) 46 | guard let textLabel = textLabel else {return} 47 | 48 | textLabel.font = UIFont(name: "Helvetica-Bold", size: 12) 49 | textLabel.hidden = true 50 | textLabel.textColor = UIColor.whiteColor() 51 | textLabel.textAlignment = .Center 52 | textLabel.adjustsFontSizeToFitWidth = true 53 | textLabel.backgroundColor = UIColor.clearColor() 54 | textLabel.userInteractionEnabled = false 55 | textLabel.contentVerticalAlignment = .Top 56 | 57 | aContainer.addSubview(view) 58 | aContainer.addSubview(textLabel) 59 | 60 | //... 61 | container = aContainer 62 | 63 | self.rotatedZ(angle: angle, animated: false, distance: distance) 64 | } 65 | 66 | required public init?(coder aDecoder: NSCoder) { 67 | fatalError("init(coder:) has not been implemented") 68 | } 69 | 70 | // MARK: configure 71 | 72 | private func createContainer(size: CGSize, circleMenu: CircleMenu) -> UIView { 73 | 74 | guard let circleMenuSuperView = circleMenu.superview else { 75 | fatalError("wront circle menu") 76 | } 77 | 78 | let container = Init(UIView(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: size))) { 79 | $0.backgroundColor = UIColor.clearColor() 80 | $0.translatesAutoresizingMaskIntoConstraints = false 81 | $0.layer.anchorPoint = CGPoint(x: 0.5, y: 1) 82 | } 83 | circleMenuSuperView.insertSubview(container, belowSubview: circleMenu) 84 | 85 | // added constraints 86 | let height = NSLayoutConstraint(item: container, 87 | attribute: .Height, 88 | relatedBy: .Equal, 89 | toItem: nil, 90 | attribute: .Height, 91 | multiplier: 1, 92 | constant: size.height) 93 | height.identifier = "height" 94 | container.addConstraint(height) 95 | 96 | container.addConstraint(NSLayoutConstraint(item: container, 97 | attribute: .Width, 98 | relatedBy: .Equal, 99 | toItem: nil, 100 | attribute: .Width, 101 | multiplier: 1, 102 | constant: size.width)) 103 | 104 | circleMenuSuperView.addConstraint(NSLayoutConstraint(item: circleMenu, 105 | attribute: .CenterX, 106 | relatedBy: .Equal, 107 | toItem: container, 108 | attribute: .CenterX, 109 | multiplier: 1, 110 | constant:0)) 111 | 112 | circleMenuSuperView.addConstraint(NSLayoutConstraint(item: circleMenu, 113 | attribute: .CenterY, 114 | relatedBy: .Equal, 115 | toItem: container, 116 | attribute: .CenterY, 117 | multiplier: 1, 118 | constant:0)) 119 | 120 | return container 121 | } 122 | 123 | // MARK: methods 124 | 125 | internal func rotatedZ(angle angle: Float, animated: Bool, duration: Double = 0, delay: Double = 0, distance: Float) { 126 | guard let container = self.container else { 127 | fatalError("contaner don't create") 128 | } 129 | 130 | guard let superViewWidth = (circleMenu!.superview?.bounds.width) else {return} 131 | guard let superViewX = circleMenu!.superview?.bounds.maxX else {return} 132 | let circleMenuY = circleMenu!.center.y 133 | let circleMenuX = circleMenu!.center.x 134 | let distanceX = circleMenu!.center.distanceTo(CGPoint(x: superViewX, y: circleMenuY)) 135 | let distanceY = circleMenu!.center.distanceTo(CGPoint(x: circleMenuX, y: 0.0)) 136 | let circleMenuWidth = circleMenu!.bounds.width 137 | 138 | let inset = CGFloat(distance) 139 | let yinset = CGFloat(distance) + 2 * circleMenuWidth 140 | 141 | guard let textLabel = textLabel else {return} 142 | 143 | //Top 144 | if circleMenuY < yinset && circleMenuX > inset && circleMenuX < (superViewWidth - inset) { 145 | let newAngle = angle + 270 146 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 147 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 148 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 149 | 150 | } 151 | //Bottom 152 | else if circleMenuX > inset && circleMenuX < (superViewWidth - inset) { 153 | let newAngle = angle - 120 154 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 155 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 156 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 157 | 158 | //Top-left 159 | } else if distanceX - inset > 0 && (distanceY - yinset) < 0 { 160 | let newAngle = angle + 180 161 | rotateTransform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 162 | view.layer.transform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 163 | textLabel.layer.transform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 164 | 165 | //Top-right 166 | } else if (distanceX - inset) < 0 && (distanceY - yinset) < 0 { 167 | let newAngle = angle + 180 168 | rotateTransform = CATransform3DMakeRotation(-CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 169 | view.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 170 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(newAngle.degrees) / 2.4, 0, 0, 1) 171 | 172 | //Bottom-left 173 | } else if (distanceX - inset) > 0 && (distanceY - yinset) > 0 { 174 | rotateTransform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 175 | view.layer.transform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 176 | textLabel.layer.transform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 177 | 178 | //Regular 179 | } else { 180 | rotateTransform = CATransform3DMakeRotation(-CGFloat(angle.degrees) / 2.4, 0, 0, 1) 181 | view.layer.transform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 182 | textLabel.layer.transform = CATransform3DMakeRotation(CGFloat(angle.degrees) / 2.4, 0, 0, 1) 183 | 184 | } 185 | textLabel.bounds.size.height = self.bounds.width * 2.0 186 | 187 | guard let transform = rotateTransform else {return} 188 | 189 | if animated { 190 | UIView.animateWithDuration( 191 | duration, 192 | delay: delay, 193 | options: UIViewAnimationOptions.CurveEaseInOut, 194 | animations: { () -> Void in 195 | container.layer.transform = transform 196 | 197 | textLabel.center = self.view.center 198 | 199 | }, 200 | completion: nil) 201 | } else { 202 | container.layer.transform = transform 203 | 204 | textLabel.center = self.view.center 205 | 206 | } 207 | } 208 | } 209 | 210 | // MARK: Animations 211 | 212 | internal extension CircleMenuButton { 213 | internal func showAnimation(distance distance: Float, duration: Double, delay: Double = 0) { 214 | guard let container = self.container else { 215 | fatalError() 216 | } 217 | 218 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 219 | 220 | guard heightConstraint != nil else { 221 | return 222 | } 223 | self.transform = CGAffineTransformMakeScale(0, 0) 224 | container.layoutIfNeeded() 225 | 226 | self.alpha = 0 227 | 228 | heightConstraint?.constant = CGFloat(distance) 229 | UIView.animateWithDuration( 230 | duration, 231 | delay: delay, 232 | usingSpringWithDamping: 0.7, 233 | initialSpringVelocity: 0, 234 | options: UIViewAnimationOptions.CurveLinear, 235 | animations: { () -> Void in 236 | container.layoutIfNeeded() 237 | self.transform = CGAffineTransformMakeScale(1.0, 1.0) 238 | self.alpha = 1 239 | }, completion: { (success) -> Void in 240 | }) 241 | } 242 | 243 | internal func hideAnimation(distance distance: Float, duration: Double, delay: Double = 0) { 244 | 245 | guard let container = self.container else { 246 | fatalError() 247 | } 248 | 249 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 250 | 251 | guard heightConstraint != nil else { 252 | return 253 | } 254 | heightConstraint?.constant = CGFloat(distance) 255 | UIView.animateWithDuration( 256 | duration, 257 | delay: delay, 258 | options: UIViewAnimationOptions.CurveEaseIn, 259 | animations: { () -> Void in 260 | container.layoutIfNeeded() 261 | self.transform = CGAffineTransformMakeScale(0.01, 0.01) 262 | }, completion: { (success) -> Void in 263 | self.alpha = 0 264 | 265 | if let _ = self.container { 266 | if let textLabel = self.textLabel { 267 | textLabel.removeFromSuperview() // remove textLabel 268 | } 269 | container.removeFromSuperview() // remove container 270 | } 271 | }) 272 | } 273 | 274 | internal func changeDistance(distance: CGFloat, animated: Bool, duration: Double = 0, delay: Double = 0) { 275 | 276 | guard let container = self.container else { 277 | fatalError() 278 | } 279 | 280 | let heightConstraint = self.container?.constraints.filter {$0.identifier == "height"}.first 281 | 282 | guard heightConstraint != nil else { 283 | return 284 | } 285 | 286 | heightConstraint?.constant = distance 287 | 288 | UIView.animateWithDuration( 289 | 0.4, 290 | delay: 0.0, 291 | usingSpringWithDamping: 0.4, 292 | initialSpringVelocity: 5, 293 | options: .CurveEaseInOut, 294 | animations: { () -> Void in 295 | container.layoutIfNeeded() 296 | 297 | }, completion: nil) 298 | } 299 | 300 | // MARK: layer animation 301 | 302 | internal func rotationLayerAnimation(angle: Float, duration: Double) { 303 | if let aContainer = container { 304 | rotationLayerAnimation(aContainer, angle: angle, duration: duration) 305 | } 306 | } 307 | } 308 | 309 | internal extension UIView { 310 | internal func rotationLayerAnimation(view: UIView, angle: Float, duration: Double) { 311 | 312 | let rotation = Init(CABasicAnimation(keyPath: "transform.rotation")) { 313 | $0.duration = NSTimeInterval(duration) 314 | $0.toValue = (angle.degrees) 315 | $0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) 316 | } 317 | view.layer.addAnimation(rotation, forKey: "rotation") 318 | } 319 | } 320 | -------------------------------------------------------------------------------- /Source/PopCirCleMenuView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PopCirCleMenuView.swift 3 | // CircleMenu 4 | // 5 | // Created by 刘业臻 on 16/7/2. 6 | // Copyright © 2016年 Alex K. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class PopCirCleMenuView: UIView, UIGestureRecognizerDelegate { 12 | 13 | public var circleButton: CircleMenu? 14 | 15 | private weak var selectedButton: CircleMenuButton? 16 | 17 | private lazy var longPressGestureRecognizer: UILongPressGestureRecognizer = { 18 | let recognizer = UILongPressGestureRecognizer(target: self, action: #selector(PopCirCleMenuView.onPress(_:))) 19 | recognizer.delegate = self 20 | return recognizer 21 | }() 22 | 23 | init(frame: CGRect, buttonSize: CGSize, buttonsCount: Int = 3, duration: Double = 2, 24 | distance: Float = 100) { 25 | super.init(frame: frame) 26 | 27 | let rect = CGRect(x: 0.0, y: 0.0, width: buttonSize.width, height: buttonSize.height) 28 | circleButton = CircleMenu(frame: rect, buttonsCount: buttonsCount, duration: duration, distance: distance) 29 | guard let circleButton = circleButton else {return} 30 | addSubview(circleButton) 31 | 32 | addGestureRecognizer(longPressGestureRecognizer) 33 | 34 | } 35 | 36 | override init(frame: CGRect) { 37 | super.init(frame: frame) 38 | 39 | setup() 40 | 41 | addGestureRecognizer(longPressGestureRecognizer) 42 | 43 | } 44 | 45 | required public init?(coder aDecoder: NSCoder) { 46 | super.init(coder: aDecoder) 47 | 48 | setup() 49 | 50 | addGestureRecognizer(longPressGestureRecognizer) 51 | 52 | } 53 | 54 | func onPress(sender: UILongPressGestureRecognizer) { 55 | guard let circleButton = circleButton else {return} 56 | circleButton.backgroundColor = UIColor.clearColor() 57 | 58 | //circleButton.layer.borderColor = UIColor.color(255, green: 22, blue: 93, alpha: 1.0).CGColor 59 | circleButton.layer.borderWidth = 7.0 60 | bringSubviewToFront(circleButton) 61 | 62 | let buttonWidth = circleButton.bounds.width 63 | 64 | if sender.state == .Began { 65 | circleButton.center = sender.locationInView(self) 66 | circleButton.onTap() 67 | circleButton.hidden = false 68 | } else if sender.state == .Changed { 69 | guard let buttons = circleButton.buttons else {return} 70 | for button in buttons { 71 | guard let textLabel = button.textLabel else {return} 72 | let distance = button.center.distanceTo(sender.locationInView(button)) 73 | 74 | if distance <= buttonWidth / 2.0 { 75 | let color = circleButton.highlightedBorderColor 76 | 77 | button.changeDistance(CGFloat(circleButton.distance) + 15.0, animated: true) 78 | button.layer.borderColor = color.CGColor 79 | 80 | selectedButton = button 81 | textLabel.hidden = false 82 | 83 | } else if distance >= 15.0 + buttonWidth / 2.0 { 84 | let color = circleButton.normalBorderColor 85 | 86 | button.changeDistance(CGFloat(circleButton.distance), animated: false) 87 | button.layer.borderColor = color.CGColor 88 | 89 | textLabel.hidden = true 90 | 91 | } 92 | } 93 | 94 | } else if sender.state == .Ended { 95 | let duration = circleButton.duration 96 | if let button = selectedButton { 97 | let distance = button.center.distanceTo(sender.locationInView(button)) 98 | if distance <= button.bounds.width / 2.0 { 99 | circleButton.buttonHandler(button) 100 | 101 | } else { 102 | circleButton.onTap() 103 | circleButton.hideCenterButton(duration: min(duration, 0.2)) 104 | 105 | } 106 | } else { 107 | circleButton.onTap() 108 | circleButton.hideCenterButton(duration: min(duration, 0.2)) 109 | 110 | } 111 | } 112 | } 113 | 114 | func setup() { 115 | let rect = CGRect(x: 0.0, y: 0.0, width: 44.0, height: 44.0) 116 | circleButton = CircleMenu(frame: rect) 117 | guard let circleButton = circleButton else {return} 118 | addSubview(circleButton) 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Source/Utility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utility.swift 3 | // CircleMenu 4 | // 5 | // Created by 刘业臻 on 16/6/25. 6 | // Copyright © 2016年 Alex K. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension CGPoint { 13 | func distanceTo(pointB: CGPoint) -> CGFloat { 14 | let diffX = self.x - pointB.x 15 | let diffY = self.y - pointB.y 16 | 17 | return CGFloat(hypotf(Float(diffX), Float(diffY))) 18 | } 19 | } 20 | 21 | extension UIColor { 22 | static func color(red: Int, green: Int, blue: Int, alpha: Float) -> UIColor { 23 | return UIColor( 24 | colorLiteralRed: Float(1.0) / Float(255.0) * Float(red), 25 | green: Float(1.0) / Float(255.0) * Float(green), 26 | blue: Float(1.0) / Float(255.0) * Float(blue), 27 | alpha: alpha) 28 | } 29 | } 30 | 31 | internal extension Float { 32 | var radians: Float { 33 | return self * (Float(180) / Float(M_PI)) 34 | } 35 | 36 | var degrees: Float { 37 | return self * Float(M_PI) / 180.0 38 | } 39 | } 40 | 41 | internal extension UIView { 42 | 43 | var angleZ: Float { 44 | let radians: Float = atan2(Float(self.transform.b), Float(self.transform.a)) 45 | return radians.radians 46 | } 47 | } 48 | --------------------------------------------------------------------------------