├── .gitignore ├── .travis.yml ├── Example ├── MLFlyOverMenu.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── MLFlyOverMenu.xcscheme ├── MLFlyOverMenu.xcworkspace │ └── contents.xcworkspacedata ├── MLFlyOverMenu │ ├── Base.lproj │ │ ├── Main_iPad.storyboard │ │ ├── Main_iPad.strings │ │ ├── Main_iPhone.storyboard │ │ └── Main_iPhone.strings │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── MLAppDelegate.h │ ├── MLAppDelegate.m │ ├── MLFlyOverMenu-Info.plist │ ├── MLFlyOverMenu-Prefix.pch │ ├── MLViewController.h │ ├── MLViewController.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── MLFlyOverMenu.podspec ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── MLFlyOverMenuController.h │ └── MLFlyOverMenuController.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # We recommend against adding the Pods directory to your .gitignore. However 26 | # you should judge for yourself, the pros and cons are mentioned at: 27 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 28 | # 29 | # Note: if you ignore the Pods directory, make sure to uncomment 30 | # `pod install` in .travis.yml 31 | # 32 | # Pods/ 33 | Example/Pods 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # reference: http://www.objc.io/issue-6/travis-ci.html 2 | 3 | language: objective-c 4 | before_install: 5 | - gem install cocoapods -v '>= 0.34.0' 6 | - cd Example && pod install && cd - 7 | 8 | script: 9 | - xctool test -workspace Example/MLFlyOverMenu.xcworkspace -scheme MLFlyOverMenu -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO 10 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 141193171C9247DE8AADE727 14 | 15 | explicitFileType 16 | archive.ar 17 | includeInIndex 18 | 0 19 | isa 20 | PBXFileReference 21 | path 22 | libPods-Tests.a 23 | sourceTree 24 | BUILT_PRODUCTS_DIR 25 | 26 | 1475F353DF654810A4B365AD 27 | 28 | includeInIndex 29 | 1 30 | isa 31 | PBXFileReference 32 | lastKnownFileType 33 | text 34 | name 35 | README.md 36 | path 37 | ../README.md 38 | sourceTree 39 | <group> 40 | 41 | 16A26D18E04EACE7A13B821B 42 | 43 | children 44 | 45 | D87F3CF93170F7F1A4828316 46 | 6594C3971422FC1618A4CED8 47 | 402686F58628F0A3D0368412 48 | D6BDC7DD035D9EDBD96A1CCE 49 | 50 | isa 51 | PBXGroup 52 | name 53 | Pods 54 | sourceTree 55 | <group> 56 | 57 | 1988DF2EBC654B85BB47F14E 58 | 59 | explicitFileType 60 | archive.ar 61 | includeInIndex 62 | 0 63 | isa 64 | PBXFileReference 65 | path 66 | libPods-MLFlyOverMenu.a 67 | sourceTree 68 | BUILT_PRODUCTS_DIR 69 | 70 | 33FD66B4006D44EFB6E2C984 71 | 72 | fileRef 73 | 141193171C9247DE8AADE727 74 | isa 75 | PBXBuildFile 76 | 77 | 402686F58628F0A3D0368412 78 | 79 | includeInIndex 80 | 1 81 | isa 82 | PBXFileReference 83 | lastKnownFileType 84 | text.xcconfig 85 | name 86 | Pods-Tests.debug.xcconfig 87 | path 88 | Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig 89 | sourceTree 90 | <group> 91 | 92 | 4DBCE2A4958F4036A5F49557 93 | 94 | buildActionMask 95 | 2147483647 96 | files 97 | 98 | inputPaths 99 | 100 | isa 101 | PBXShellScriptBuildPhase 102 | name 103 | Copy Pods Resources 104 | outputPaths 105 | 106 | runOnlyForDeploymentPostprocessing 107 | 0 108 | shellPath 109 | /bin/sh 110 | shellScript 111 | "${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-resources.sh" 112 | 113 | showEnvVarsInLog 114 | 0 115 | 116 | 54A8FE1EF23646C6B64623C9 117 | 118 | includeInIndex 119 | 1 120 | isa 121 | PBXFileReference 122 | lastKnownFileType 123 | text 124 | name 125 | MLFlyOverMenu.podspec 126 | path 127 | ../MLFlyOverMenu.podspec 128 | sourceTree 129 | <group> 130 | 131 | 6003F581195388D10070C39A 132 | 133 | children 134 | 135 | 60FF7A9C1954A5C5007DD14C 136 | 6003F593195388D20070C39A 137 | 6003F5B5195388D20070C39A 138 | 6003F58C195388D20070C39A 139 | 6003F58B195388D20070C39A 140 | 16A26D18E04EACE7A13B821B 141 | 142 | isa 143 | PBXGroup 144 | sourceTree 145 | <group> 146 | 147 | 6003F582195388D10070C39A 148 | 149 | attributes 150 | 151 | CLASSPREFIX 152 | ML 153 | LastUpgradeCheck 154 | 0510 155 | ORGANIZATIONNAME 156 | MUSTLab 157 | TargetAttributes 158 | 159 | 6003F5AD195388D20070C39A 160 | 161 | TestTargetID 162 | 6003F589195388D20070C39A 163 | 164 | 165 | 166 | buildConfigurationList 167 | 6003F585195388D10070C39A 168 | compatibilityVersion 169 | Xcode 3.2 170 | developmentRegion 171 | English 172 | hasScannedForEncodings 173 | 0 174 | isa 175 | PBXProject 176 | knownRegions 177 | 178 | en 179 | Base 180 | 181 | mainGroup 182 | 6003F581195388D10070C39A 183 | productRefGroup 184 | 6003F58B195388D20070C39A 185 | projectDirPath 186 | 187 | projectReferences 188 | 189 | projectRoot 190 | 191 | targets 192 | 193 | 6003F589195388D20070C39A 194 | 6003F5AD195388D20070C39A 195 | 196 | 197 | 6003F585195388D10070C39A 198 | 199 | buildConfigurations 200 | 201 | 6003F5BD195388D20070C39A 202 | 6003F5BE195388D20070C39A 203 | 204 | defaultConfigurationIsVisible 205 | 0 206 | defaultConfigurationName 207 | Release 208 | isa 209 | XCConfigurationList 210 | 211 | 6003F586195388D20070C39A 212 | 213 | buildActionMask 214 | 2147483647 215 | files 216 | 217 | 6003F59E195388D20070C39A 218 | 6003F5A7195388D20070C39A 219 | 6003F59A195388D20070C39A 220 | 221 | isa 222 | PBXSourcesBuildPhase 223 | runOnlyForDeploymentPostprocessing 224 | 0 225 | 226 | 6003F587195388D20070C39A 227 | 228 | buildActionMask 229 | 2147483647 230 | files 231 | 232 | 6003F590195388D20070C39A 233 | 6003F592195388D20070C39A 234 | 6003F58E195388D20070C39A 235 | F521736E088E4C33948E2752 236 | 237 | isa 238 | PBXFrameworksBuildPhase 239 | runOnlyForDeploymentPostprocessing 240 | 0 241 | 242 | 6003F588195388D20070C39A 243 | 244 | buildActionMask 245 | 2147483647 246 | files 247 | 248 | 6003F5A4195388D20070C39A 249 | 6003F5A9195388D20070C39A 250 | 6003F5A1195388D20070C39A 251 | 6003F598195388D20070C39A 252 | 253 | isa 254 | PBXResourcesBuildPhase 255 | runOnlyForDeploymentPostprocessing 256 | 0 257 | 258 | 6003F589195388D20070C39A 259 | 260 | buildConfigurationList 261 | 6003F5BF195388D20070C39A 262 | buildPhases 263 | 264 | AC690E2F1B8E485AA7C5D5A8 265 | 6003F586195388D20070C39A 266 | 6003F587195388D20070C39A 267 | 6003F588195388D20070C39A 268 | B3CF35C0DB1343C391106711 269 | 270 | buildRules 271 | 272 | dependencies 273 | 274 | isa 275 | PBXNativeTarget 276 | name 277 | MLFlyOverMenu 278 | productName 279 | MLFlyOverMenu 280 | productReference 281 | 6003F58A195388D20070C39A 282 | productType 283 | com.apple.product-type.application 284 | 285 | 6003F58A195388D20070C39A 286 | 287 | explicitFileType 288 | wrapper.application 289 | includeInIndex 290 | 0 291 | isa 292 | PBXFileReference 293 | path 294 | MLFlyOverMenu.app 295 | sourceTree 296 | BUILT_PRODUCTS_DIR 297 | 298 | 6003F58B195388D20070C39A 299 | 300 | children 301 | 302 | 6003F58A195388D20070C39A 303 | 6003F5AE195388D20070C39A 304 | 305 | isa 306 | PBXGroup 307 | name 308 | Products 309 | sourceTree 310 | <group> 311 | 312 | 6003F58C195388D20070C39A 313 | 314 | children 315 | 316 | 6003F58D195388D20070C39A 317 | 6003F58F195388D20070C39A 318 | 6003F591195388D20070C39A 319 | 6003F5AF195388D20070C39A 320 | 1988DF2EBC654B85BB47F14E 321 | 141193171C9247DE8AADE727 322 | 323 | isa 324 | PBXGroup 325 | name 326 | Frameworks 327 | sourceTree 328 | <group> 329 | 330 | 6003F58D195388D20070C39A 331 | 332 | isa 333 | PBXFileReference 334 | lastKnownFileType 335 | wrapper.framework 336 | name 337 | Foundation.framework 338 | path 339 | System/Library/Frameworks/Foundation.framework 340 | sourceTree 341 | SDKROOT 342 | 343 | 6003F58E195388D20070C39A 344 | 345 | fileRef 346 | 6003F58D195388D20070C39A 347 | isa 348 | PBXBuildFile 349 | 350 | 6003F58F195388D20070C39A 351 | 352 | isa 353 | PBXFileReference 354 | lastKnownFileType 355 | wrapper.framework 356 | name 357 | CoreGraphics.framework 358 | path 359 | System/Library/Frameworks/CoreGraphics.framework 360 | sourceTree 361 | SDKROOT 362 | 363 | 6003F590195388D20070C39A 364 | 365 | fileRef 366 | 6003F58F195388D20070C39A 367 | isa 368 | PBXBuildFile 369 | 370 | 6003F591195388D20070C39A 371 | 372 | isa 373 | PBXFileReference 374 | lastKnownFileType 375 | wrapper.framework 376 | name 377 | UIKit.framework 378 | path 379 | System/Library/Frameworks/UIKit.framework 380 | sourceTree 381 | SDKROOT 382 | 383 | 6003F592195388D20070C39A 384 | 385 | fileRef 386 | 6003F591195388D20070C39A 387 | isa 388 | PBXBuildFile 389 | 390 | 6003F593195388D20070C39A 391 | 392 | children 393 | 394 | 6003F59C195388D20070C39A 395 | 6003F59D195388D20070C39A 396 | 6003F59F195388D20070C39A 397 | 6003F5A2195388D20070C39A 398 | 6003F5A5195388D20070C39A 399 | 6003F5A6195388D20070C39A 400 | 6003F5A8195388D20070C39A 401 | 6003F594195388D20070C39A 402 | 403 | isa 404 | PBXGroup 405 | path 406 | MLFlyOverMenu 407 | sourceTree 408 | <group> 409 | 410 | 6003F594195388D20070C39A 411 | 412 | children 413 | 414 | 6003F595195388D20070C39A 415 | 6003F596195388D20070C39A 416 | 6003F599195388D20070C39A 417 | 6003F59B195388D20070C39A 418 | 419 | isa 420 | PBXGroup 421 | name 422 | Supporting Files 423 | sourceTree 424 | <group> 425 | 426 | 6003F595195388D20070C39A 427 | 428 | isa 429 | PBXFileReference 430 | lastKnownFileType 431 | text.plist.xml 432 | path 433 | MLFlyOverMenu-Info.plist 434 | sourceTree 435 | <group> 436 | 437 | 6003F596195388D20070C39A 438 | 439 | children 440 | 441 | 6003F597195388D20070C39A 442 | 443 | isa 444 | PBXVariantGroup 445 | name 446 | InfoPlist.strings 447 | sourceTree 448 | <group> 449 | 450 | 6003F597195388D20070C39A 451 | 452 | isa 453 | PBXFileReference 454 | lastKnownFileType 455 | text.plist.strings 456 | name 457 | en 458 | path 459 | en.lproj/InfoPlist.strings 460 | sourceTree 461 | <group> 462 | 463 | 6003F598195388D20070C39A 464 | 465 | fileRef 466 | 6003F596195388D20070C39A 467 | isa 468 | PBXBuildFile 469 | 470 | 6003F599195388D20070C39A 471 | 472 | isa 473 | PBXFileReference 474 | lastKnownFileType 475 | sourcecode.c.objc 476 | path 477 | main.m 478 | sourceTree 479 | <group> 480 | 481 | 6003F59A195388D20070C39A 482 | 483 | fileRef 484 | 6003F599195388D20070C39A 485 | isa 486 | PBXBuildFile 487 | 488 | 6003F59B195388D20070C39A 489 | 490 | isa 491 | PBXFileReference 492 | lastKnownFileType 493 | sourcecode.c.h 494 | path 495 | MLFlyOverMenu-Prefix.pch 496 | sourceTree 497 | <group> 498 | 499 | 6003F59C195388D20070C39A 500 | 501 | isa 502 | PBXFileReference 503 | lastKnownFileType 504 | sourcecode.c.h 505 | path 506 | MLAppDelegate.h 507 | sourceTree 508 | <group> 509 | 510 | 6003F59D195388D20070C39A 511 | 512 | isa 513 | PBXFileReference 514 | lastKnownFileType 515 | sourcecode.c.objc 516 | path 517 | MLAppDelegate.m 518 | sourceTree 519 | <group> 520 | 521 | 6003F59E195388D20070C39A 522 | 523 | fileRef 524 | 6003F59D195388D20070C39A 525 | isa 526 | PBXBuildFile 527 | 528 | 6003F59F195388D20070C39A 529 | 530 | children 531 | 532 | 6003F5A0195388D20070C39A 533 | 534 | isa 535 | PBXVariantGroup 536 | name 537 | Main_iPhone.storyboard 538 | sourceTree 539 | <group> 540 | 541 | 6003F5A0195388D20070C39A 542 | 543 | isa 544 | PBXFileReference 545 | lastKnownFileType 546 | file.storyboard 547 | name 548 | Base 549 | path 550 | Base.lproj/Main_iPhone.storyboard 551 | sourceTree 552 | <group> 553 | 554 | 6003F5A1195388D20070C39A 555 | 556 | fileRef 557 | 6003F59F195388D20070C39A 558 | isa 559 | PBXBuildFile 560 | 561 | 6003F5A2195388D20070C39A 562 | 563 | children 564 | 565 | 6003F5A3195388D20070C39A 566 | 567 | isa 568 | PBXVariantGroup 569 | name 570 | Main_iPad.storyboard 571 | sourceTree 572 | <group> 573 | 574 | 6003F5A3195388D20070C39A 575 | 576 | isa 577 | PBXFileReference 578 | lastKnownFileType 579 | file.storyboard 580 | name 581 | Base 582 | path 583 | Base.lproj/Main_iPad.storyboard 584 | sourceTree 585 | <group> 586 | 587 | 6003F5A4195388D20070C39A 588 | 589 | fileRef 590 | 6003F5A2195388D20070C39A 591 | isa 592 | PBXBuildFile 593 | 594 | 6003F5A5195388D20070C39A 595 | 596 | isa 597 | PBXFileReference 598 | lastKnownFileType 599 | sourcecode.c.h 600 | path 601 | MLViewController.h 602 | sourceTree 603 | <group> 604 | 605 | 6003F5A6195388D20070C39A 606 | 607 | isa 608 | PBXFileReference 609 | lastKnownFileType 610 | sourcecode.c.objc 611 | path 612 | MLViewController.m 613 | sourceTree 614 | <group> 615 | 616 | 6003F5A7195388D20070C39A 617 | 618 | fileRef 619 | 6003F5A6195388D20070C39A 620 | isa 621 | PBXBuildFile 622 | 623 | 6003F5A8195388D20070C39A 624 | 625 | isa 626 | PBXFileReference 627 | lastKnownFileType 628 | folder.assetcatalog 629 | path 630 | Images.xcassets 631 | sourceTree 632 | <group> 633 | 634 | 6003F5A9195388D20070C39A 635 | 636 | fileRef 637 | 6003F5A8195388D20070C39A 638 | isa 639 | PBXBuildFile 640 | 641 | 6003F5AA195388D20070C39A 642 | 643 | buildActionMask 644 | 2147483647 645 | files 646 | 647 | 6003F5BC195388D20070C39A 648 | 649 | isa 650 | PBXSourcesBuildPhase 651 | runOnlyForDeploymentPostprocessing 652 | 0 653 | 654 | 6003F5AB195388D20070C39A 655 | 656 | buildActionMask 657 | 2147483647 658 | files 659 | 660 | 6003F5B0195388D20070C39A 661 | 6003F5B2195388D20070C39A 662 | 6003F5B1195388D20070C39A 663 | 33FD66B4006D44EFB6E2C984 664 | 665 | isa 666 | PBXFrameworksBuildPhase 667 | runOnlyForDeploymentPostprocessing 668 | 0 669 | 670 | 6003F5AC195388D20070C39A 671 | 672 | buildActionMask 673 | 2147483647 674 | files 675 | 676 | 6003F5BA195388D20070C39A 677 | 678 | isa 679 | PBXResourcesBuildPhase 680 | runOnlyForDeploymentPostprocessing 681 | 0 682 | 683 | 6003F5AD195388D20070C39A 684 | 685 | buildConfigurationList 686 | 6003F5C2195388D20070C39A 687 | buildPhases 688 | 689 | E6C63436F8FC40C79E7E974F 690 | 6003F5AA195388D20070C39A 691 | 6003F5AB195388D20070C39A 692 | 6003F5AC195388D20070C39A 693 | 4DBCE2A4958F4036A5F49557 694 | 695 | buildRules 696 | 697 | dependencies 698 | 699 | 6003F5B4195388D20070C39A 700 | 701 | isa 702 | PBXNativeTarget 703 | name 704 | Tests 705 | productName 706 | MLFlyOverMenuTests 707 | productReference 708 | 6003F5AE195388D20070C39A 709 | productType 710 | com.apple.product-type.bundle.unit-test 711 | 712 | 6003F5AE195388D20070C39A 713 | 714 | explicitFileType 715 | wrapper.cfbundle 716 | includeInIndex 717 | 0 718 | isa 719 | PBXFileReference 720 | path 721 | Tests.xctest 722 | sourceTree 723 | BUILT_PRODUCTS_DIR 724 | 725 | 6003F5AF195388D20070C39A 726 | 727 | isa 728 | PBXFileReference 729 | lastKnownFileType 730 | wrapper.framework 731 | name 732 | XCTest.framework 733 | path 734 | Library/Frameworks/XCTest.framework 735 | sourceTree 736 | DEVELOPER_DIR 737 | 738 | 6003F5B0195388D20070C39A 739 | 740 | fileRef 741 | 6003F5AF195388D20070C39A 742 | isa 743 | PBXBuildFile 744 | 745 | 6003F5B1195388D20070C39A 746 | 747 | fileRef 748 | 6003F58D195388D20070C39A 749 | isa 750 | PBXBuildFile 751 | 752 | 6003F5B2195388D20070C39A 753 | 754 | fileRef 755 | 6003F591195388D20070C39A 756 | isa 757 | PBXBuildFile 758 | 759 | 6003F5B3195388D20070C39A 760 | 761 | containerPortal 762 | 6003F582195388D10070C39A 763 | isa 764 | PBXContainerItemProxy 765 | proxyType 766 | 1 767 | remoteGlobalIDString 768 | 6003F589195388D20070C39A 769 | remoteInfo 770 | MLFlyOverMenu 771 | 772 | 6003F5B4195388D20070C39A 773 | 774 | isa 775 | PBXTargetDependency 776 | target 777 | 6003F589195388D20070C39A 778 | targetProxy 779 | 6003F5B3195388D20070C39A 780 | 781 | 6003F5B5195388D20070C39A 782 | 783 | children 784 | 785 | 6003F5BB195388D20070C39A 786 | 6003F5B6195388D20070C39A 787 | 788 | isa 789 | PBXGroup 790 | path 791 | Tests 792 | sourceTree 793 | <group> 794 | 795 | 6003F5B6195388D20070C39A 796 | 797 | children 798 | 799 | 6003F5B7195388D20070C39A 800 | 6003F5B8195388D20070C39A 801 | 606FC2411953D9B200FFA9A0 802 | 803 | isa 804 | PBXGroup 805 | name 806 | Supporting Files 807 | sourceTree 808 | <group> 809 | 810 | 6003F5B7195388D20070C39A 811 | 812 | isa 813 | PBXFileReference 814 | lastKnownFileType 815 | text.plist.xml 816 | path 817 | Tests-Info.plist 818 | sourceTree 819 | <group> 820 | 821 | 6003F5B8195388D20070C39A 822 | 823 | children 824 | 825 | 6003F5B9195388D20070C39A 826 | 827 | isa 828 | PBXVariantGroup 829 | name 830 | InfoPlist.strings 831 | sourceTree 832 | <group> 833 | 834 | 6003F5B9195388D20070C39A 835 | 836 | isa 837 | PBXFileReference 838 | lastKnownFileType 839 | text.plist.strings 840 | name 841 | en 842 | path 843 | en.lproj/InfoPlist.strings 844 | sourceTree 845 | <group> 846 | 847 | 6003F5BA195388D20070C39A 848 | 849 | fileRef 850 | 6003F5B8195388D20070C39A 851 | isa 852 | PBXBuildFile 853 | 854 | 6003F5BB195388D20070C39A 855 | 856 | isa 857 | PBXFileReference 858 | lastKnownFileType 859 | sourcecode.c.objc 860 | path 861 | Tests.m 862 | sourceTree 863 | <group> 864 | 865 | 6003F5BC195388D20070C39A 866 | 867 | fileRef 868 | 6003F5BB195388D20070C39A 869 | isa 870 | PBXBuildFile 871 | 872 | 6003F5BD195388D20070C39A 873 | 874 | buildSettings 875 | 876 | ALWAYS_SEARCH_USER_PATHS 877 | NO 878 | CLANG_CXX_LANGUAGE_STANDARD 879 | gnu++0x 880 | CLANG_CXX_LIBRARY 881 | libc++ 882 | CLANG_ENABLE_MODULES 883 | YES 884 | CLANG_ENABLE_OBJC_ARC 885 | YES 886 | CLANG_WARN_BOOL_CONVERSION 887 | YES 888 | CLANG_WARN_CONSTANT_CONVERSION 889 | YES 890 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 891 | YES_ERROR 892 | CLANG_WARN_EMPTY_BODY 893 | YES 894 | CLANG_WARN_ENUM_CONVERSION 895 | YES 896 | CLANG_WARN_INT_CONVERSION 897 | YES 898 | CLANG_WARN_OBJC_ROOT_CLASS 899 | YES_ERROR 900 | CLANG_WARN__DUPLICATE_METHOD_MATCH 901 | YES 902 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 903 | iPhone Developer 904 | COPY_PHASE_STRIP 905 | NO 906 | GCC_C_LANGUAGE_STANDARD 907 | gnu99 908 | GCC_DYNAMIC_NO_PIC 909 | NO 910 | GCC_OPTIMIZATION_LEVEL 911 | 0 912 | GCC_PREPROCESSOR_DEFINITIONS 913 | 914 | DEBUG=1 915 | $(inherited) 916 | 917 | GCC_SYMBOLS_PRIVATE_EXTERN 918 | NO 919 | GCC_WARN_64_TO_32_BIT_CONVERSION 920 | YES 921 | GCC_WARN_ABOUT_RETURN_TYPE 922 | YES_ERROR 923 | GCC_WARN_UNDECLARED_SELECTOR 924 | YES 925 | GCC_WARN_UNINITIALIZED_AUTOS 926 | YES_AGGRESSIVE 927 | GCC_WARN_UNUSED_FUNCTION 928 | YES 929 | GCC_WARN_UNUSED_VARIABLE 930 | YES 931 | IPHONEOS_DEPLOYMENT_TARGET 932 | 7.1 933 | ONLY_ACTIVE_ARCH 934 | YES 935 | SDKROOT 936 | iphoneos 937 | TARGETED_DEVICE_FAMILY 938 | 1,2 939 | 940 | isa 941 | XCBuildConfiguration 942 | name 943 | Debug 944 | 945 | 6003F5BE195388D20070C39A 946 | 947 | buildSettings 948 | 949 | ALWAYS_SEARCH_USER_PATHS 950 | NO 951 | CLANG_CXX_LANGUAGE_STANDARD 952 | gnu++0x 953 | CLANG_CXX_LIBRARY 954 | libc++ 955 | CLANG_ENABLE_MODULES 956 | YES 957 | CLANG_ENABLE_OBJC_ARC 958 | YES 959 | CLANG_WARN_BOOL_CONVERSION 960 | YES 961 | CLANG_WARN_CONSTANT_CONVERSION 962 | YES 963 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 964 | YES_ERROR 965 | CLANG_WARN_EMPTY_BODY 966 | YES 967 | CLANG_WARN_ENUM_CONVERSION 968 | YES 969 | CLANG_WARN_INT_CONVERSION 970 | YES 971 | CLANG_WARN_OBJC_ROOT_CLASS 972 | YES_ERROR 973 | CLANG_WARN__DUPLICATE_METHOD_MATCH 974 | YES 975 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 976 | iPhone Developer 977 | COPY_PHASE_STRIP 978 | YES 979 | ENABLE_NS_ASSERTIONS 980 | NO 981 | GCC_C_LANGUAGE_STANDARD 982 | gnu99 983 | GCC_WARN_64_TO_32_BIT_CONVERSION 984 | YES 985 | GCC_WARN_ABOUT_RETURN_TYPE 986 | YES_ERROR 987 | GCC_WARN_UNDECLARED_SELECTOR 988 | YES 989 | GCC_WARN_UNINITIALIZED_AUTOS 990 | YES_AGGRESSIVE 991 | GCC_WARN_UNUSED_FUNCTION 992 | YES 993 | GCC_WARN_UNUSED_VARIABLE 994 | YES 995 | IPHONEOS_DEPLOYMENT_TARGET 996 | 7.1 997 | SDKROOT 998 | iphoneos 999 | TARGETED_DEVICE_FAMILY 1000 | 1,2 1001 | VALIDATE_PRODUCT 1002 | YES 1003 | 1004 | isa 1005 | XCBuildConfiguration 1006 | name 1007 | Release 1008 | 1009 | 6003F5BF195388D20070C39A 1010 | 1011 | buildConfigurations 1012 | 1013 | 6003F5C0195388D20070C39A 1014 | 6003F5C1195388D20070C39A 1015 | 1016 | defaultConfigurationIsVisible 1017 | 0 1018 | defaultConfigurationName 1019 | Release 1020 | isa 1021 | XCConfigurationList 1022 | 1023 | 6003F5C0195388D20070C39A 1024 | 1025 | baseConfigurationReference 1026 | D87F3CF93170F7F1A4828316 1027 | buildSettings 1028 | 1029 | ASSETCATALOG_COMPILER_APPICON_NAME 1030 | AppIcon 1031 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME 1032 | LaunchImage 1033 | GCC_PRECOMPILE_PREFIX_HEADER 1034 | YES 1035 | GCC_PREFIX_HEADER 1036 | MLFlyOverMenu/MLFlyOverMenu-Prefix.pch 1037 | INFOPLIST_FILE 1038 | MLFlyOverMenu/MLFlyOverMenu-Info.plist 1039 | PRODUCT_NAME 1040 | $(TARGET_NAME) 1041 | WRAPPER_EXTENSION 1042 | app 1043 | 1044 | isa 1045 | XCBuildConfiguration 1046 | name 1047 | Debug 1048 | 1049 | 6003F5C1195388D20070C39A 1050 | 1051 | baseConfigurationReference 1052 | 6594C3971422FC1618A4CED8 1053 | buildSettings 1054 | 1055 | ASSETCATALOG_COMPILER_APPICON_NAME 1056 | AppIcon 1057 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME 1058 | LaunchImage 1059 | GCC_PRECOMPILE_PREFIX_HEADER 1060 | YES 1061 | GCC_PREFIX_HEADER 1062 | MLFlyOverMenu/MLFlyOverMenu-Prefix.pch 1063 | INFOPLIST_FILE 1064 | MLFlyOverMenu/MLFlyOverMenu-Info.plist 1065 | PRODUCT_NAME 1066 | $(TARGET_NAME) 1067 | WRAPPER_EXTENSION 1068 | app 1069 | 1070 | isa 1071 | XCBuildConfiguration 1072 | name 1073 | Release 1074 | 1075 | 6003F5C2195388D20070C39A 1076 | 1077 | buildConfigurations 1078 | 1079 | 6003F5C3195388D20070C39A 1080 | 6003F5C4195388D20070C39A 1081 | 1082 | defaultConfigurationIsVisible 1083 | 0 1084 | defaultConfigurationName 1085 | Release 1086 | isa 1087 | XCConfigurationList 1088 | 1089 | 6003F5C3195388D20070C39A 1090 | 1091 | baseConfigurationReference 1092 | 402686F58628F0A3D0368412 1093 | buildSettings 1094 | 1095 | BUNDLE_LOADER 1096 | $(BUILT_PRODUCTS_DIR)/MLFlyOverMenu.app/MLFlyOverMenu 1097 | FRAMEWORK_SEARCH_PATHS 1098 | 1099 | $(SDKROOT)/Developer/Library/Frameworks 1100 | $(inherited) 1101 | $(DEVELOPER_FRAMEWORKS_DIR) 1102 | 1103 | GCC_PRECOMPILE_PREFIX_HEADER 1104 | YES 1105 | GCC_PREFIX_HEADER 1106 | Tests/Tests-Prefix.pch 1107 | GCC_PREPROCESSOR_DEFINITIONS 1108 | 1109 | DEBUG=1 1110 | $(inherited) 1111 | 1112 | INFOPLIST_FILE 1113 | Tests/Tests-Info.plist 1114 | PRODUCT_NAME 1115 | $(TARGET_NAME) 1116 | TEST_HOST 1117 | $(BUNDLE_LOADER) 1118 | WRAPPER_EXTENSION 1119 | xctest 1120 | 1121 | isa 1122 | XCBuildConfiguration 1123 | name 1124 | Debug 1125 | 1126 | 6003F5C4195388D20070C39A 1127 | 1128 | baseConfigurationReference 1129 | D6BDC7DD035D9EDBD96A1CCE 1130 | buildSettings 1131 | 1132 | BUNDLE_LOADER 1133 | $(BUILT_PRODUCTS_DIR)/MLFlyOverMenu.app/MLFlyOverMenu 1134 | FRAMEWORK_SEARCH_PATHS 1135 | 1136 | $(SDKROOT)/Developer/Library/Frameworks 1137 | $(inherited) 1138 | $(DEVELOPER_FRAMEWORKS_DIR) 1139 | 1140 | GCC_PRECOMPILE_PREFIX_HEADER 1141 | YES 1142 | GCC_PREFIX_HEADER 1143 | Tests/Tests-Prefix.pch 1144 | INFOPLIST_FILE 1145 | Tests/Tests-Info.plist 1146 | PRODUCT_NAME 1147 | $(TARGET_NAME) 1148 | TEST_HOST 1149 | $(BUNDLE_LOADER) 1150 | WRAPPER_EXTENSION 1151 | xctest 1152 | 1153 | isa 1154 | XCBuildConfiguration 1155 | name 1156 | Release 1157 | 1158 | 606FC2411953D9B200FFA9A0 1159 | 1160 | isa 1161 | PBXFileReference 1162 | lastKnownFileType 1163 | sourcecode.c.h 1164 | path 1165 | Tests-Prefix.pch 1166 | sourceTree 1167 | <group> 1168 | 1169 | 60FF7A9C1954A5C5007DD14C 1170 | 1171 | children 1172 | 1173 | 54A8FE1EF23646C6B64623C9 1174 | 1475F353DF654810A4B365AD 1175 | C4C1D6DFA4BB4586AD9D4E8C 1176 | D06E996719B0DCAE000955D9 1177 | D06E996819B0DCAE000955D9 1178 | 1179 | isa 1180 | PBXGroup 1181 | name 1182 | Podspec Metadata 1183 | sourceTree 1184 | <group> 1185 | 1186 | 6594C3971422FC1618A4CED8 1187 | 1188 | includeInIndex 1189 | 1 1190 | isa 1191 | PBXFileReference 1192 | lastKnownFileType 1193 | text.xcconfig 1194 | name 1195 | Pods-MLFlyOverMenu.release.xcconfig 1196 | path 1197 | Pods/Target Support Files/Pods-MLFlyOverMenu/Pods-MLFlyOverMenu.release.xcconfig 1198 | sourceTree 1199 | <group> 1200 | 1201 | AC690E2F1B8E485AA7C5D5A8 1202 | 1203 | buildActionMask 1204 | 2147483647 1205 | files 1206 | 1207 | inputPaths 1208 | 1209 | isa 1210 | PBXShellScriptBuildPhase 1211 | name 1212 | Check Pods Manifest.lock 1213 | outputPaths 1214 | 1215 | runOnlyForDeploymentPostprocessing 1216 | 0 1217 | shellPath 1218 | /bin/sh 1219 | shellScript 1220 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 1221 | if [[ $? != 0 ]] ; then 1222 | cat << EOM 1223 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 1224 | EOM 1225 | exit 1 1226 | fi 1227 | 1228 | showEnvVarsInLog 1229 | 0 1230 | 1231 | B3CF35C0DB1343C391106711 1232 | 1233 | buildActionMask 1234 | 2147483647 1235 | files 1236 | 1237 | inputPaths 1238 | 1239 | isa 1240 | PBXShellScriptBuildPhase 1241 | name 1242 | Copy Pods Resources 1243 | outputPaths 1244 | 1245 | runOnlyForDeploymentPostprocessing 1246 | 0 1247 | shellPath 1248 | /bin/sh 1249 | shellScript 1250 | "${SRCROOT}/Pods/Target Support Files/Pods-MLFlyOverMenu/Pods-MLFlyOverMenu-resources.sh" 1251 | 1252 | showEnvVarsInLog 1253 | 0 1254 | 1255 | C4C1D6DFA4BB4586AD9D4E8C 1256 | 1257 | includeInIndex 1258 | 1 1259 | isa 1260 | PBXFileReference 1261 | lastKnownFileType 1262 | text 1263 | name 1264 | LICENSE 1265 | path 1266 | ../LICENSE 1267 | sourceTree 1268 | <group> 1269 | 1270 | D06E996719B0DCAE000955D9 1271 | 1272 | fileEncoding 1273 | 4 1274 | isa 1275 | PBXFileReference 1276 | lastKnownFileType 1277 | sourcecode.c.h 1278 | name 1279 | MLFlyOverMenuController.h 1280 | path 1281 | ../Pod/Classes/MLFlyOverMenuController.h 1282 | sourceTree 1283 | <group> 1284 | 1285 | D06E996819B0DCAE000955D9 1286 | 1287 | fileEncoding 1288 | 4 1289 | isa 1290 | PBXFileReference 1291 | lastKnownFileType 1292 | sourcecode.c.objc 1293 | name 1294 | MLFlyOverMenuController.m 1295 | path 1296 | ../Pod/Classes/MLFlyOverMenuController.m 1297 | sourceTree 1298 | <group> 1299 | 1300 | D6BDC7DD035D9EDBD96A1CCE 1301 | 1302 | includeInIndex 1303 | 1 1304 | isa 1305 | PBXFileReference 1306 | lastKnownFileType 1307 | text.xcconfig 1308 | name 1309 | Pods-Tests.release.xcconfig 1310 | path 1311 | Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig 1312 | sourceTree 1313 | <group> 1314 | 1315 | D87F3CF93170F7F1A4828316 1316 | 1317 | includeInIndex 1318 | 1 1319 | isa 1320 | PBXFileReference 1321 | lastKnownFileType 1322 | text.xcconfig 1323 | name 1324 | Pods-MLFlyOverMenu.debug.xcconfig 1325 | path 1326 | Pods/Target Support Files/Pods-MLFlyOverMenu/Pods-MLFlyOverMenu.debug.xcconfig 1327 | sourceTree 1328 | <group> 1329 | 1330 | E6C63436F8FC40C79E7E974F 1331 | 1332 | buildActionMask 1333 | 2147483647 1334 | files 1335 | 1336 | inputPaths 1337 | 1338 | isa 1339 | PBXShellScriptBuildPhase 1340 | name 1341 | Check Pods Manifest.lock 1342 | outputPaths 1343 | 1344 | runOnlyForDeploymentPostprocessing 1345 | 0 1346 | shellPath 1347 | /bin/sh 1348 | shellScript 1349 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 1350 | if [[ $? != 0 ]] ; then 1351 | cat << EOM 1352 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 1353 | EOM 1354 | exit 1 1355 | fi 1356 | 1357 | showEnvVarsInLog 1358 | 0 1359 | 1360 | F521736E088E4C33948E2752 1361 | 1362 | fileRef 1363 | 1988DF2EBC654B85BB47F14E 1364 | isa 1365 | PBXBuildFile 1366 | 1367 | 1368 | rootObject 1369 | 6003F582195388D10070C39A 1370 | 1371 | 1372 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu.xcodeproj/xcshareddata/xcschemes/MLFlyOverMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Base.lproj/Main_iPad.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 | 45 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Base.lproj/Main_iPad.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "IBUIButton"; normalTitle = "TOGGLE"; ObjectID = "8Vv-dg-GGv"; */ 3 | "8Vv-dg-GGv.normalTitle" = "TOGGLE"; 4 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Base.lproj/Main_iPhone.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 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Base.lproj/Main_iPhone.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "IBUIButton"; normalTitle = "TOGGLE"; ObjectID = "PZ1-EY-Cif"; */ 3 | "PZ1-EY-Cif.normalTitle" = "TOGGLE"; 4 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Images.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" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLAppDelegate.h 3 | // MLFlyOverMenu 4 | // 5 | // Created by CocoaPods on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLAppDelegate.m 3 | // MLFlyOverMenu 4 | // 5 | // Created by CocoaPods on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import "MLAppDelegate.h" 10 | 11 | @implementation MLAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 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 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLFlyOverMenu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | ru.mustlab.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | UIInterfaceOrientationPortraitUpsideDown 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLFlyOverMenu-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLViewController.h 3 | // MLFlyOverMenu 4 | // 5 | // Created by MUSTLab on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MLViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/MLViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLViewController.m 3 | // MLFlyOverMenu 4 | // 5 | // Created by MUSTLab on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import "MLFlyOverMenuController.h" 10 | 11 | #import "MLViewController.h" 12 | 13 | @interface MLViewController () 14 | 15 | @end 16 | 17 | @implementation MLViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | } 23 | 24 | - (void)didReceiveMemoryWarning 25 | { 26 | [super didReceiveMemoryWarning]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/MLFlyOverMenu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MLFlyOverMenu 4 | // 5 | // Created by MUSTLab on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MLAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MLAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | target 'MLFlyOverMenu', :exclusive => true do 2 | pod "MLFlyOverMenu", :path => "../" 3 | end 4 | 5 | target 'Tests', :exclusive => true do 6 | pod "MLFlyOverMenu", :path => "../" 7 | 8 | pod 'Specta', '~> 0.2.1' 9 | pod 'Expecta' 10 | pod 'FBSnapshotTestCase' 11 | pod 'Expecta+Snapshots' 12 | end 13 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every test case source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #define EXP_SHORTHAND 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLFlyOverMenuTests.m 3 | // MLFlyOverMenuTests 4 | // 5 | // Created by MUSTLab on 08/29/2014. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | SpecBegin(InitialSpecs) 10 | 11 | describe(@"these will fail", ^{ 12 | 13 | it(@"can do maths", ^{ 14 | expect(1).to.equal(2); 15 | }); 16 | 17 | it(@"can read", ^{ 18 | expect(@"number").to.equal(@"string"); 19 | }); 20 | 21 | it(@"will wait and fail", ^AsyncBlock { 22 | 23 | }); 24 | }); 25 | 26 | describe(@"these will pass", ^{ 27 | 28 | it(@"can do maths", ^{ 29 | expect(1).beLessThan(23); 30 | }); 31 | 32 | it(@"can read", ^{ 33 | expect(@"team").toNot.contain(@"I"); 34 | }); 35 | 36 | it(@"will wait and succeed", ^AsyncBlock { 37 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ 38 | done(); 39 | }); 40 | }); 41 | }); 42 | 43 | SpecEnd 44 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 MUSTLab 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /MLFlyOverMenu.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "MLFlyOverMenu" 3 | s.version = "0.1.2" 4 | s.summary = "A lightweight and convenient way of presenting a view controller inspired by UIPopoverController and SWRevealViewController." 5 | s.description = "A lightweight and convenient way of presenting a view controller inspired by UIPopoverController and SWRevealViewController. Highly customizable. Full initialization and customization from a storyboard." 6 | s.homepage = "https://github.com/MUSTLaboratory/MLFlyOverMenu" 7 | s.screenshots = "https://camo.githubusercontent.com/8afab5f2c8c3c2788ba56d146b2c207706476203/68747470733a2f2f6269746275636b65742e6f72672f7265706f2f6f726e6535412f696d616765732f333631383437373336302d6d6c666c796f7665725f64656d6f2e676966" 8 | s.license = 'MIT' 9 | s.author = { "MUSTLab Developer" => "hello@mustlab.ru" } 10 | s.source = { :git => "https://github.com/MUSTLaboratory/MLFlyOverMenu.git", :tag => '0.1.2' } 11 | 12 | s.platform = :ios, '6.0' 13 | s.requires_arc = true 14 | 15 | s.source_files = 'Pod/Classes' 16 | s.resource_bundles = { 17 | 'MLFlyOverMenu' => ['Pod/Assets/*.png'] 18 | } 19 | 20 | s.public_header_files = 'Pod/Classes/**/*.h' 21 | s.frameworks = 'UIKit' 22 | end 23 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MUSTLaboratory/MLFlyOverMenu/da375c17c2cfff558def7120f77f865ff20f9d28/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MUSTLaboratory/MLFlyOverMenu/da375c17c2cfff558def7120f77f865ff20f9d28/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/MLFlyOverMenuController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MLFlyOverMenuController.h 3 | // MLFlyOverMenu 4 | // 5 | // Created by iOS Developer on 29.08.14. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static const CGFloat MLFlyOverMenuControllerAnimationDuration; 12 | 13 | typedef enum : NSUInteger { 14 | MLFlyOverMenuDirectionFromLeft, 15 | MLFlyOverMenuDirectionFromRight, 16 | MLFlyOverMenuDirectionFromTop, 17 | MLFlyOverMenuDirectionFromBottom 18 | } MLFlyOverMenuDirection; 19 | 20 | @interface MLFlyOverMenuController : NSObject 21 | 22 | @property (nonatomic, strong) UIViewController *contentViewController; 23 | @property (nonatomic, strong, readonly) UIViewController *presentingViewController; 24 | @property (nonatomic, assign) UIEdgeInsets contentInsets; 25 | @property (nonatomic, assign) BOOL aboveBars; 26 | 27 | + (instancetype)flyOverMenuController; 28 | 29 | + (instancetype)flyOverMenuControllerWithContentViewController:(UIViewController *)viewController; 30 | 31 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController; 32 | 33 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController animated:(BOOL)animated; 34 | 35 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController 36 | withDirection:(MLFlyOverMenuDirection)direction 37 | animated:(BOOL)animated; 38 | 39 | - (void)dismiss; 40 | 41 | - (void)dismissAnimated:(BOOL)animated; 42 | 43 | @end 44 | 45 | #pragma mark - Segues 46 | 47 | extern NSString * const MLFlyOverMenuPresentSegueLeftIdentifier;//ml_from_left 48 | extern NSString * const MLFlyOverMenuPresentSegueRightIdentifier;//ml_from_right 49 | extern NSString * const MLFlyOverMenuPresentSegueTopIdentifier;//ml_from_top 50 | extern NSString * const MLFlyOverMenuPresentSegueBottomIdentifier;//ml_from_bottom 51 | 52 | @interface MLFlyOverMenuControllerPresentSegue : UIStoryboardSegue 53 | 54 | @end 55 | 56 | #pragma mark - Categories 57 | 58 | @interface UIViewController (MLFlyOverMenuController) 59 | 60 | @property (nonatomic, strong) IBOutlet MLFlyOverMenuController *flyOverMenuController; 61 | 62 | @property (nonatomic, copy) NSNumber *contentWidthInFlyOverMenu;//Can be set via IB User-defined runtime attributes 63 | @property (nonatomic, copy) NSNumber *contentHeightInFlyOverMenu;//Can be set via IB User-defined runtime attributes 64 | 65 | @end -------------------------------------------------------------------------------- /Pod/Classes/MLFlyOverMenuController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MLFlyOverMenuController.m 3 | // MLFlyOverMenu 4 | // 5 | // Created by iOS Developer on 29.08.14. 6 | // Copyright (c) 2014 MUSTLab. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MLFlyOverMenuController.h" 12 | 13 | #pragma mark - Constants 14 | 15 | static const CGFloat MLFlyOverMenuControllerAnimationDuration = 0.25; 16 | 17 | static const char kFlyOverMenuControllerKey; 18 | 19 | static const char kFlyOverMenuControllerContentWidthKey; 20 | 21 | static const char kFlyOverMenuControllerContentHeightKey; 22 | 23 | #pragma mark - Class extension 24 | 25 | @interface MLFlyOverMenuController () 26 | 27 | @property (nonatomic, strong) UIViewController *presentingViewController;//redefine as read-write 28 | 29 | @property (nonatomic, strong) UIView *contentView; 30 | 31 | @property (nonatomic, assign) MLFlyOverMenuDirection direction; 32 | 33 | @end 34 | 35 | #pragma mark - Class implementation 36 | 37 | @implementation MLFlyOverMenuController 38 | 39 | + (instancetype)flyOverMenuController 40 | { 41 | MLFlyOverMenuController *flyOverMenu = [self new]; 42 | 43 | return flyOverMenu; 44 | } 45 | 46 | + (instancetype)flyOverMenuControllerWithContentViewController:(UIViewController *)viewController 47 | { 48 | MLFlyOverMenuController *flyOverMenu = [self new]; 49 | 50 | flyOverMenu.contentViewController = viewController; 51 | 52 | return flyOverMenu; 53 | } 54 | 55 | - (instancetype)init 56 | { 57 | self = [super init]; 58 | 59 | if (self) { 60 | [self setup]; 61 | } 62 | 63 | return self; 64 | } 65 | 66 | - (void)awakeFromNib 67 | { 68 | [self setup]; 69 | } 70 | 71 | - (void)dealloc 72 | { 73 | [self dismiss]; 74 | } 75 | 76 | - (void)setup 77 | { 78 | 79 | } 80 | 81 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController; 82 | { 83 | [self presentFlyOverMenuInViewController:viewController animated:NO]; 84 | } 85 | 86 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController animated:(BOOL)animated 87 | { 88 | [self presentFlyOverMenuInViewController:viewController withDirection:MLFlyOverMenuDirectionFromLeft animated:animated]; 89 | } 90 | 91 | - (void)presentFlyOverMenuInViewController:(UIViewController *)viewController 92 | withDirection:(MLFlyOverMenuDirection)direction 93 | animated:(BOOL)animated 94 | { 95 | UIViewController *presentingViewController = viewController; 96 | 97 | if (self.aboveBars && ![presentingViewController isKindOfClass:UINavigationController.class]) { 98 | UINavigationController *navigationController = presentingViewController.navigationController; 99 | 100 | if (navigationController) { 101 | presentingViewController = navigationController; 102 | } 103 | } 104 | 105 | self.presentingViewController = presentingViewController; 106 | 107 | NSAssert(self.contentViewController != nil, @"content view controller is nil"); 108 | 109 | NSAssert(self.presentingViewController != nil, @"presenting view controller is nil"); 110 | 111 | self.direction = direction; 112 | 113 | __weak MLFlyOverMenuController *weakSelf = self; 114 | 115 | self.contentViewController.flyOverMenuController = weakSelf; 116 | 117 | [self setupContentView]; 118 | 119 | [self placeContentViewToInitialPosition]; 120 | 121 | [self deployViewController:self.contentViewController 122 | toHostViewController:self.presentingViewController]; 123 | 124 | void (^animations)() = ^() 125 | { 126 | [self placeContentViewToTargetPosition]; 127 | }; 128 | 129 | if (animated) { 130 | [UIView animateWithDuration:MLFlyOverMenuControllerAnimationDuration animations:animations]; 131 | } else { 132 | animations(); 133 | } 134 | } 135 | 136 | - (void)dismiss 137 | { 138 | [self dismissAnimated:NO]; 139 | } 140 | 141 | - (void)dismissAnimated:(BOOL)animated 142 | { 143 | if (!self.contentViewController || !self.presentingViewController) { 144 | return; 145 | } 146 | 147 | void (^undeployCompletionBlock)(void) = [self undeployViewController:self.contentViewController 148 | fromHostViewController:self.presentingViewController]; 149 | void (^completionBlock)() = ^() 150 | { 151 | [self.contentView removeFromSuperview]; 152 | self.contentView = nil; 153 | 154 | self.contentViewController.flyOverMenuController = nil; 155 | self.contentViewController = nil; 156 | }; 157 | 158 | void (^animations)() = ^() 159 | { 160 | [self placeContentViewToInitialPosition]; 161 | }; 162 | 163 | if (animated) { 164 | [UIView animateWithDuration:MLFlyOverMenuControllerAnimationDuration animations:animations completion:^(BOOL finished) { 165 | undeployCompletionBlock(); 166 | 167 | completionBlock(); 168 | }]; 169 | } else { 170 | animations(); 171 | 172 | undeployCompletionBlock(); 173 | 174 | completionBlock(); 175 | } 176 | } 177 | 178 | #pragma mark - Private methods 179 | 180 | - (void)setupContentView 181 | { 182 | CGRect presentingFrame = self.presentingViewController.view.bounds; 183 | 184 | CGFloat contentWidth = self.contentViewController.contentWidthInFlyOverMenu.floatValue; 185 | 186 | if (contentWidth <= 0) { 187 | contentWidth = presentingFrame.size.width; 188 | } 189 | 190 | contentWidth -= self.contentInsets.left + self.contentInsets.right; 191 | 192 | CGFloat contentHeight = self.contentViewController.contentHeightInFlyOverMenu.floatValue; 193 | BOOL staticHeight = (contentHeight > 0); 194 | 195 | if (contentHeight <= 0) { 196 | contentHeight = presentingFrame.size.height; 197 | } 198 | 199 | contentHeight -= self.contentInsets.top + self.contentInsets.bottom; 200 | 201 | self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0,0,contentWidth,contentHeight)]; 202 | self.contentView.autoresizingMask = 0; 203 | self.contentView.autoresizingMask = [self viewAutoresizingBasedOnDirection:self.direction staticHeight:staticHeight]; 204 | } 205 | 206 | - (UIViewAutoresizing)viewAutoresizingBasedOnDirection:(MLFlyOverMenuDirection)direction staticHeight:(BOOL)staticHeight 207 | { 208 | UIViewAutoresizing baseAutoresizingMask = (staticHeight) ? UIViewAutoresizingNone : UIViewAutoresizingFlexibleHeight; 209 | 210 | switch (self.direction) { 211 | case MLFlyOverMenuDirectionFromLeft: 212 | return baseAutoresizingMask | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; 213 | 214 | case MLFlyOverMenuDirectionFromRight: 215 | return baseAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; 216 | 217 | case MLFlyOverMenuDirectionFromTop: 218 | return baseAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin; 219 | 220 | case MLFlyOverMenuDirectionFromBottom: 221 | return baseAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin; 222 | 223 | default: 224 | return baseAutoresizingMask; 225 | } 226 | } 227 | 228 | - (void)placeContentViewToInitialPosition 229 | { 230 | CGRect contentViewFrame = self.contentView.frame; 231 | CGSize screenSize = self.presentingViewController.view.bounds.size; 232 | 233 | screenSize.width -= self.contentInsets.left + self.contentInsets.right; 234 | screenSize.height -= self.contentInsets.top + self.contentInsets.bottom; 235 | 236 | CGFloat viewX = 0, viewY = 0; 237 | 238 | switch (self.direction) { 239 | case MLFlyOverMenuDirectionFromLeft: 240 | viewX = -contentViewFrame.size.width; 241 | viewY = screenSize.height / 2 - contentViewFrame.size.height / 2; 242 | break; 243 | 244 | case MLFlyOverMenuDirectionFromRight: 245 | viewX = screenSize.width; 246 | viewY = screenSize.height / 2 - contentViewFrame.size.height / 2; 247 | break; 248 | 249 | case MLFlyOverMenuDirectionFromTop: 250 | viewX = screenSize.width / 2 - contentViewFrame.size.width / 2; 251 | viewY = -contentViewFrame.size.height; 252 | break; 253 | 254 | case MLFlyOverMenuDirectionFromBottom: 255 | viewX = screenSize.width / 2 - contentViewFrame.size.width / 2; 256 | viewY = screenSize.height; 257 | break; 258 | 259 | default: 260 | break; 261 | } 262 | 263 | viewX += self.contentInsets.left + self.contentInsets.right; 264 | viewY += self.contentInsets.top + self.contentInsets.bottom; 265 | 266 | contentViewFrame.origin = CGPointMake(viewX, viewY); 267 | self.contentView.frame = contentViewFrame; 268 | } 269 | 270 | - (void)placeContentViewToTargetPosition 271 | { 272 | CGRect contentViewFrame = self.contentView.frame; 273 | CGSize screenSize = self.presentingViewController.view.bounds.size; 274 | 275 | screenSize.width -= self.contentInsets.left + self.contentInsets.right; 276 | screenSize.height -= self.contentInsets.top + self.contentInsets.bottom; 277 | 278 | CGFloat viewX = 0, viewY = 0; 279 | 280 | switch (self.direction) { 281 | case MLFlyOverMenuDirectionFromLeft: 282 | viewX = 0; 283 | viewY = screenSize.height / 2 - contentViewFrame.size.height / 2; 284 | break; 285 | 286 | case MLFlyOverMenuDirectionFromRight: 287 | viewX = screenSize.width - contentViewFrame.size.width; 288 | viewY = screenSize.height / 2 - contentViewFrame.size.height / 2; 289 | break; 290 | 291 | case MLFlyOverMenuDirectionFromTop: 292 | viewX = screenSize.width / 2 - contentViewFrame.size.width / 2; 293 | viewY = 0; 294 | break; 295 | 296 | case MLFlyOverMenuDirectionFromBottom: 297 | viewX = screenSize.width / 2 - contentViewFrame.size.width / 2; 298 | viewY = screenSize.height - contentViewFrame.size.height; 299 | break; 300 | 301 | default: 302 | break; 303 | } 304 | 305 | viewX += self.contentInsets.left + self.contentInsets.right; 306 | viewY += self.contentInsets.top + self.contentInsets.bottom; 307 | 308 | contentViewFrame.origin = CGPointMake(viewX, viewY); 309 | self.contentView.frame = contentViewFrame; 310 | } 311 | 312 | - (void)deployViewController:(UIViewController *)viewController toHostViewController:(UIViewController *)hostViewController 313 | { 314 | [hostViewController.view addSubview:self.contentView]; 315 | 316 | [hostViewController addChildViewController:viewController]; 317 | 318 | CGRect frame = self.contentView.bounds; 319 | 320 | UIView *controllerView = viewController.view; 321 | controllerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 322 | controllerView.frame = frame; 323 | 324 | if ([viewController respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) { 325 | UIViewController *adjustViewController = viewController; 326 | 327 | if ([adjustViewController isKindOfClass:UINavigationController.class]) { 328 | adjustViewController = [(UINavigationController *)adjustViewController topViewController]; 329 | } 330 | 331 | BOOL adjust = (BOOL)[adjustViewController performSelector:@selector(automaticallyAdjustsScrollViewInsets) withObject:nil]; 332 | 333 | if (adjust) { 334 | CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; 335 | CGFloat statusBarHeight = fminf(statusBarFrame.size.width, statusBarFrame.size.height); 336 | CGFloat adjustment = hostViewController.navigationController.navigationBar.frame.size.height + statusBarHeight; 337 | 338 | if ([adjustViewController.view isKindOfClass:UIScrollView.class]) { 339 | [(id)adjustViewController.view setContentInset:UIEdgeInsetsMake(adjustment, 0, 0, 0)]; 340 | } 341 | } 342 | } 343 | 344 | [self.contentView addSubview:controllerView]; 345 | 346 | [viewController didMoveToParentViewController:hostViewController]; 347 | } 348 | 349 | - (void (^)(void))undeployViewController:(UIViewController *)viewController fromHostViewController:(UIViewController *)hostViewController 350 | { 351 | [viewController willMoveToParentViewController:nil]; 352 | 353 | void (^completionBlock)(void) = ^(void) 354 | { 355 | [self.contentViewController.view removeFromSuperview]; 356 | 357 | [self.contentViewController removeFromParentViewController]; 358 | 359 | self.presentingViewController = nil; 360 | }; 361 | 362 | return completionBlock; 363 | } 364 | 365 | @end 366 | 367 | #pragma mark - MLFlyOverMenuControllerPresentSegue Class 368 | 369 | NSString * const MLFlyOverMenuPresentSegueLeftIdentifier = @"ml_from_left"; 370 | NSString * const MLFlyOverMenuPresentSegueRightIdentifier = @"ml_from_right"; 371 | NSString * const MLFlyOverMenuPresentSegueTopIdentifier = @"ml_from_top"; 372 | NSString * const MLFlyOverMenuPresentSegueBottomIdentifier = @"ml_from_bottom"; 373 | 374 | @implementation MLFlyOverMenuControllerPresentSegue : UIStoryboardSegue 375 | 376 | - (void)perform 377 | { 378 | UIViewController *presentingViewController = self.sourceViewController; 379 | UIViewController *contentViewController = self.destinationViewController; 380 | 381 | MLFlyOverMenuController *flyOver = [presentingViewController flyOverMenuController]; 382 | 383 | if (flyOver.presentingViewController) { 384 | [flyOver dismissAnimated:YES]; 385 | } else { 386 | MLFlyOverMenuDirection direction = MLFlyOverMenuDirectionFromLeft; 387 | 388 | if ([self.identifier isEqualToString:MLFlyOverMenuPresentSegueLeftIdentifier]) { 389 | direction = MLFlyOverMenuDirectionFromLeft; 390 | } else if ([self.identifier isEqualToString:MLFlyOverMenuPresentSegueRightIdentifier]) { 391 | direction = MLFlyOverMenuDirectionFromRight; 392 | } else if ([self.identifier isEqualToString:MLFlyOverMenuPresentSegueTopIdentifier]) { 393 | direction = MLFlyOverMenuDirectionFromTop; 394 | } else if ([self.identifier isEqualToString:MLFlyOverMenuPresentSegueBottomIdentifier]) { 395 | direction = MLFlyOverMenuDirectionFromBottom; 396 | } 397 | 398 | flyOver.contentViewController = contentViewController; 399 | 400 | [flyOver presentFlyOverMenuInViewController:presentingViewController 401 | withDirection:direction 402 | animated:YES]; 403 | } 404 | } 405 | 406 | @end 407 | 408 | #pragma mark - Categories 409 | 410 | @implementation UIViewController (MLFlyOverMenuController) 411 | 412 | - (MLFlyOverMenuController *)flyOverMenuController 413 | { 414 | UIViewController *parent = self; 415 | 416 | MLFlyOverMenuController *flyOver = nil; 417 | 418 | Class flyOverMenuClass = [MLFlyOverMenuController class]; 419 | 420 | do { 421 | flyOver = objc_getAssociatedObject(parent, &kFlyOverMenuControllerKey); 422 | 423 | if (flyOver && [flyOver isKindOfClass:flyOverMenuClass]) { 424 | break; 425 | } 426 | } while (nil != (parent = [parent parentViewController])); 427 | 428 | return flyOver; 429 | } 430 | 431 | - (void)setFlyOverMenuController:(MLFlyOverMenuController *)flyOverMenuController 432 | { 433 | objc_setAssociatedObject(self, &kFlyOverMenuControllerKey, flyOverMenuController, OBJC_ASSOCIATION_ASSIGN); 434 | } 435 | 436 | - (NSNumber *)contentWidthInFlyOverMenu 437 | { 438 | return objc_getAssociatedObject(self, &kFlyOverMenuControllerContentWidthKey); 439 | } 440 | 441 | - (void)setContentWidthInFlyOverMenu:(NSNumber *)contentWidthInFlyOverMenu 442 | { 443 | objc_setAssociatedObject(self, &kFlyOverMenuControllerContentWidthKey, contentWidthInFlyOverMenu, OBJC_ASSOCIATION_COPY); 444 | } 445 | 446 | - (NSNumber *)contentHeightInFlyOverMenu 447 | { 448 | return objc_getAssociatedObject(self, &kFlyOverMenuControllerContentHeightKey); 449 | } 450 | 451 | - (void)setContentHeightInFlyOverMenu:(NSNumber *)contentHeightInFlyOverMenu 452 | { 453 | objc_setAssociatedObject(self, &kFlyOverMenuControllerContentHeightKey, contentHeightInFlyOverMenu, OBJC_ASSOCIATION_COPY); 454 | } 455 | 456 | @end 457 | 458 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MLFlyOverMenu 2 | 3 | [![CI Status](http://img.shields.io/travis/MUSTLaboratory/MLFlyOverMenu.svg?style=flat)](https://travis-ci.org/MUSTLaboratory/MLFlyOverMenu) 4 | [![Version](https://img.shields.io/cocoapods/v/MLFlyOverMenu.svg?style=flat)](http://cocoadocs.org/docsets/MLFlyOverMenu) 5 | [![License](https://img.shields.io/cocoapods/l/MLFlyOverMenu.svg?style=flat)](http://cocoadocs.org/docsets/MLFlyOverMenu) 6 | [![Platform](https://img.shields.io/cocoapods/p/MLFlyOverMenu.svg?style=flat)](http://cocoadocs.org/docsets/MLFlyOverMenu) 7 | 8 | ## About 9 | 10 | A simple flyover menu, which covers your view controller's content. It has configurable transitions and fully supports initialization from the Xcode Interface Builder without a line of code. 11 | 12 | ## Demo 13 | ![mlflyover_demo.gif](https://bitbucket.org/repo/orne5A/images/3618477360-mlflyover_demo.gif) 14 | 15 | ## Usage 16 | 17 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 18 | 19 | ## Requirements 20 | 21 | * iOS 6+ (compatible with iOS 8) 22 | * Xcode 5/6 23 | 24 | ## Installation 25 | 26 | MLFlyOverMenu is available through [CocoaPods](http://cocoapods.org). To install 27 | it, simply add the following line to your Podfile: 28 | 29 | pod "MLFlyOverMenu" 30 | 31 | ## Feedback 32 | 33 | Issues and pull requests are welcome. Thank you for using this control in your app. 34 | 35 | ## Author 36 | 37 | MUSTLab, hello@mustlab.ru 38 | 39 | ## License 40 | 41 | MLFlyOverMenu is available under the MIT license. See the LICENSE file for more info. 42 | --------------------------------------------------------------------------------