├── HLAlertController.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── string.xcuserdatad │ └── xcschemes │ ├── HLAlertController.xcscheme │ └── xcschememanagement.plist ├── HLAlertController.xcworkspace └── contents.xcworkspacedata ├── HLAlertController ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ViewController.h ├── ViewController.m └── main.m ├── Podfile ├── Podfile.lock ├── Pods ├── HLAlertController │ ├── HLAlertController │ │ ├── HLAlertController.h │ │ ├── HLAlertController.m │ │ ├── HLAlertTransition.h │ │ ├── HLAlertTransition.m │ │ ├── HLAlertTransitionController.h │ │ ├── HLAlertTransitionController.m │ │ ├── HLKeyboardNotificationCenter.h │ │ ├── HLKeyboardNotificationCenter.m │ │ ├── UIImage+HLColor.h │ │ ├── UIImage+HLColor.m │ │ ├── UITextField+HLAdd.h │ │ ├── UITextField+HLAdd.m │ │ ├── UIView+HLExtension.h │ │ └── UIView+HLExtension.m │ └── README.md ├── Headers │ ├── Private │ │ └── HLAlertController │ │ │ ├── HLAlertController.h │ │ │ ├── HLAlertTransition.h │ │ │ ├── HLAlertTransitionController.h │ │ │ ├── HLKeyboardNotificationCenter.h │ │ │ ├── UIImage+HLColor.h │ │ │ ├── UITextField+HLAdd.h │ │ │ └── UIView+HLExtension.h │ └── Public │ │ └── HLAlertController │ │ ├── HLAlertController.h │ │ ├── HLAlertTransition.h │ │ ├── HLAlertTransitionController.h │ │ ├── HLKeyboardNotificationCenter.h │ │ ├── UIImage+HLColor.h │ │ ├── UITextField+HLAdd.h │ │ └── UIView+HLExtension.h ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── string.xcuserdatad │ │ └── xcschemes │ │ ├── HLAlertController.xcscheme │ │ ├── Pods.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── HLAlertController │ ├── HLAlertController-dummy.m │ ├── HLAlertController-prefix.pch │ └── HLAlertController.xcconfig │ └── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-frameworks.sh │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig ├── README.md ├── snap1.PNG └── snap2.PNG /HLAlertController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 05E443E6D74919F32DACA853 14 | 15 | includeInIndex 16 | 1 17 | isa 18 | PBXFileReference 19 | lastKnownFileType 20 | text.xcconfig 21 | name 22 | Pods.release.xcconfig 23 | path 24 | Pods/Target Support Files/Pods/Pods.release.xcconfig 25 | sourceTree 26 | <group> 27 | 28 | 12EDDC5EEB216F272FD11ECE 29 | 30 | children 31 | 32 | B313E9BE79AD188AF528E747 33 | 34 | isa 35 | PBXGroup 36 | name 37 | Frameworks 38 | sourceTree 39 | <group> 40 | 41 | 14A115671D8351672F38B40C 42 | 43 | fileRef 44 | B313E9BE79AD188AF528E747 45 | isa 46 | PBXBuildFile 47 | 48 | 18FBBB27AE56032249A8C918 49 | 50 | buildActionMask 51 | 2147483647 52 | files 53 | 54 | inputPaths 55 | 56 | isa 57 | PBXShellScriptBuildPhase 58 | name 59 | Copy Pods Resources 60 | outputPaths 61 | 62 | runOnlyForDeploymentPostprocessing 63 | 0 64 | shellPath 65 | /bin/sh 66 | shellScript 67 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 68 | 69 | showEnvVarsInLog 70 | 0 71 | 72 | 726BBA3B38A1AA04B871A929 73 | 74 | buildActionMask 75 | 2147483647 76 | files 77 | 78 | inputPaths 79 | 80 | isa 81 | PBXShellScriptBuildPhase 82 | name 83 | Embed Pods Frameworks 84 | outputPaths 85 | 86 | runOnlyForDeploymentPostprocessing 87 | 0 88 | shellPath 89 | /bin/sh 90 | shellScript 91 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" 92 | 93 | showEnvVarsInLog 94 | 0 95 | 96 | 83B949CC9569A23606B7FF5D 97 | 98 | buildActionMask 99 | 2147483647 100 | files 101 | 102 | inputPaths 103 | 104 | isa 105 | PBXShellScriptBuildPhase 106 | name 107 | Check Pods Manifest.lock 108 | outputPaths 109 | 110 | runOnlyForDeploymentPostprocessing 111 | 0 112 | shellPath 113 | /bin/sh 114 | shellScript 115 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 116 | if [[ $? != 0 ]] ; then 117 | cat << EOM 118 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 119 | EOM 120 | exit 1 121 | fi 122 | 123 | showEnvVarsInLog 124 | 0 125 | 126 | B313E9BE79AD188AF528E747 127 | 128 | explicitFileType 129 | archive.ar 130 | includeInIndex 131 | 0 132 | isa 133 | PBXFileReference 134 | path 135 | libPods.a 136 | sourceTree 137 | BUILT_PRODUCTS_DIR 138 | 139 | CDF206EAEF2CA41705EDF991 140 | 141 | includeInIndex 142 | 1 143 | isa 144 | PBXFileReference 145 | lastKnownFileType 146 | text.xcconfig 147 | name 148 | Pods.debug.xcconfig 149 | path 150 | Pods/Target Support Files/Pods/Pods.debug.xcconfig 151 | sourceTree 152 | <group> 153 | 154 | E503D3768FE30E732061F9E6 155 | 156 | children 157 | 158 | CDF206EAEF2CA41705EDF991 159 | 05E443E6D74919F32DACA853 160 | 161 | isa 162 | PBXGroup 163 | name 164 | Pods 165 | sourceTree 166 | <group> 167 | 168 | EC80CC401D50578100B0C675 169 | 170 | children 171 | 172 | EC80CC4B1D50578100B0C675 173 | EC80CC4A1D50578100B0C675 174 | E503D3768FE30E732061F9E6 175 | 12EDDC5EEB216F272FD11ECE 176 | 177 | isa 178 | PBXGroup 179 | sourceTree 180 | <group> 181 | 182 | EC80CC411D50578100B0C675 183 | 184 | attributes 185 | 186 | LastUpgradeCheck 187 | 0730 188 | ORGANIZATIONNAME 189 | ___string___ 190 | TargetAttributes 191 | 192 | EC80CC481D50578100B0C675 193 | 194 | CreatedOnToolsVersion 195 | 7.3.1 196 | 197 | 198 | 199 | buildConfigurationList 200 | EC80CC441D50578100B0C675 201 | compatibilityVersion 202 | Xcode 3.2 203 | developmentRegion 204 | English 205 | hasScannedForEncodings 206 | 0 207 | isa 208 | PBXProject 209 | knownRegions 210 | 211 | en 212 | Base 213 | 214 | mainGroup 215 | EC80CC401D50578100B0C675 216 | productRefGroup 217 | EC80CC4A1D50578100B0C675 218 | projectDirPath 219 | 220 | projectReferences 221 | 222 | projectRoot 223 | 224 | targets 225 | 226 | EC80CC481D50578100B0C675 227 | 228 | 229 | EC80CC441D50578100B0C675 230 | 231 | buildConfigurations 232 | 233 | EC80CC5E1D50578100B0C675 234 | EC80CC5F1D50578100B0C675 235 | 236 | defaultConfigurationIsVisible 237 | 0 238 | defaultConfigurationName 239 | Release 240 | isa 241 | XCConfigurationList 242 | 243 | EC80CC451D50578100B0C675 244 | 245 | buildActionMask 246 | 2147483647 247 | files 248 | 249 | EC80CC541D50578100B0C675 250 | EC80CC511D50578100B0C675 251 | EC80CC4E1D50578100B0C675 252 | 253 | isa 254 | PBXSourcesBuildPhase 255 | runOnlyForDeploymentPostprocessing 256 | 0 257 | 258 | EC80CC461D50578100B0C675 259 | 260 | buildActionMask 261 | 2147483647 262 | files 263 | 264 | 14A115671D8351672F38B40C 265 | 266 | isa 267 | PBXFrameworksBuildPhase 268 | runOnlyForDeploymentPostprocessing 269 | 0 270 | 271 | EC80CC471D50578100B0C675 272 | 273 | buildActionMask 274 | 2147483647 275 | files 276 | 277 | EC80CC5C1D50578100B0C675 278 | EC80CC591D50578100B0C675 279 | EC80CC571D50578100B0C675 280 | 281 | isa 282 | PBXResourcesBuildPhase 283 | runOnlyForDeploymentPostprocessing 284 | 0 285 | 286 | EC80CC481D50578100B0C675 287 | 288 | buildConfigurationList 289 | EC80CC601D50578100B0C675 290 | buildPhases 291 | 292 | 83B949CC9569A23606B7FF5D 293 | EC80CC451D50578100B0C675 294 | EC80CC461D50578100B0C675 295 | EC80CC471D50578100B0C675 296 | 726BBA3B38A1AA04B871A929 297 | 18FBBB27AE56032249A8C918 298 | 299 | buildRules 300 | 301 | dependencies 302 | 303 | isa 304 | PBXNativeTarget 305 | name 306 | HLAlertController 307 | productName 308 | HLAlertController 309 | productReference 310 | EC80CC491D50578100B0C675 311 | productType 312 | com.apple.product-type.application 313 | 314 | EC80CC491D50578100B0C675 315 | 316 | explicitFileType 317 | wrapper.application 318 | includeInIndex 319 | 0 320 | isa 321 | PBXFileReference 322 | path 323 | HLAlertController.app 324 | sourceTree 325 | BUILT_PRODUCTS_DIR 326 | 327 | EC80CC4A1D50578100B0C675 328 | 329 | children 330 | 331 | EC80CC491D50578100B0C675 332 | 333 | isa 334 | PBXGroup 335 | name 336 | Products 337 | sourceTree 338 | <group> 339 | 340 | EC80CC4B1D50578100B0C675 341 | 342 | children 343 | 344 | EC80CC4F1D50578100B0C675 345 | EC80CC501D50578100B0C675 346 | EC80CC521D50578100B0C675 347 | EC80CC531D50578100B0C675 348 | EC80CC551D50578100B0C675 349 | EC80CC581D50578100B0C675 350 | EC80CC5A1D50578100B0C675 351 | EC80CC5D1D50578100B0C675 352 | EC80CC4C1D50578100B0C675 353 | 354 | isa 355 | PBXGroup 356 | path 357 | HLAlertController 358 | sourceTree 359 | <group> 360 | 361 | EC80CC4C1D50578100B0C675 362 | 363 | children 364 | 365 | EC80CC4D1D50578100B0C675 366 | 367 | isa 368 | PBXGroup 369 | name 370 | Supporting Files 371 | sourceTree 372 | <group> 373 | 374 | EC80CC4D1D50578100B0C675 375 | 376 | isa 377 | PBXFileReference 378 | lastKnownFileType 379 | sourcecode.c.objc 380 | path 381 | main.m 382 | sourceTree 383 | <group> 384 | 385 | EC80CC4E1D50578100B0C675 386 | 387 | fileRef 388 | EC80CC4D1D50578100B0C675 389 | isa 390 | PBXBuildFile 391 | 392 | EC80CC4F1D50578100B0C675 393 | 394 | isa 395 | PBXFileReference 396 | lastKnownFileType 397 | sourcecode.c.h 398 | path 399 | AppDelegate.h 400 | sourceTree 401 | <group> 402 | 403 | EC80CC501D50578100B0C675 404 | 405 | isa 406 | PBXFileReference 407 | lastKnownFileType 408 | sourcecode.c.objc 409 | path 410 | AppDelegate.m 411 | sourceTree 412 | <group> 413 | 414 | EC80CC511D50578100B0C675 415 | 416 | fileRef 417 | EC80CC501D50578100B0C675 418 | isa 419 | PBXBuildFile 420 | 421 | EC80CC521D50578100B0C675 422 | 423 | isa 424 | PBXFileReference 425 | lastKnownFileType 426 | sourcecode.c.h 427 | path 428 | ViewController.h 429 | sourceTree 430 | <group> 431 | 432 | EC80CC531D50578100B0C675 433 | 434 | isa 435 | PBXFileReference 436 | lastKnownFileType 437 | sourcecode.c.objc 438 | path 439 | ViewController.m 440 | sourceTree 441 | <group> 442 | 443 | EC80CC541D50578100B0C675 444 | 445 | fileRef 446 | EC80CC531D50578100B0C675 447 | isa 448 | PBXBuildFile 449 | 450 | EC80CC551D50578100B0C675 451 | 452 | children 453 | 454 | EC80CC561D50578100B0C675 455 | 456 | isa 457 | PBXVariantGroup 458 | name 459 | Main.storyboard 460 | sourceTree 461 | <group> 462 | 463 | EC80CC561D50578100B0C675 464 | 465 | isa 466 | PBXFileReference 467 | lastKnownFileType 468 | file.storyboard 469 | name 470 | Base 471 | path 472 | Base.lproj/Main.storyboard 473 | sourceTree 474 | <group> 475 | 476 | EC80CC571D50578100B0C675 477 | 478 | fileRef 479 | EC80CC551D50578100B0C675 480 | isa 481 | PBXBuildFile 482 | 483 | EC80CC581D50578100B0C675 484 | 485 | isa 486 | PBXFileReference 487 | lastKnownFileType 488 | folder.assetcatalog 489 | path 490 | Assets.xcassets 491 | sourceTree 492 | <group> 493 | 494 | EC80CC591D50578100B0C675 495 | 496 | fileRef 497 | EC80CC581D50578100B0C675 498 | isa 499 | PBXBuildFile 500 | 501 | EC80CC5A1D50578100B0C675 502 | 503 | children 504 | 505 | EC80CC5B1D50578100B0C675 506 | 507 | isa 508 | PBXVariantGroup 509 | name 510 | LaunchScreen.storyboard 511 | sourceTree 512 | <group> 513 | 514 | EC80CC5B1D50578100B0C675 515 | 516 | isa 517 | PBXFileReference 518 | lastKnownFileType 519 | file.storyboard 520 | name 521 | Base 522 | path 523 | Base.lproj/LaunchScreen.storyboard 524 | sourceTree 525 | <group> 526 | 527 | EC80CC5C1D50578100B0C675 528 | 529 | fileRef 530 | EC80CC5A1D50578100B0C675 531 | isa 532 | PBXBuildFile 533 | 534 | EC80CC5D1D50578100B0C675 535 | 536 | isa 537 | PBXFileReference 538 | lastKnownFileType 539 | text.plist.xml 540 | path 541 | Info.plist 542 | sourceTree 543 | <group> 544 | 545 | EC80CC5E1D50578100B0C675 546 | 547 | buildSettings 548 | 549 | ALWAYS_SEARCH_USER_PATHS 550 | NO 551 | CLANG_ANALYZER_NONNULL 552 | YES 553 | CLANG_CXX_LANGUAGE_STANDARD 554 | gnu++0x 555 | CLANG_CXX_LIBRARY 556 | libc++ 557 | CLANG_ENABLE_MODULES 558 | YES 559 | CLANG_ENABLE_OBJC_ARC 560 | YES 561 | CLANG_WARN_BOOL_CONVERSION 562 | YES 563 | CLANG_WARN_CONSTANT_CONVERSION 564 | YES 565 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 566 | YES_ERROR 567 | CLANG_WARN_EMPTY_BODY 568 | YES 569 | CLANG_WARN_ENUM_CONVERSION 570 | YES 571 | CLANG_WARN_INT_CONVERSION 572 | YES 573 | CLANG_WARN_OBJC_ROOT_CLASS 574 | YES_ERROR 575 | CLANG_WARN_UNREACHABLE_CODE 576 | YES 577 | CLANG_WARN__DUPLICATE_METHOD_MATCH 578 | YES 579 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 580 | iPhone Developer 581 | COPY_PHASE_STRIP 582 | NO 583 | DEBUG_INFORMATION_FORMAT 584 | dwarf 585 | ENABLE_STRICT_OBJC_MSGSEND 586 | YES 587 | ENABLE_TESTABILITY 588 | YES 589 | GCC_C_LANGUAGE_STANDARD 590 | gnu99 591 | GCC_DYNAMIC_NO_PIC 592 | NO 593 | GCC_NO_COMMON_BLOCKS 594 | YES 595 | GCC_OPTIMIZATION_LEVEL 596 | 0 597 | GCC_PREPROCESSOR_DEFINITIONS 598 | 599 | DEBUG=1 600 | $(inherited) 601 | 602 | GCC_WARN_64_TO_32_BIT_CONVERSION 603 | YES 604 | GCC_WARN_ABOUT_RETURN_TYPE 605 | YES_ERROR 606 | GCC_WARN_UNDECLARED_SELECTOR 607 | YES 608 | GCC_WARN_UNINITIALIZED_AUTOS 609 | YES_AGGRESSIVE 610 | GCC_WARN_UNUSED_FUNCTION 611 | YES 612 | GCC_WARN_UNUSED_VARIABLE 613 | YES 614 | IPHONEOS_DEPLOYMENT_TARGET 615 | 9.3 616 | MTL_ENABLE_DEBUG_INFO 617 | YES 618 | ONLY_ACTIVE_ARCH 619 | YES 620 | SDKROOT 621 | iphoneos 622 | 623 | isa 624 | XCBuildConfiguration 625 | name 626 | Debug 627 | 628 | EC80CC5F1D50578100B0C675 629 | 630 | buildSettings 631 | 632 | ALWAYS_SEARCH_USER_PATHS 633 | NO 634 | CLANG_ANALYZER_NONNULL 635 | YES 636 | CLANG_CXX_LANGUAGE_STANDARD 637 | gnu++0x 638 | CLANG_CXX_LIBRARY 639 | libc++ 640 | CLANG_ENABLE_MODULES 641 | YES 642 | CLANG_ENABLE_OBJC_ARC 643 | YES 644 | CLANG_WARN_BOOL_CONVERSION 645 | YES 646 | CLANG_WARN_CONSTANT_CONVERSION 647 | YES 648 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 649 | YES_ERROR 650 | CLANG_WARN_EMPTY_BODY 651 | YES 652 | CLANG_WARN_ENUM_CONVERSION 653 | YES 654 | CLANG_WARN_INT_CONVERSION 655 | YES 656 | CLANG_WARN_OBJC_ROOT_CLASS 657 | YES_ERROR 658 | CLANG_WARN_UNREACHABLE_CODE 659 | YES 660 | CLANG_WARN__DUPLICATE_METHOD_MATCH 661 | YES 662 | CODE_SIGN_IDENTITY[sdk=iphoneos*] 663 | iPhone Developer 664 | COPY_PHASE_STRIP 665 | NO 666 | DEBUG_INFORMATION_FORMAT 667 | dwarf-with-dsym 668 | ENABLE_NS_ASSERTIONS 669 | NO 670 | ENABLE_STRICT_OBJC_MSGSEND 671 | YES 672 | GCC_C_LANGUAGE_STANDARD 673 | gnu99 674 | GCC_NO_COMMON_BLOCKS 675 | YES 676 | GCC_WARN_64_TO_32_BIT_CONVERSION 677 | YES 678 | GCC_WARN_ABOUT_RETURN_TYPE 679 | YES_ERROR 680 | GCC_WARN_UNDECLARED_SELECTOR 681 | YES 682 | GCC_WARN_UNINITIALIZED_AUTOS 683 | YES_AGGRESSIVE 684 | GCC_WARN_UNUSED_FUNCTION 685 | YES 686 | GCC_WARN_UNUSED_VARIABLE 687 | YES 688 | IPHONEOS_DEPLOYMENT_TARGET 689 | 9.3 690 | MTL_ENABLE_DEBUG_INFO 691 | NO 692 | SDKROOT 693 | iphoneos 694 | VALIDATE_PRODUCT 695 | YES 696 | 697 | isa 698 | XCBuildConfiguration 699 | name 700 | Release 701 | 702 | EC80CC601D50578100B0C675 703 | 704 | buildConfigurations 705 | 706 | EC80CC611D50578100B0C675 707 | EC80CC621D50578100B0C675 708 | 709 | defaultConfigurationIsVisible 710 | 0 711 | isa 712 | XCConfigurationList 713 | 714 | EC80CC611D50578100B0C675 715 | 716 | baseConfigurationReference 717 | CDF206EAEF2CA41705EDF991 718 | buildSettings 719 | 720 | ASSETCATALOG_COMPILER_APPICON_NAME 721 | AppIcon 722 | INFOPLIST_FILE 723 | HLAlertController/Info.plist 724 | LD_RUNPATH_SEARCH_PATHS 725 | $(inherited) @executable_path/Frameworks 726 | PRODUCT_BUNDLE_IDENTIFIER 727 | cn.string.HLAlertController 728 | PRODUCT_NAME 729 | $(TARGET_NAME) 730 | 731 | isa 732 | XCBuildConfiguration 733 | name 734 | Debug 735 | 736 | EC80CC621D50578100B0C675 737 | 738 | baseConfigurationReference 739 | 05E443E6D74919F32DACA853 740 | buildSettings 741 | 742 | ASSETCATALOG_COMPILER_APPICON_NAME 743 | AppIcon 744 | INFOPLIST_FILE 745 | HLAlertController/Info.plist 746 | LD_RUNPATH_SEARCH_PATHS 747 | $(inherited) @executable_path/Frameworks 748 | PRODUCT_BUNDLE_IDENTIFIER 749 | cn.string.HLAlertController 750 | PRODUCT_NAME 751 | $(TARGET_NAME) 752 | 753 | isa 754 | XCBuildConfiguration 755 | name 756 | Release 757 | 758 | 759 | rootObject 760 | EC80CC411D50578100B0C675 761 | 762 | 763 | -------------------------------------------------------------------------------- /HLAlertController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HLAlertController.xcodeproj/xcuserdata/string.xcuserdatad/xcschemes/HLAlertController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /HLAlertController.xcodeproj/xcuserdata/string.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HLAlertController.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | EC80CC481D50578100B0C675 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /HLAlertController.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HLAlertController/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HLAlertController 4 | // 5 | // Created by String on 16/8/2. 6 | // Copyright © 2016年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HLAlertController/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HLAlertController 4 | // 5 | // Created by String on 16/8/2. 6 | // Copyright © 2016年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /HLAlertController/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 | } -------------------------------------------------------------------------------- /HLAlertController/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 | -------------------------------------------------------------------------------- /HLAlertController/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 | -------------------------------------------------------------------------------- /HLAlertController/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 | -------------------------------------------------------------------------------- /HLAlertController/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // HLAlertController 4 | // 5 | // Created by String on 16/8/2. 6 | // Copyright © 2016年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /HLAlertController/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // HLAlertController 4 | // 5 | // Created by String on 15/5/18. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "HLAlertController.h" 11 | #import "UIView+HLExtension.h" 12 | 13 | @implementation ViewController 14 | 15 | - (void)viewDidLoad { 16 | [super viewDidLoad]; 17 | 18 | for (NSInteger idx = 0; idx < 2; ++idx) { 19 | UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 80, 40)]; 20 | btn.tag = idx + 1; 21 | [btn addTarget:self action:@selector(showAlertView:) forControlEvents:UIControlEventTouchUpInside]; 22 | [btn setTitle:idx ? @"sheet" : @"alert" forState:UIControlStateNormal]; 23 | [btn setTitleColor:[UIColor darkTextColor] forState:UIControlStateNormal]; 24 | [self.view addSubview:btn]; 25 | 26 | btn.HL_centerY = self.view.HL_centerY; 27 | if (idx) { 28 | btn.HL_left = 50; 29 | } 30 | else { 31 | btn.HL_right = self.view.HL_right - 50; 32 | } 33 | } 34 | } 35 | 36 | - (void)showAlertView:(UIButton *)sender { 37 | HLAlertControllerStyle style = sender.tag == 1 ? HLAlertControllerStyleAlert : HLAlertControllerStyleActionSheet; 38 | HLAlertController *alert = [HLAlertController alertControllerWithTitle:@"Discussion" message:@"The bottomLayoutGuide property comes into play when a view controller is frontmost onscreen." preferredStyle:style]; 39 | [alert addAction:[HLAlertAction actionWithTitle:@"delete" style:HLAlertActionStyleDestructive handler:^(HLAlertAction *action) { 40 | NSLog(@"delete"); 41 | }]]; 42 | [alert addAction:[HLAlertAction actionWithTitle:@"cancel" style:HLAlertActionStyleCancel handler:^(HLAlertAction *action) { 43 | NSLog(@"cancel"); 44 | }]]; 45 | [alert addAction:[HLAlertAction actionWithTitle:@"confirm" style:HLAlertActionStyleDefault handler:^(HLAlertAction *action) { 46 | NSLog(@"confirm"); 47 | }]]; 48 | if (sender.tag == 1) { 49 | [alert addTextFieldWithConfigure:^(UITextField *textField) { 50 | textField.placeholder = @"input"; 51 | }]; 52 | } 53 | [self presentViewController:alert animated:YES completion:nil]; 54 | } 55 | 56 | - (void)viewDidAppear:(BOOL)animated { 57 | [super viewDidAppear:animated]; 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /HLAlertController/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HLAlertController 4 | // 5 | // Created by String on 16/8/2. 6 | // Copyright © 2016年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | 3 | pod 'HLAlertController', '~> 1.0.0' -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - HLAlertController (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - HLAlertController (~> 1.0.0) 6 | 7 | SPEC CHECKSUMS: 8 | HLAlertController: a9e2690482fd083519fca94fb1b50fef95ef2275 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertController.h 3 | // 4 | // Created by String on 15/5/18. 5 | // Copyright (c) 2015年 String Zhao. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class HLAlertAction; 11 | 12 | /** 13 | style for button 14 | */ 15 | typedef NS_ENUM(NSInteger, HLAlertActionStyle) { 16 | HLAlertActionStyleDefault = 0, 17 | HLAlertActionStyleCancel, 18 | HLAlertActionStyleDestructive 19 | }; 20 | 21 | typedef NS_ENUM(NSInteger, HLAlertControllerStyle) { 22 | HLAlertControllerStyleActionSheet, 23 | HLAlertControllerStyleAlert, 24 | }; 25 | 26 | 27 | 28 | 29 | 30 | 31 | @interface HLAlertController : UIViewController 32 | 33 | /** 34 | * 创建一个HLAlertController 35 | * 36 | * @param title 标题 37 | * @param message 详情 38 | * @param preferredStyle 样式 值为HLAlertControllerStyle 39 | * 40 | * @return HLAlertController对象 41 | */ 42 | + (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(HLAlertControllerStyle)preferredStyle; 43 | 44 | - (void)showWithViewController:(UIViewController *)viewController; 45 | 46 | #pragma mark - actions 47 | /** 48 | * 添加一个显示选项 49 | * 50 | * @param action HLAlertAction对象 51 | */ 52 | - (void)addAction:(HLAlertAction *)action; 53 | @property (nonatomic, readonly) NSArray *actions; ///< 已经添加的HLAlertActiond对象组 54 | 55 | 56 | #pragma mark - textFields 57 | /** 58 | * 添加一个UITextField 置顶显示 59 | * 60 | * @param configure 设置UITextField的回调 61 | */ 62 | - (void)addTextFieldWithConfigure:(void(^)(UITextField *textField))configure; 63 | @property (nonatomic, readonly) NSArray *textFields; ///< 已经添加的UITextField对象组 64 | 65 | 66 | #pragma mark - property 67 | @property (nonatomic, readonly, copy) NSString *titleAlert; ///< 标题 68 | @property (nonatomic, readonly, copy) NSString *message; ///< 详情 69 | @property (nonatomic, readonly, assign) HLAlertControllerStyle preferredStyle; ///< 样式 70 | @property (assign, nonatomic, readwrite) BOOL autoSelectTextFieldText; ///< 是否自动选中文字 默认为NO 71 | 72 | @end 73 | 74 | 75 | 76 | 77 | @interface HLAlertAction : UIView 78 | 79 | /** 80 | * 创建一个显示选项 81 | * 82 | * @param title 选项标题 83 | * @param style 选项的样式 值为HLAlertActionStyle 84 | * @param handler 选项点击回调 85 | * 86 | * @return HLAlertAction对象 87 | */ 88 | + (instancetype)actionWithTitle:(NSString *)title style:(HLAlertActionStyle)style handler:(void (^)(HLAlertAction *action))handler; 89 | 90 | @property (nonatomic, readonly) NSString *title; ///< 选项标题 91 | @property (nonatomic, readonly) HLAlertActionStyle style; ///< 选项样式 92 | @property (copy, nonatomic, readonly) void (^handler)(HLAlertAction *); ///< 选项点击回调 93 | 94 | @end 95 | 96 | 97 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertController.m 3 | // 4 | // Created by String on 15/5/18. 5 | // Copyright (c) 2015年 String Zhao. All rights reserved. 6 | // 7 | 8 | #import "HLAlertController.h" 9 | #import "HLAlertTransitionController.h" 10 | #import "HLKeyboardNotificationCenter.h" 11 | #import 12 | 13 | #import "UIImage+HLColor.h" 14 | #import "UITextField+HLAdd.h" 15 | #import "UIView+HLExtension.h" 16 | 17 | 18 | 19 | 20 | /** 21 | * 用自定义transition的方式显示alertController的简便对象 22 | */ 23 | @interface HLAlertControllerTransitionManager : NSObject 24 | 25 | + (void)presentAlertViewController:(HLAlertController *)alertViewController presentViewController:(UIViewController *)viewController; 26 | 27 | @end 28 | 29 | 30 | @interface HLAlertControllerTransitionManager () 31 | @property (strong, nonatomic) HLAlertTransitionController *transition; ///< 自定义transition对象 32 | @end 33 | @implementation HLAlertControllerTransitionManager 34 | 35 | + (instancetype)sharedAlertcontrollerTransitionManager { 36 | static HLAlertControllerTransitionManager *manager; 37 | static dispatch_once_t onceToken; 38 | dispatch_once(&onceToken, ^{ 39 | manager = [[HLAlertControllerTransitionManager alloc] init]; 40 | }); 41 | return manager; 42 | } 43 | 44 | + (void)presentAlertViewController:(HLAlertController *)alertViewController presentViewController:(UIViewController *)viewController { 45 | 46 | HLAlertControllerTransitionManager *manager = [self sharedAlertcontrollerTransitionManager]; 47 | manager.transition = [[HLAlertTransitionController alloc] initWithPresentingViewController:viewController]; 48 | [manager.transition presentViewController:alertViewController style:alertViewController.preferredStyle]; 49 | } 50 | 51 | @end 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | @interface HLAlertAction () 64 | @property (nonatomic, readwrite) NSString *title; 65 | @property (nonatomic, readwrite) HLAlertActionStyle style; 66 | @property (copy, nonatomic, readwrite) void (^handler)(HLAlertAction *); 67 | 68 | @property (nonatomic, strong) UIButton *btnAction; 69 | @property (nonatomic, strong) UIView *vLine; 70 | 71 | @end 72 | @implementation HLAlertAction 73 | 74 | #pragma mark - life circle 75 | 76 | + (instancetype)actionWithTitle:(NSString *)title style:(HLAlertActionStyle)style handler:(void (^)(HLAlertAction *))handler { 77 | return [[HLAlertAction alloc] initWithTitle:title style:style handler:handler]; 78 | } 79 | 80 | - (instancetype)initWithTitle:(NSString *)title style:(HLAlertActionStyle)style handler:(void (^)(HLAlertAction *))handler { 81 | self = [super init]; 82 | if (!self) return nil; 83 | 84 | _title = title; 85 | _style = style; 86 | _handler = [handler copy]; 87 | 88 | _btnAction = [UIButton new]; 89 | [_btnAction setTitleColor:[self colorForStyle:style] forState:UIControlStateNormal]; 90 | [_btnAction setTitle:title forState:UIControlStateNormal]; 91 | [_btnAction setBackgroundImage:[UIImage HL_imageWithColor:[UIColor colorWithWhite:.9 alpha:1]] forState:UIControlStateHighlighted]; 92 | [self addSubview:_btnAction]; 93 | 94 | _vLine = [UIView new]; 95 | _vLine.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1]; 96 | [self addSubview:_vLine]; 97 | 98 | return self; 99 | } 100 | 101 | - (void)layoutSubviews { 102 | [super layoutSubviews]; 103 | 104 | _btnAction.frame = self.bounds; 105 | _vLine.frame = self.bounds; 106 | _vLine.HL_height = _style == HLAlertActionStyleCancel ? 4 : .5; 107 | } 108 | 109 | #pragma mark - help 110 | 111 | - (UIColor *)colorForStyle:(HLAlertActionStyle)style { 112 | switch (style) { 113 | case HLAlertActionStyleDefault: 114 | return [UIColor darkTextColor]; 115 | case HLAlertActionStyleCancel: 116 | return [UIColor blackColor]; 117 | case HLAlertActionStyleDestructive: 118 | return [UIColor redColor]; 119 | } 120 | } 121 | 122 | @end 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | static CGFloat const kHLAlertControllerWidthFactor = 0.853f; 136 | static NSString const * kHLAlertControllerKeyboard = @"kHLAlertControllerKeyboard"; 137 | 138 | 139 | @interface HLAlertController () 140 | @property (nonatomic, readwrite) NSString *titleAlert; 141 | @property (nonatomic, readwrite) NSString *message; 142 | @property (nonatomic, readwrite) HLAlertControllerStyle preferredStyle; 143 | 144 | @property (strong, nonatomic) NSMutableArray *actions; 145 | @property (strong, nonatomic) NSMutableArray *textFields; 146 | 147 | @property (strong, nonatomic) UIView *vBack; 148 | @property (strong, nonatomic) UILabel *lbTitle; 149 | @property (strong, nonatomic) UILabel *lbMessage; 150 | 151 | @end 152 | 153 | @implementation HLAlertController 154 | 155 | - (void)viewDidLoad { 156 | [super viewDidLoad]; 157 | 158 | [self initializeProperty]; 159 | [self initializeView]; 160 | [self addMotionEffectIfNeeded]; 161 | [self registKeyboardIfNeeded]; 162 | } 163 | 164 | - (void)viewDidLayoutSubviews { 165 | [super viewDidLayoutSubviews]; 166 | 167 | [self textFieldBecomeFirstResponderOnce]; 168 | } 169 | 170 | - (void)viewWillDisappear:(BOOL)animated { 171 | [super viewWillDisappear:animated]; 172 | 173 | [HLKeyboardNotificationCenter removeForKey:kHLAlertControllerKeyboard]; 174 | } 175 | 176 | #pragma mark - action 177 | 178 | - (void)tapOutSideCard:(UITapGestureRecognizer *)tap { 179 | if (!CGRectContainsPoint(_vBack.frame, [tap locationInView:self.view])) { 180 | [self dismissViewControllerAnimated:YES completion:nil]; 181 | } 182 | else { 183 | [_textFields enumerateObjectsUsingBlock:^(UITextField *obj, NSUInteger idx, BOOL *stop) { 184 | [obj resignFirstResponder]; 185 | }]; 186 | } 187 | } 188 | 189 | #pragma mark - UITextFieldDelegate 190 | 191 | - (void)textFieldOnReturn:(UITextField *)textField { 192 | NSInteger idx = [_textFields indexOfObject:textField]; 193 | if (idx == NSNotFound) return; 194 | if (idx >= _textFields.count - 1) { 195 | [textField resignFirstResponder]; 196 | return; 197 | } 198 | [_textFields[idx + 1] becomeFirstResponder]; 199 | } 200 | 201 | #pragma mark - public 202 | 203 | + (instancetype)alertControllerWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(HLAlertControllerStyle)preferredStyle { 204 | 205 | HLAlertController *alertController = [HLAlertController new]; 206 | alertController.actions = @[].mutableCopy; 207 | alertController.textFields = @[].mutableCopy; 208 | alertController.titleAlert = title; 209 | alertController.message = message; 210 | alertController.preferredStyle = preferredStyle; 211 | 212 | return alertController; 213 | } 214 | 215 | - (void)showWithViewController:(UIViewController *)viewController { 216 | 217 | [HLAlertControllerTransitionManager presentAlertViewController:self presentViewController:viewController]; 218 | } 219 | 220 | - (void)addAction:(HLAlertAction *)action { 221 | 222 | if (!action) return; 223 | NSAssert(!(((HLAlertAction *)_actions.lastObject).style == HLAlertActionStyleCancel && action.style == HLAlertActionStyleCancel), @"cancel action must be one"); 224 | [action.btnAction addTarget:self action:@selector(actionButtonClicked:) forControlEvents:UIControlEventTouchUpInside]; 225 | 226 | if (action.style == HLAlertActionStyleCancel) { 227 | [_actions addObject:action]; 228 | objc_setAssociatedObject(self, _cmd, @(YES), OBJC_ASSOCIATION_COPY_NONATOMIC); 229 | } 230 | else { 231 | NSUInteger index = _actions.count; 232 | if (objc_getAssociatedObject(self, _cmd)) index--; 233 | [_actions insertObject:action atIndex:index]; 234 | } 235 | } 236 | 237 | - (void)addTextFieldWithConfigure:(void (^)(UITextField *))configure { 238 | 239 | NSAssert(self.preferredStyle == HLAlertControllerStyleAlert, @"text field must only add to alert style"); 240 | 241 | UITextField *textField = [UITextField new]; 242 | textField.font = [UIFont systemFontOfSize:16]; 243 | textField.textColor = [UIColor darkTextColor]; 244 | textField.borderStyle = UITextBorderStyleRoundedRect; 245 | textField.returnKeyType = UIReturnKeyDone; 246 | [textField addTarget:self action:@selector(textFieldOnReturn:) forControlEvents:UIControlEventEditingDidEndOnExit]; 247 | !configure ?: configure(textField); 248 | if (_textFields.lastObject) _textFields.lastObject.returnKeyType = UIReturnKeyNext; 249 | 250 | [_textFields addObject:textField]; 251 | } 252 | 253 | #pragma mark - action 254 | 255 | - (void)actionButtonClicked:(UIButton *)sender { 256 | 257 | __weak typeof(self) wSelf = self; 258 | void (^completion)() = ^ { 259 | 260 | if (!wSelf) return; 261 | __strong typeof(wSelf) sSelf = wSelf; 262 | for (HLAlertAction *action in sSelf.actions) { 263 | if (![action.btnAction isEqual:sender]) continue; 264 | !action.handler ?: action.handler(action); 265 | return; 266 | } 267 | }; 268 | [self dismissViewControllerAnimated:YES completion:completion]; 269 | } 270 | 271 | #pragma mark - initialize 272 | 273 | - (void)initializeProperty { 274 | 275 | } 276 | 277 | - (void)initializeView { 278 | [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapOutSideCard:)]]; 279 | self.view.backgroundColor = [UIColor clearColor]; 280 | 281 | _vBack = [UIView new]; 282 | _vBack.backgroundColor = [UIColor colorWithWhite:0.975 alpha:1]; 283 | if (self.preferredStyle == HLAlertControllerStyleAlert) { 284 | _vBack.layer.masksToBounds = YES; 285 | _vBack.layer.cornerRadius = 5; 286 | } 287 | [self.view addSubview:_vBack]; 288 | 289 | if (_titleAlert.length) { 290 | _lbTitle = [UILabel new]; 291 | _lbTitle.text = _titleAlert; 292 | _lbTitle.font = [UIFont systemFontOfSize:18]; 293 | _lbTitle.textColor = [UIColor blackColor]; 294 | _lbTitle.numberOfLines = 0; 295 | _lbTitle.preferredMaxLayoutWidth = _vBack.HL_width - 60; 296 | [_vBack addSubview:_lbTitle]; 297 | } 298 | if (_message.length) { 299 | _lbMessage = [UILabel new]; 300 | _lbMessage.text = _message; 301 | _lbMessage.font = [UIFont systemFontOfSize:14]; 302 | _lbMessage.textColor = [UIColor darkTextColor]; 303 | _lbMessage.numberOfLines = 0; 304 | _lbMessage.textAlignment = NSTextAlignmentCenter; 305 | _lbMessage.preferredMaxLayoutWidth = _vBack.HL_width - 50; 306 | [_vBack addSubview:_lbMessage]; 307 | } 308 | 309 | [_textFields enumerateObjectsUsingBlock:^(UITextField *obj, NSUInteger idx, BOOL *stop) { 310 | [_vBack addSubview:obj]; 311 | }]; 312 | [_actions enumerateObjectsUsingBlock:^(HLAlertAction *action, NSUInteger idx, BOOL *stop) { 313 | [_vBack addSubview:action]; 314 | }]; 315 | 316 | [self layoutViews]; 317 | } 318 | 319 | - (void)addMotionEffectIfNeeded { 320 | if (self.preferredStyle != HLAlertControllerStyleAlert) { 321 | return; 322 | } 323 | UIInterpolatingMotionEffect *effectHorizontal = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.x" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; 324 | effectHorizontal.minimumRelativeValue = @(-20); 325 | effectHorizontal.maximumRelativeValue = @(20); 326 | [_vBack addMotionEffect:effectHorizontal]; 327 | 328 | UIInterpolatingMotionEffect *effectVertical = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@"center.y" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; 329 | effectVertical.minimumRelativeValue = @(-20); 330 | effectVertical.maximumRelativeValue = @(20); 331 | [_vBack addMotionEffect:effectVertical]; 332 | } 333 | 334 | - (void)registKeyboardIfNeeded { 335 | if (self.preferredStyle == HLAlertControllerStyleActionSheet) { 336 | return; 337 | } 338 | if (!_textFields || _textFields.count == 0) { 339 | return; 340 | } 341 | 342 | __weak typeof(self) wSelf = self; 343 | [HLKeyboardNotificationCenter keyboardWillAppear:nil willChangeFrame:^(HLKeyboardInfo *keyboardInfo) { 344 | 345 | if (!wSelf) return; 346 | __strong typeof(wSelf) sSelf = wSelf; 347 | 348 | CGFloat limitMaxY = sSelf.view.HL_height - keyboardInfo.keyboardFrameEnd.size.height; 349 | CGFloat offsetY = sSelf.vBack.HL_bottom - limitMaxY; 350 | if (offsetY <= 0) { 351 | return; 352 | } 353 | [UIView animateWithDuration:keyboardInfo.keyboardAnimationDuration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 354 | sSelf.vBack.HL_centerY = sSelf.view.HL_centerY - 8 - offsetY; 355 | } completion:nil]; 356 | } willDisappear:^(HLKeyboardInfo *keyboardInfo) { 357 | 358 | if (!wSelf) return; 359 | __strong typeof(wSelf) sSelf = wSelf; 360 | [UIView animateWithDuration:keyboardInfo.keyboardAnimationDuration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 361 | sSelf.vBack.HL_centerY = sSelf.view.HL_centerY; 362 | } completion:nil]; 363 | } key:kHLAlertControllerKeyboard]; 364 | } 365 | 366 | - (void)textFieldBecomeFirstResponderOnce { 367 | if (_textFields.count == 0 || objc_getAssociatedObject(self, _cmd)) return; 368 | objc_setAssociatedObject(self, _cmd, @(YES), OBJC_ASSOCIATION_COPY_NONATOMIC); 369 | 370 | [_textFields.firstObject becomeFirstResponder]; 371 | [self selectTextFieldTextIfNeeded]; 372 | } 373 | 374 | - (void)selectTextFieldTextIfNeeded { 375 | if (!_textFields || _textFields.count == 0 || !_autoSelectTextFieldText) return; 376 | [_textFields.firstObject HL_setSelectedRange:NSMakeRange(0, _textFields.firstObject.text.length)]; 377 | } 378 | 379 | #pragma mark - layout 380 | 381 | - (void)layoutViews { 382 | 383 | CGFloat factor = self.preferredStyle == HLAlertControllerStyleAlert ? kHLAlertControllerWidthFactor : 1; 384 | __block CGFloat backHeight = 20; 385 | _vBack.HL_width = self.view.HL_width * factor; 386 | _vBack.HL_centerX = self.view.HL_centerX; 387 | 388 | if (_titleAlert.length) { 389 | _lbTitle.HL_top = backHeight; 390 | _lbTitle.HL_size = [_lbTitle sizeThatFits:CGSizeMake(_vBack.HL_width - 60, CGFLOAT_MAX)]; 391 | _lbTitle.HL_centerX = _vBack.HL_width / 2.; 392 | backHeight += _lbTitle.HL_height; 393 | } 394 | if (_message.length) { 395 | backHeight += 10; 396 | _lbMessage.HL_size = [_lbMessage sizeThatFits:CGSizeMake(_vBack.HL_width - 50, CGFLOAT_MAX)]; 397 | _lbMessage.HL_centerX = _vBack.HL_width / 2.; 398 | _lbMessage.HL_top = backHeight; 399 | backHeight += _lbMessage.HL_height; 400 | } 401 | if (_lbTitle || _lbMessage) backHeight += 25; 402 | 403 | for (UITextField *textField in _textFields) { 404 | 405 | textField.HL_top = backHeight; 406 | textField.HL_height = 50; 407 | textField.HL_left = 16; 408 | textField.HL_width = _vBack.HL_width - 32; 409 | backHeight += 50; 410 | } 411 | if (_textFields.count) backHeight += 8; 412 | 413 | for (HLAlertAction *action in _actions) { 414 | action.HL_top = backHeight; 415 | action.HL_height = action.style == HLAlertActionStyleCancel ? 54 : 50; 416 | action.HL_width = _vBack.HL_width; 417 | action.HL_left = 0; 418 | backHeight += action.HL_height; 419 | } 420 | 421 | _vBack.HL_height = backHeight; 422 | if (_preferredStyle == HLAlertControllerStyleAlert) { 423 | _vBack.HL_centerY = self.view.HL_centerY; 424 | } 425 | else { 426 | _vBack.HL_bottom = self.view.HL_bottom; 427 | } 428 | } 429 | 430 | @end 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | @interface UIViewController (HLAlertController) 439 | @end 440 | 441 | @implementation UIViewController (HLAlertController) 442 | 443 | + (void)load { 444 | swizzleMethod(self, @selector(presentViewController:animated:completion:), @selector(swizzle_presentViewController:animated:completion:)); 445 | } 446 | 447 | - (void)swizzle_presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion { 448 | 449 | if ([viewControllerToPresent isKindOfClass:[HLAlertController class]] && !objc_getAssociatedObject(viewControllerToPresent, _cmd)) { 450 | objc_setAssociatedObject(viewControllerToPresent, _cmd, @(YES), OBJC_ASSOCIATION_COPY_NONATOMIC); 451 | [HLAlertControllerTransitionManager presentAlertViewController:(HLAlertController *)viewControllerToPresent presentViewController:self]; 452 | return; 453 | } 454 | [self swizzle_presentViewController:viewControllerToPresent animated:YES completion:completion]; 455 | } 456 | 457 | void swizzleMethod(Class class, SEL originalSelector, SEL swizzledSelector) { 458 | 459 | Method originalMethod = class_getInstanceMethod(class, originalSelector); 460 | Method swizzleMethod = class_getInstanceMethod(class, swizzledSelector); 461 | 462 | BOOL isAdded = class_addMethod(class, originalSelector, method_getImplementation(swizzleMethod), method_getTypeEncoding(swizzleMethod)); 463 | if (isAdded) { 464 | class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)); 465 | } 466 | else { 467 | method_exchangeImplementations(originalMethod, swizzleMethod); 468 | } 469 | } 470 | 471 | @end 472 | 473 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertTransition.h 3 | // WangYIPhotoDemo 4 | // 5 | // Created by String on 15/5/18. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HLAlertController.h" 11 | 12 | @interface HLAlertTransition : NSObject 13 | 14 | @property (assign, nonatomic) HLAlertControllerStyle style; 15 | @property (assign, nonatomic) BOOL isDismiss; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertTransition.m 3 | // WangYIPhotoDemo 4 | // 5 | // Created by String on 15/5/18. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "HLAlertTransition.h" 10 | 11 | @interface HLAlertTransition () 12 | @property (strong, nonatomic) UIView *vFade; 13 | @end 14 | @implementation HLAlertTransition 15 | 16 | - (void)animateTransition:(id)transitionContext { 17 | self.isDismiss ? [self dismissAnimateTransition:transitionContext] : [self presentAnimateTransition:transitionContext]; 18 | } 19 | 20 | - (void)dismissAnimateTransition:(id)transitionContext { 21 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 22 | NSTimeInterval duration = [self transitionDuration:transitionContext]; 23 | 24 | if (self.style == HLAlertControllerStyleActionSheet) { 25 | 26 | [UIView animateWithDuration:duration 27 | delay:0.0 28 | options:UIViewAnimationOptionCurveEaseOut 29 | animations:^{ 30 | _vFade.alpha = 0; 31 | fromVC.view.transform = CGAffineTransformMakeTranslation(0, CGRectGetHeight(fromVC.view.bounds)); 32 | } completion:^(BOOL finished) { 33 | [self.vFade removeFromSuperview]; 34 | [transitionContext completeTransition:YES]; 35 | }]; 36 | } 37 | else { 38 | [UIView animateWithDuration:.1 39 | delay:.0 40 | options:UIViewAnimationOptionAllowAnimatedContent 41 | animations:^{ 42 | fromVC.view.transform = CGAffineTransformMakeScale(.9, .9); 43 | fromVC.view.alpha = .8; 44 | } completion:^(BOOL finished) { 45 | [UIView animateWithDuration:.1 46 | delay:0.0 47 | options:UIViewAnimationOptionCurveLinear 48 | animations:^{ 49 | self.vFade.alpha = 0; 50 | fromVC.view.transform = CGAffineTransformMakeScale(1.2, 1.2); 51 | fromVC.view.alpha = 0; 52 | } completion:^(BOOL finished) { 53 | [self.vFade removeFromSuperview]; 54 | [transitionContext completeTransition:YES]; 55 | }]; 56 | 57 | }]; 58 | } 59 | } 60 | 61 | - (void)presentAnimateTransition:(id)transitionContext { 62 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 63 | 64 | UIView *fadeView = [[UIView alloc] initWithFrame:toVC.view.bounds]; 65 | fadeView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.5]; 66 | fadeView.alpha = 0; 67 | self.vFade = fadeView; 68 | 69 | UIView *containerView = [transitionContext containerView]; 70 | [containerView addSubview:fadeView]; 71 | 72 | NSTimeInterval duration = [self transitionDuration:transitionContext]; 73 | 74 | if (self.style == HLAlertControllerStyleActionSheet) { 75 | 76 | toVC.view.layer.shadowColor = [UIColor darkGrayColor].CGColor; 77 | toVC.view.layer.shadowOffset = CGSizeMake(0, -2); 78 | toVC.view.layer.shadowOpacity = .75; 79 | toVC.view.transform = CGAffineTransformMakeTranslation(0, CGRectGetHeight(toVC.view.bounds)); 80 | 81 | [containerView addSubview:toVC.view]; 82 | 83 | [UIView animateWithDuration:duration 84 | delay:0.0 85 | usingSpringWithDamping:.85 86 | initialSpringVelocity:1 87 | options:UIViewAnimationOptionCurveLinear 88 | animations:^{ 89 | fadeView.alpha = 1; 90 | toVC.view.transform = CGAffineTransformIdentity; 91 | } completion:^(BOOL finished) { 92 | [transitionContext completeTransition:YES]; 93 | }]; 94 | } 95 | else { 96 | [containerView addSubview:toVC.view]; 97 | 98 | CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI /5.6f); 99 | CGAffineTransform transform2 = CGAffineTransformMakeScale(0, 0); 100 | CGAffineTransform transform3 = CGAffineTransformConcat(transform, transform2); 101 | toVC.view.transform = transform3; 102 | 103 | [UIView animateWithDuration:duration 104 | delay:0.0 105 | usingSpringWithDamping:.65 106 | initialSpringVelocity:.8 107 | options:UIViewAnimationOptionCurveLinear 108 | animations:^{ 109 | fadeView.alpha = 1; 110 | toVC.view.transform = CGAffineTransformIdentity; 111 | } completion:^(BOOL finished) { 112 | [transitionContext completeTransition:YES]; 113 | }]; 114 | 115 | } 116 | } 117 | 118 | - (NSTimeInterval)transitionDuration:(id)transitionContext { 119 | return self.isDismiss ? .4 : .5; 120 | } 121 | 122 | @end 123 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertTransitionController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertTransitionController.h 3 | // WangYIPhotoDemo 4 | // 5 | // Created by String on 15/5/18. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HLAlertController.h" 11 | 12 | @interface HLAlertTransitionController : NSObject 13 | 14 | - (id)initWithPresentingViewController:(UIViewController*)presentingVC; 15 | 16 | - (void)presentViewController:(UIViewController*)viewController style:(HLAlertControllerStyle)style; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLAlertTransitionController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HLAlertTransitionController.m 3 | // WangYIPhotoDemo 4 | // 5 | // Created by String on 15/5/18. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "HLAlertTransitionController.h" 10 | #import "HLAlertTransition.h" 11 | 12 | @interface HLAlertTransitionController() 13 | @property (weak,nonatomic) UIViewController *presentingVC; 14 | @property (strong, nonatomic) HLAlertTransition *transition; 15 | @property (assign, nonatomic) HLAlertControllerStyle style; 16 | @end 17 | @implementation HLAlertTransitionController 18 | 19 | - (id)initWithPresentingViewController:(UIViewController *)presentingVC 20 | { 21 | self = [super init]; 22 | if (self) { 23 | self.presentingVC = presentingVC; 24 | self.transition = [[HLAlertTransition alloc] init]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)presentViewController:(UIViewController *)viewController style:(HLAlertControllerStyle)style { 30 | 31 | viewController.modalPresentationStyle = UIModalPresentationCustom; 32 | viewController.transitioningDelegate = self; 33 | self.style = style; 34 | 35 | [self.presentingVC presentViewController:viewController animated:YES completion:nil]; 36 | } 37 | 38 | - (id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source 39 | { 40 | _transition.style = _style; 41 | _transition.isDismiss = NO; 42 | return _transition; 43 | } 44 | 45 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed 46 | { 47 | _transition.style = _style; 48 | _transition.isDismiss = YES; 49 | return _transition; 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLKeyboardNotificationCenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // HLKeyboardNotificationCenter.h 3 | // KeyboradNotificationCenterDemo 4 | // 5 | // Created by String on 14-8-5. 6 | // Copyright (c) 2014年 alex. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /* 12 | 保存keyboard的信息的类 13 | p: 14 | keyboard开始的frame 15 | keyboard结束时的frame 16 | 动画时间 17 | 动画曲线 18 | */ 19 | 20 | @interface HLKeyboardInfo : NSObject 21 | @property (assign, nonatomic) CGRect keyboardFrameBegin; 22 | @property (assign, nonatomic) CGRect keyboardFrameEnd; 23 | @property (assign, nonatomic) NSTimeInterval keyboardAnimationDuration; 24 | @property (assign, nonatomic) UIViewAnimationCurve keyboardAnimationCurve; 25 | 26 | - (instancetype)initWithKeyboardDictionary:(NSDictionary *)keyboardDictionary; 27 | @end 28 | 29 | 30 | 31 | typedef void(^KeyboardWillAppearBlock)(HLKeyboardInfo *keyboardInfo); 32 | typedef void(^KeyboardWillDisappearBlock)(HLKeyboardInfo *keyboardInfo); 33 | typedef void(^KeyboardWillChangeFrameBlock)(HLKeyboardInfo *keyboardInfo); 34 | 35 | /* 36 | 一个小的操作单元 可能有许多对象都监听键盘事件 把这边要处理的动作封装成不同的block 然后 37 | 不同的block组成一个操作单元 放到操作池中 (为了释放的方便) 38 | p: 39 | key: 用来区别每一个操作单元的键 释放的时候用 40 | */ 41 | 42 | @interface HLKeyboardBlocks : NSObject 43 | @property (copy, nonatomic) id key; 44 | @property (strong, nonatomic) KeyboardWillAppearBlock keyboardWillAppearBlock; 45 | @property (strong, nonatomic) KeyboardWillDisappearBlock keyboardWillDisappearBlock; 46 | @property (strong, nonatomic) KeyboardWillChangeFrameBlock keyboardWillChangeFrameBlock; 47 | @end 48 | 49 | 50 | 51 | /* 52 | 通知中心 把要监听键盘的对象的动作封装进来 放到操作池中 53 | */ 54 | @interface HLKeyboardNotificationCenter : NSObject 55 | 56 | + (void)keyboardWillAppear:(KeyboardWillAppearBlock)keyboardWillAppear 57 | willChangeFrame:(KeyboardWillChangeFrameBlock)keyboardWillChangeFrame 58 | willDisappear:(KeyboardWillDisappearBlock)keyboardWillDisappear 59 | key:(id)key; 60 | 61 | + (void)removeForKey:(id)key; 62 | + (void)reset; 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/HLKeyboardNotificationCenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // HLKeyboardNotificationCenter.m 3 | // KeyboradNotificationCenterDemo 4 | // 5 | // Created by String on 14-8-5. 6 | // Copyright (c) 2014年 alex. All rights reserved. 7 | // 8 | 9 | #import "HLKeyboardNotificationCenter.h" 10 | 11 | @implementation HLKeyboardInfo 12 | 13 | - (instancetype)initWithKeyboardDictionary:(NSDictionary *)keyboardDictionary{ 14 | if (self = [super init]) { 15 | self.keyboardFrameBegin = [keyboardDictionary[UIKeyboardFrameBeginUserInfoKey] CGRectValue]; 16 | self.keyboardFrameEnd = [keyboardDictionary[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 17 | self.keyboardAnimationDuration = [keyboardDictionary[UIKeyboardAnimationDurationUserInfoKey] floatValue]; 18 | self.keyboardAnimationCurve = [keyboardDictionary[UIKeyboardAnimationCurveUserInfoKey] integerValue]; 19 | } 20 | return self; 21 | } 22 | 23 | @end 24 | 25 | 26 | @implementation HLKeyboardBlocks 27 | 28 | @end 29 | 30 | 31 | @interface HLKeyboardNotificationCenter () 32 | @property (strong, nonatomic) NSMutableSet *observes; 33 | @end 34 | 35 | @implementation HLKeyboardNotificationCenter 36 | 37 | + (instancetype)sharedKeyboardNotificationCenter{ 38 | static HLKeyboardNotificationCenter *keyboardNotificationCenter = nil; 39 | static dispatch_once_t onceToken; 40 | dispatch_once(&onceToken, ^{ 41 | keyboardNotificationCenter = [[HLKeyboardNotificationCenter alloc] init]; 42 | }); 43 | return keyboardNotificationCenter; 44 | } 45 | 46 | - (instancetype)init{ 47 | if (self = [super init]) { 48 | self.observes = [NSMutableSet set]; 49 | 50 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillAppear:) name:UIKeyboardWillShowNotification object:nil]; 51 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillDisappear:) name:UIKeyboardWillHideNotification object:nil]; 52 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil]; 53 | } 54 | return self; 55 | } 56 | 57 | 58 | - (void)dealloc{ 59 | 60 | self.observes = nil; 61 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 62 | } 63 | 64 | + (void)reset { 65 | 66 | [[HLKeyboardNotificationCenter sharedKeyboardNotificationCenter].observes removeAllObjects]; 67 | } 68 | 69 | + (void)keyboardWillAppear:(KeyboardWillAppearBlock)keyboardWillAppear willChangeFrame:(KeyboardWillChangeFrameBlock)keyboardWillChangeFrame willDisappear:(KeyboardWillDisappearBlock)keyboardWillDisappear key:(id)key{ 70 | 71 | HLKeyboardBlocks *keyboardBlocks = [[HLKeyboardBlocks alloc] init]; 72 | keyboardBlocks.keyboardWillAppearBlock = keyboardWillAppear; 73 | keyboardBlocks.keyboardWillChangeFrameBlock = keyboardWillChangeFrame; 74 | keyboardBlocks.keyboardWillDisappearBlock = keyboardWillDisappear; 75 | keyboardBlocks.key = key; 76 | 77 | [[HLKeyboardNotificationCenter sharedKeyboardNotificationCenter].observes addObject:keyboardBlocks]; 78 | } 79 | 80 | 81 | + (void)removeForKeyIfNeeded:(id)key { 82 | __block BOOL hasAdded = NO; 83 | [[HLKeyboardNotificationCenter sharedKeyboardNotificationCenter].observes enumerateObjectsUsingBlock:^(HLKeyboardBlocks *obj, BOOL *stop) { 84 | if ([obj.key isEqualToString:key]) { 85 | hasAdded = YES; 86 | *stop = YES; 87 | } 88 | }]; 89 | if (hasAdded) { 90 | [HLKeyboardNotificationCenter removeForKey:key]; 91 | } 92 | } 93 | 94 | + (void)removeForKey:(id)key{ 95 | 96 | NSMutableArray *deleteArray = [NSMutableArray array]; 97 | for (HLKeyboardBlocks *keyboardBlocks in [HLKeyboardNotificationCenter sharedKeyboardNotificationCenter].observes) { 98 | if ([keyboardBlocks.key isEqual:key]) { 99 | [deleteArray addObject:keyboardBlocks]; 100 | } 101 | } 102 | for (HLKeyboardBlocks *keyboardBlock in deleteArray) { 103 | 104 | [[HLKeyboardNotificationCenter sharedKeyboardNotificationCenter].observes removeObject:keyboardBlock]; 105 | } 106 | } 107 | 108 | #pragma mark - notification method 109 | 110 | - (void)keyboardWillAppear:(NSNotification *)notification{ 111 | for (HLKeyboardBlocks *keyboardBlocks in self.observes) { 112 | HLKeyboardInfo *keyboardInfo = [[HLKeyboardInfo alloc] initWithKeyboardDictionary:[notification userInfo]]; 113 | if (keyboardBlocks.keyboardWillAppearBlock) { 114 | keyboardBlocks.keyboardWillAppearBlock(keyboardInfo); 115 | } 116 | } 117 | } 118 | 119 | - (void)keyboardWillDisappear:(NSNotification *)notification{ 120 | for (HLKeyboardBlocks *keyboardBlocks in self.observes) { 121 | HLKeyboardInfo *keyboardInfo = [[HLKeyboardInfo alloc] initWithKeyboardDictionary:[notification userInfo]]; 122 | if (keyboardBlocks.keyboardWillDisappearBlock) { 123 | keyboardBlocks.keyboardWillDisappearBlock(keyboardInfo); 124 | } 125 | } 126 | } 127 | 128 | - (void)keyboardWillChangeFrame:(NSNotification *)notification{ 129 | for (HLKeyboardBlocks *keyboardBlocks in self.observes) { 130 | HLKeyboardInfo *keyboardInfo = [[HLKeyboardInfo alloc] initWithKeyboardDictionary:[notification userInfo]]; 131 | if (keyboardBlocks.keyboardWillChangeFrameBlock) { 132 | keyboardBlocks.keyboardWillChangeFrameBlock(keyboardInfo); 133 | } 134 | } 135 | } 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UIImage+HLColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+HLColor.h 3 | // HLAlertController 4 | // 5 | // Created by String on 15/5/29. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (HLColor) 12 | 13 | + (UIImage *)HL_imageWithColor:(UIColor *)color; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UIImage+HLColor.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+HLColor.m 3 | // HLAlertController 4 | // 5 | // Created by String on 15/5/29. 6 | // Copyright (c) 2015年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "UIImage+HLColor.h" 10 | 11 | @implementation UIImage (HLColor) 12 | 13 | + (UIImage *)HL_imageWithColor:(UIColor *)color { 14 | CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); 15 | UIGraphicsBeginImageContext(rect.size); 16 | CGContextRef context = UIGraphicsGetCurrentContext(); 17 | 18 | CGContextSetFillColorWithColor(context, [color CGColor]); 19 | CGContextFillRect(context, rect); 20 | 21 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 22 | UIGraphicsEndImageContext(); 23 | 24 | return image; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UITextField+HLAdd.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+HLAdd.h 3 | // hoora 4 | // 5 | // Created by String on 16/3/23. 6 | // Copyright © 2016年 Hoora.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITextField (HLAdd) 12 | 13 | - (NSRange)HL_selectedRange; 14 | 15 | - (void)HL_setSelectedRange:(NSRange)range; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UITextField+HLAdd.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+HLAdd.m 3 | // hoora 4 | // 5 | // Created by String on 16/3/23. 6 | // Copyright © 2016年 Hoora.com. All rights reserved. 7 | // 8 | 9 | #import "UITextField+HLAdd.h" 10 | 11 | @implementation UITextField (HLAdd) 12 | 13 | - (NSRange)HL_selectedRange { 14 | 15 | UITextPosition* beginning = self.beginningOfDocument; 16 | 17 | UITextRange* selectedRange = self.selectedTextRange; 18 | UITextPosition* selectionStart = selectedRange.start; 19 | UITextPosition* selectionEnd = selectedRange.end; 20 | 21 | const NSInteger location = [self offsetFromPosition:beginning toPosition:selectionStart]; 22 | const NSInteger length = [self offsetFromPosition:selectionStart toPosition:selectionEnd]; 23 | 24 | return NSMakeRange(location, length); 25 | } 26 | 27 | - (void)HL_setSelectedRange:(NSRange)range { 28 | 29 | UITextPosition* beginning = self.beginningOfDocument; 30 | 31 | UITextPosition* startPosition = [self positionFromPosition:beginning offset:range.location]; 32 | UITextPosition* endPosition = [self positionFromPosition:beginning offset:range.location + range.length]; 33 | UITextRange* selectionRange = [self textRangeFromPosition:startPosition toPosition:endPosition]; 34 | 35 | [self setSelectedTextRange:selectionRange]; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UIView+HLExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HLExtension.h 3 | // HLRefreshView 4 | // 5 | // Created by String on 14/12/27. 6 | // Copyright (c) 2014年 ___string___. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (HLExtension) 12 | @property (assign, nonatomic) CGFloat HL_x; 13 | @property (assign, nonatomic) CGFloat HL_y; 14 | @property (assign, nonatomic) CGFloat HL_width; 15 | @property (assign, nonatomic) CGFloat HL_height; 16 | @property (assign, nonatomic) CGSize HL_size; 17 | @property (assign, nonatomic) CGPoint HL_origin; 18 | 19 | @property (assign, nonatomic) CGFloat HL_top; 20 | @property (assign, nonatomic) CGFloat HL_left; 21 | @property (assign, nonatomic) CGFloat HL_right; 22 | @property (assign, nonatomic) CGFloat HL_bottom; 23 | 24 | @property (assign, nonatomic) CGFloat HL_centerX; 25 | @property (assign, nonatomic) CGFloat HL_centerY; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/HLAlertController/HLAlertController/UIView+HLExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+HLExtension.m 3 | // HLRefreshView 4 | // 5 | // Created by String on 14/12/27. 6 | // Copyright (c) 2014年 ___string___. All rights reserved. 7 | // 8 | 9 | #import "UIView+HLExtension.h" 10 | 11 | @implementation UIView (HLExtension) 12 | 13 | - (void)setHL_x:(CGFloat)HL_x 14 | { 15 | CGRect frame = self.frame; 16 | frame.origin.x = HL_x; 17 | self.frame = frame; 18 | } 19 | 20 | - (CGFloat)HL_x 21 | { 22 | return self.frame.origin.x; 23 | } 24 | 25 | - (void)setHL_y:(CGFloat)HL_y 26 | { 27 | CGRect frame = self.frame; 28 | frame.origin.y = HL_y; 29 | self.frame = frame; 30 | } 31 | 32 | - (CGFloat)HL_y 33 | { 34 | return self.frame.origin.y; 35 | } 36 | 37 | - (void)setHL_width:(CGFloat)HL_width 38 | { 39 | CGRect frame = self.frame; 40 | frame.size.width = HL_width; 41 | self.frame = frame; 42 | } 43 | 44 | - (CGFloat)HL_width 45 | { 46 | return self.frame.size.width; 47 | } 48 | 49 | - (void)setHL_height:(CGFloat)HL_height 50 | { 51 | CGRect frame = self.frame; 52 | frame.size.height = HL_height; 53 | self.frame = frame; 54 | } 55 | 56 | - (CGFloat)HL_height 57 | { 58 | return self.frame.size.height; 59 | } 60 | 61 | - (void)setHL_size:(CGSize)HL_size 62 | { 63 | CGRect frame = self.frame; 64 | frame.size = HL_size; 65 | self.frame = frame; 66 | } 67 | 68 | - (CGSize)HL_size 69 | { 70 | return self.frame.size; 71 | } 72 | 73 | - (void)setHL_origin:(CGPoint)HL_origin 74 | { 75 | CGRect frame = self.frame; 76 | frame.origin = HL_origin; 77 | self.frame = frame; 78 | } 79 | 80 | - (CGPoint)HL_origin 81 | { 82 | return self.frame.origin; 83 | } 84 | 85 | 86 | 87 | 88 | - (CGFloat)HL_top { 89 | return self.HL_y; 90 | } 91 | 92 | - (void)setHL_top:(CGFloat)HL_top { 93 | [self setHL_y:HL_top]; 94 | } 95 | 96 | - (CGFloat)HL_left { 97 | return self.HL_x; 98 | } 99 | 100 | - (void)setHL_left:(CGFloat)HL_left { 101 | [self setHL_x:HL_left]; 102 | } 103 | 104 | - (CGFloat)HL_right { 105 | return self.HL_x + self.HL_width; 106 | } 107 | 108 | - (void)setHL_right:(CGFloat)HL_right { 109 | [self setHL_x:HL_right - self.HL_width]; 110 | } 111 | 112 | - (CGFloat)HL_bottom { 113 | return self.HL_y + self.HL_height; 114 | } 115 | 116 | - (void)setHL_bottom:(CGFloat)HL_bottom { 117 | [self setHL_y:HL_bottom - self.HL_height]; 118 | } 119 | 120 | 121 | 122 | - (CGFloat)HL_centerX { 123 | return self.center.x; 124 | } 125 | 126 | - (void)setHL_centerX:(CGFloat)HL_centerX { 127 | CGPoint center = self.center; 128 | center.x = HL_centerX; 129 | self.center = center; 130 | } 131 | 132 | - (CGFloat)HL_centerY { 133 | return self.center.y; 134 | } 135 | 136 | - (void)setHL_centerY:(CGFloat)HL_centerY { 137 | CGPoint center = self.center; 138 | center.y = HL_centerY; 139 | self.center = center; 140 | } 141 | 142 | @end 143 | -------------------------------------------------------------------------------- /Pods/HLAlertController/README.md: -------------------------------------------------------------------------------- 1 | # HLAlertController 2 | alert to replace system alert. 3 | 4 | easy to use 5 | 6 | HLAlertController *alert = [HLAlertController alertControllerWithTitle:@"标题" message:@"副标题 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行" preferredStyle:style]; 7 | 8 | [alert addAction:[HLAlertAction actionWithTitle:@"取消" style:HLAlertActionStyleCancel handler:^(HLAlertAction *action) { 9 | NSLog(@"button one"); 10 | }]]; 11 | [alert addAction:[HLAlertAction actionWithTitle:@"正常" style:HLAlertActionStyleDefault handler:^(HLAlertAction *action) { 12 | NSLog(@"button two"); 13 | }]]; 14 | [alert addAction:[HLAlertAction actionWithTitle:@"警告" style:HLAlertActionStyleDestructive handler:^(HLAlertAction *action) { 15 | NSLog(@"button three"); 16 | }]]; 17 | 18 | [self presentViewController:alert animated:YES completion:nil]; 19 | 20 | ![alt text](https://github.com/JustString/HLAlertController/blob/master/snap1.PNG "alert") 21 | 22 | ![alt text](https://github.com/JustString/HLAlertController/blob/master/snap2.PNG "actionSheet") 23 | -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/HLAlertController.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/HLAlertTransition.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertTransition.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/HLAlertTransitionController.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertTransitionController.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/HLKeyboardNotificationCenter.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLKeyboardNotificationCenter.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/UIImage+HLColor.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UIImage+HLColor.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/UITextField+HLAdd.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UITextField+HLAdd.h -------------------------------------------------------------------------------- /Pods/Headers/Private/HLAlertController/UIView+HLExtension.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UIView+HLExtension.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/HLAlertController.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/HLAlertTransition.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertTransition.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/HLAlertTransitionController.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLAlertTransitionController.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/HLKeyboardNotificationCenter.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/HLKeyboardNotificationCenter.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/UIImage+HLColor.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UIImage+HLColor.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/UITextField+HLAdd.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UITextField+HLAdd.h -------------------------------------------------------------------------------- /Pods/Headers/Public/HLAlertController/UIView+HLExtension.h: -------------------------------------------------------------------------------- 1 | ../../../HLAlertController/HLAlertController/UIView+HLExtension.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - HLAlertController (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - HLAlertController (~> 1.0.0) 6 | 7 | SPEC CHECKSUMS: 8 | HLAlertController: a9e2690482fd083519fca94fb1b50fef95ef2275 9 | 10 | COCOAPODS: 0.39.0 11 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | archiveVersion 6 | 1 7 | classes 8 | 9 | objectVersion 10 | 46 11 | objects 12 | 13 | 037C0CA694176A3C0915F62C9D20B3E6 14 | 15 | children 16 | 17 | B3D1D13E0C6553800746CB8FD61CF946 18 | 19 | isa 20 | PBXGroup 21 | name 22 | Targets Support Files 23 | sourceTree 24 | <group> 25 | 26 | 052A17875CB827423D627183396CEB60 27 | 28 | buildSettings 29 | 30 | ALWAYS_SEARCH_USER_PATHS 31 | NO 32 | CLANG_CXX_LANGUAGE_STANDARD 33 | gnu++0x 34 | CLANG_CXX_LIBRARY 35 | libc++ 36 | CLANG_ENABLE_MODULES 37 | YES 38 | CLANG_ENABLE_OBJC_ARC 39 | YES 40 | CLANG_WARN_BOOL_CONVERSION 41 | YES 42 | CLANG_WARN_CONSTANT_CONVERSION 43 | YES 44 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 45 | YES 46 | CLANG_WARN_EMPTY_BODY 47 | YES 48 | CLANG_WARN_ENUM_CONVERSION 49 | YES 50 | CLANG_WARN_INT_CONVERSION 51 | YES 52 | CLANG_WARN_OBJC_ROOT_CLASS 53 | YES 54 | CLANG_WARN_UNREACHABLE_CODE 55 | YES 56 | CLANG_WARN__DUPLICATE_METHOD_MATCH 57 | YES 58 | COPY_PHASE_STRIP 59 | YES 60 | ENABLE_NS_ASSERTIONS 61 | NO 62 | GCC_C_LANGUAGE_STANDARD 63 | gnu99 64 | GCC_PREPROCESSOR_DEFINITIONS 65 | 66 | RELEASE=1 67 | 68 | GCC_WARN_64_TO_32_BIT_CONVERSION 69 | YES 70 | GCC_WARN_ABOUT_RETURN_TYPE 71 | YES 72 | GCC_WARN_UNDECLARED_SELECTOR 73 | YES 74 | GCC_WARN_UNINITIALIZED_AUTOS 75 | YES 76 | GCC_WARN_UNUSED_FUNCTION 77 | YES 78 | GCC_WARN_UNUSED_VARIABLE 79 | YES 80 | IPHONEOS_DEPLOYMENT_TARGET 81 | 7.0 82 | STRIP_INSTALLED_PRODUCT 83 | NO 84 | SYMROOT 85 | ${SRCROOT}/../build 86 | VALIDATE_PRODUCT 87 | YES 88 | 89 | isa 90 | XCBuildConfiguration 91 | name 92 | Release 93 | 94 | 06B5F0D45F39E0CBDC59A21D5A6F7E88 95 | 96 | fileRef 97 | 151196C0230FB68039877BE3CDF69ABD 98 | isa 99 | PBXBuildFile 100 | 101 | 08F688CFE52AB690E1989AE955A6F14B 102 | 103 | includeInIndex 104 | 1 105 | isa 106 | PBXFileReference 107 | lastKnownFileType 108 | sourcecode.c.objc 109 | name 110 | UIView+HLExtension.m 111 | path 112 | HLAlertController/UIView+HLExtension.m 113 | sourceTree 114 | <group> 115 | 116 | 10834806BD7B412BC24F347361FA2C8E 117 | 118 | includeInIndex 119 | 1 120 | isa 121 | PBXFileReference 122 | lastKnownFileType 123 | text.plist.xml 124 | path 125 | Pods-acknowledgements.plist 126 | sourceTree 127 | <group> 128 | 129 | 151196C0230FB68039877BE3CDF69ABD 130 | 131 | includeInIndex 132 | 1 133 | isa 134 | PBXFileReference 135 | lastKnownFileType 136 | sourcecode.c.objc 137 | name 138 | UITextField+HLAdd.m 139 | path 140 | HLAlertController/UITextField+HLAdd.m 141 | sourceTree 142 | <group> 143 | 144 | 18340F12838DEE43507667CC74401EB1 145 | 146 | children 147 | 148 | 6E7E5AF37923BFA48D6994B9BFC6535F 149 | C3B7BDF5CE5CB8F095FE12DA55D9A9BB 150 | 151 | isa 152 | PBXGroup 153 | name 154 | iOS 155 | sourceTree 156 | <group> 157 | 158 | 1B08CF51ED47F1E8407794255DD4BA42 159 | 160 | children 161 | 162 | 909704EF6C418E31820824D49DFE3116 163 | 8B65923CBCF4C76A04A6C75401D96CF9 164 | B03D6E26E03662F6DE436C411B2C5D2E 165 | A1E7F95BEE96E32869B14BE6969D3546 166 | A3A2B0EEBD2E17F64B3B6D849FA016FE 167 | 730343B33A9C06772D58E3C51B87316D 168 | C625EA327B7373367862C8531061BFB1 169 | 3F1469B9AF733716A3DC12B78ED267F8 170 | 948DECDD3FD0DA32724AB090BB860E52 171 | 98663CA678C2CE45F00FFEF80F9B4F29 172 | F939D90507C2F675657C2FD01612849F 173 | 151196C0230FB68039877BE3CDF69ABD 174 | 3C8821FDBB2BAAC53E8CD6D2225D6B2C 175 | 08F688CFE52AB690E1989AE955A6F14B 176 | 6D1E45CA5F9B2F930DD9B63076D1F689 177 | 178 | isa 179 | PBXGroup 180 | name 181 | HLAlertController 182 | path 183 | HLAlertController 184 | sourceTree 185 | <group> 186 | 187 | 1CFDAE72FECB6B20BBE72636D7C49EC1 188 | 189 | baseConfigurationReference 190 | 98C98CDFB3F20F2925F6CD1F141BB14F 191 | buildSettings 192 | 193 | ENABLE_STRICT_OBJC_MSGSEND 194 | YES 195 | IPHONEOS_DEPLOYMENT_TARGET 196 | 7.0 197 | MACH_O_TYPE 198 | staticlib 199 | MTL_ENABLE_DEBUG_INFO 200 | NO 201 | OTHER_LDFLAGS 202 | 203 | OTHER_LIBTOOLFLAGS 204 | 205 | PODS_ROOT 206 | $(SRCROOT) 207 | PRODUCT_NAME 208 | $(TARGET_NAME) 209 | SDKROOT 210 | iphoneos 211 | SKIP_INSTALL 212 | YES 213 | 214 | isa 215 | XCBuildConfiguration 216 | name 217 | Release 218 | 219 | 214CCE3D22EB4DBBC58E8FB752BEDE27 220 | 221 | fileRef 222 | 730343B33A9C06772D58E3C51B87316D 223 | isa 224 | PBXBuildFile 225 | 226 | 22606FD78C4AAAEC274EAB2E51C72E68 227 | 228 | buildActionMask 229 | 2147483647 230 | files 231 | 232 | 3DDD1759908D998C2DEB31290FF1A26A 233 | 59A7030BDD0CC3D1CFC9E08EE4275674 234 | 235 | isa 236 | PBXFrameworksBuildPhase 237 | runOnlyForDeploymentPostprocessing 238 | 0 239 | 240 | 25AC8037D2A81A68005F83CA1CEE0DA2 241 | 242 | fileRef 243 | A3A2B0EEBD2E17F64B3B6D849FA016FE 244 | isa 245 | PBXBuildFile 246 | settings 247 | 248 | ATTRIBUTES 249 | 250 | Public 251 | 252 | 253 | 254 | 272643F56613CA0D336AE3DBF19DC404 255 | 256 | includeInIndex 257 | 1 258 | isa 259 | PBXFileReference 260 | lastKnownFileType 261 | sourcecode.c.objc 262 | path 263 | Pods-dummy.m 264 | sourceTree 265 | <group> 266 | 267 | 286789A2BDC92FC139ECBB4CAEB8764D 268 | 269 | containerPortal 270 | D41D8CD98F00B204E9800998ECF8427E 271 | isa 272 | PBXContainerItemProxy 273 | proxyType 274 | 1 275 | remoteGlobalIDString 276 | 72E23FC75534A80D21A4DE95E8A7E0BE 277 | remoteInfo 278 | HLAlertController 279 | 280 | 2D8E8EC45A3A1A1D94AE762CB5028504 281 | 282 | buildConfigurations 283 | 284 | B37F0F91F85060E28F1DAAB522DC7EC1 285 | 052A17875CB827423D627183396CEB60 286 | 287 | defaultConfigurationIsVisible 288 | 0 289 | defaultConfigurationName 290 | Release 291 | isa 292 | XCConfigurationList 293 | 294 | 32F84FBC74494AE8BE9A1C11EC144594 295 | 296 | fileRef 297 | A31A2E5CDE492910A05636566DEEC706 298 | isa 299 | PBXBuildFile 300 | 301 | 37DB56D75062CC75FCB0966E1C6E8A8E 302 | 303 | includeInIndex 304 | 1 305 | isa 306 | PBXFileReference 307 | lastKnownFileType 308 | text 309 | path 310 | Pods-acknowledgements.markdown 311 | sourceTree 312 | <group> 313 | 314 | 3C8821FDBB2BAAC53E8CD6D2225D6B2C 315 | 316 | includeInIndex 317 | 1 318 | isa 319 | PBXFileReference 320 | lastKnownFileType 321 | sourcecode.c.h 322 | name 323 | UIView+HLExtension.h 324 | path 325 | HLAlertController/UIView+HLExtension.h 326 | sourceTree 327 | <group> 328 | 329 | 3D3C883E707BFE087A06296F90EF5C1C 330 | 331 | children 332 | 333 | 9703C68AE2E4684B12C6E22B47475022 334 | 689B25973B8B3BC0176B85154A7E8225 335 | 336 | isa 337 | PBXGroup 338 | name 339 | Products 340 | sourceTree 341 | <group> 342 | 343 | 3DDD1759908D998C2DEB31290FF1A26A 344 | 345 | fileRef 346 | 6E7E5AF37923BFA48D6994B9BFC6535F 347 | isa 348 | PBXBuildFile 349 | 350 | 3F1469B9AF733716A3DC12B78ED267F8 351 | 352 | includeInIndex 353 | 1 354 | isa 355 | PBXFileReference 356 | lastKnownFileType 357 | sourcecode.c.objc 358 | name 359 | HLKeyboardNotificationCenter.m 360 | path 361 | HLAlertController/HLKeyboardNotificationCenter.m 362 | sourceTree 363 | <group> 364 | 365 | 4192D319C1233B97A0B8DA6A8C0FF0DD 366 | 367 | buildActionMask 368 | 2147483647 369 | files 370 | 371 | 62C93B1E7D3AF9DEF91CEF960829E74F 372 | 66E55CC47F9378A4E45485B5C2867473 373 | 25AC8037D2A81A68005F83CA1CEE0DA2 374 | 4AC5250478BB6F5E6D309FF7DFD6F887 375 | F1DA796C348C899F9C97633349EFA27F 376 | AAED67FE0DB12409BEAE1C83122845E3 377 | CF8809F54870C2EE81A4AEAE9A755A7C 378 | 379 | isa 380 | PBXHeadersBuildPhase 381 | runOnlyForDeploymentPostprocessing 382 | 0 383 | 384 | 433CD3331B6C3787F473C941B61FC68F 385 | 386 | children 387 | 388 | 18340F12838DEE43507667CC74401EB1 389 | 390 | isa 391 | PBXGroup 392 | name 393 | Frameworks 394 | sourceTree 395 | <group> 396 | 397 | 4AC5250478BB6F5E6D309FF7DFD6F887 398 | 399 | fileRef 400 | C625EA327B7373367862C8531061BFB1 401 | isa 402 | PBXBuildFile 403 | settings 404 | 405 | ATTRIBUTES 406 | 407 | Public 408 | 409 | 410 | 411 | 4E762F23EC34ED4A6FF3312D84E33A40 412 | 413 | includeInIndex 414 | 1 415 | isa 416 | PBXFileReference 417 | lastKnownFileType 418 | text.xcconfig 419 | path 420 | Pods.debug.xcconfig 421 | sourceTree 422 | <group> 423 | 424 | 53AA95481C30FB5199DEC3D86E0A480C 425 | 426 | buildConfigurationList 427 | 96F69E53E83243F69BF0CB290C7560D3 428 | buildPhases 429 | 430 | 5A75198DF906072F8629F30D267C800A 431 | F83ADE18563B996CAA48C50D2D438315 432 | 433 | buildRules 434 | 435 | dependencies 436 | 437 | 9F94FEE6D2DB0925C36BAC8563D8446A 438 | 439 | isa 440 | PBXNativeTarget 441 | name 442 | Pods 443 | productName 444 | Pods 445 | productReference 446 | 689B25973B8B3BC0176B85154A7E8225 447 | productType 448 | com.apple.product-type.library.static 449 | 450 | 59A7030BDD0CC3D1CFC9E08EE4275674 451 | 452 | fileRef 453 | C3B7BDF5CE5CB8F095FE12DA55D9A9BB 454 | isa 455 | PBXBuildFile 456 | 457 | 5A75198DF906072F8629F30D267C800A 458 | 459 | buildActionMask 460 | 2147483647 461 | files 462 | 463 | 8647D20CB6A0ECD6FE4CFF1C09513E7E 464 | 465 | isa 466 | PBXSourcesBuildPhase 467 | runOnlyForDeploymentPostprocessing 468 | 0 469 | 470 | 62C93B1E7D3AF9DEF91CEF960829E74F 471 | 472 | fileRef 473 | 909704EF6C418E31820824D49DFE3116 474 | isa 475 | PBXBuildFile 476 | settings 477 | 478 | ATTRIBUTES 479 | 480 | Public 481 | 482 | 483 | 484 | 66E55CC47F9378A4E45485B5C2867473 485 | 486 | fileRef 487 | B03D6E26E03662F6DE436C411B2C5D2E 488 | isa 489 | PBXBuildFile 490 | settings 491 | 492 | ATTRIBUTES 493 | 494 | Public 495 | 496 | 497 | 498 | 689B25973B8B3BC0176B85154A7E8225 499 | 500 | explicitFileType 501 | archive.ar 502 | includeInIndex 503 | 0 504 | isa 505 | PBXFileReference 506 | name 507 | libPods.a 508 | path 509 | libPods.a 510 | sourceTree 511 | BUILT_PRODUCTS_DIR 512 | 513 | 6911BECA35E7518D864239B7E898EEF3 514 | 515 | includeInIndex 516 | 1 517 | isa 518 | PBXFileReference 519 | lastKnownFileType 520 | text.script.sh 521 | path 522 | Pods-frameworks.sh 523 | sourceTree 524 | <group> 525 | 526 | 6D1E45CA5F9B2F930DD9B63076D1F689 527 | 528 | children 529 | 530 | B24701AF33B26835B5242D9F027B7416 531 | A31A2E5CDE492910A05636566DEEC706 532 | CC7BEEAC4151064777B4978159B3E691 533 | 534 | isa 535 | PBXGroup 536 | name 537 | Support Files 538 | path 539 | ../Target Support Files/HLAlertController 540 | sourceTree 541 | <group> 542 | 543 | 6E7E5AF37923BFA48D6994B9BFC6535F 544 | 545 | isa 546 | PBXFileReference 547 | lastKnownFileType 548 | wrapper.framework 549 | name 550 | Foundation.framework 551 | path 552 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework 553 | sourceTree 554 | DEVELOPER_DIR 555 | 556 | 72E23FC75534A80D21A4DE95E8A7E0BE 557 | 558 | buildConfigurationList 559 | 9DEC87E91610E0230CBD899592DCB5A9 560 | buildPhases 561 | 562 | B663AD892333BDC10346639AFB5DC323 563 | 22606FD78C4AAAEC274EAB2E51C72E68 564 | 4192D319C1233B97A0B8DA6A8C0FF0DD 565 | 566 | buildRules 567 | 568 | dependencies 569 | 570 | isa 571 | PBXNativeTarget 572 | name 573 | HLAlertController 574 | productName 575 | HLAlertController 576 | productReference 577 | 9703C68AE2E4684B12C6E22B47475022 578 | productType 579 | com.apple.product-type.library.static 580 | 581 | 730343B33A9C06772D58E3C51B87316D 582 | 583 | includeInIndex 584 | 1 585 | isa 586 | PBXFileReference 587 | lastKnownFileType 588 | sourcecode.c.objc 589 | name 590 | HLAlertTransitionController.m 591 | path 592 | HLAlertController/HLAlertTransitionController.m 593 | sourceTree 594 | <group> 595 | 596 | 7D5C593060666256DD23F7A822F975C9 597 | 598 | fileRef 599 | 8B65923CBCF4C76A04A6C75401D96CF9 600 | isa 601 | PBXBuildFile 602 | 603 | 7DB346D0F39D3F0E887471402A8071AB 604 | 605 | children 606 | 607 | BA6428E9F66FD5A23C0A2E06ED26CD2F 608 | 433CD3331B6C3787F473C941B61FC68F 609 | F0FA0B89106D3181FDB4561DC38E4DD5 610 | 3D3C883E707BFE087A06296F90EF5C1C 611 | 037C0CA694176A3C0915F62C9D20B3E6 612 | 613 | isa 614 | PBXGroup 615 | sourceTree 616 | <group> 617 | 618 | 8647D20CB6A0ECD6FE4CFF1C09513E7E 619 | 620 | fileRef 621 | 272643F56613CA0D336AE3DBF19DC404 622 | isa 623 | PBXBuildFile 624 | 625 | 8B65923CBCF4C76A04A6C75401D96CF9 626 | 627 | includeInIndex 628 | 1 629 | isa 630 | PBXFileReference 631 | lastKnownFileType 632 | sourcecode.c.objc 633 | name 634 | HLAlertController.m 635 | path 636 | HLAlertController/HLAlertController.m 637 | sourceTree 638 | <group> 639 | 640 | 909704EF6C418E31820824D49DFE3116 641 | 642 | includeInIndex 643 | 1 644 | isa 645 | PBXFileReference 646 | lastKnownFileType 647 | sourcecode.c.h 648 | name 649 | HLAlertController.h 650 | path 651 | HLAlertController/HLAlertController.h 652 | sourceTree 653 | <group> 654 | 655 | 948DECDD3FD0DA32724AB090BB860E52 656 | 657 | includeInIndex 658 | 1 659 | isa 660 | PBXFileReference 661 | lastKnownFileType 662 | sourcecode.c.h 663 | name 664 | UIImage+HLColor.h 665 | path 666 | HLAlertController/UIImage+HLColor.h 667 | sourceTree 668 | <group> 669 | 670 | 96F69E53E83243F69BF0CB290C7560D3 671 | 672 | buildConfigurations 673 | 674 | EBFF9E23824F195EC75A90BE2296995F 675 | 1CFDAE72FECB6B20BBE72636D7C49EC1 676 | 677 | defaultConfigurationIsVisible 678 | 0 679 | defaultConfigurationName 680 | Release 681 | isa 682 | XCConfigurationList 683 | 684 | 9703C68AE2E4684B12C6E22B47475022 685 | 686 | explicitFileType 687 | archive.ar 688 | includeInIndex 689 | 0 690 | isa 691 | PBXFileReference 692 | name 693 | libHLAlertController.a 694 | path 695 | libHLAlertController.a 696 | sourceTree 697 | BUILT_PRODUCTS_DIR 698 | 699 | 98663CA678C2CE45F00FFEF80F9B4F29 700 | 701 | includeInIndex 702 | 1 703 | isa 704 | PBXFileReference 705 | lastKnownFileType 706 | sourcecode.c.objc 707 | name 708 | UIImage+HLColor.m 709 | path 710 | HLAlertController/UIImage+HLColor.m 711 | sourceTree 712 | <group> 713 | 714 | 98C98CDFB3F20F2925F6CD1F141BB14F 715 | 716 | includeInIndex 717 | 1 718 | isa 719 | PBXFileReference 720 | lastKnownFileType 721 | text.xcconfig 722 | path 723 | Pods.release.xcconfig 724 | sourceTree 725 | <group> 726 | 727 | 9DAE29EBF7FB3A5D254B4E7C0FDC8A78 728 | 729 | baseConfigurationReference 730 | B24701AF33B26835B5242D9F027B7416 731 | buildSettings 732 | 733 | ENABLE_STRICT_OBJC_MSGSEND 734 | YES 735 | GCC_PREFIX_HEADER 736 | Target Support Files/HLAlertController/HLAlertController-prefix.pch 737 | IPHONEOS_DEPLOYMENT_TARGET 738 | 7.0 739 | MTL_ENABLE_DEBUG_INFO 740 | NO 741 | OTHER_LDFLAGS 742 | 743 | OTHER_LIBTOOLFLAGS 744 | 745 | PRIVATE_HEADERS_FOLDER_PATH 746 | 747 | PRODUCT_NAME 748 | $(TARGET_NAME) 749 | PUBLIC_HEADERS_FOLDER_PATH 750 | 751 | SDKROOT 752 | iphoneos 753 | SKIP_INSTALL 754 | YES 755 | 756 | isa 757 | XCBuildConfiguration 758 | name 759 | Release 760 | 761 | 9DEC87E91610E0230CBD899592DCB5A9 762 | 763 | buildConfigurations 764 | 765 | DEAB9B685AF351F0073E5A2869730F03 766 | 9DAE29EBF7FB3A5D254B4E7C0FDC8A78 767 | 768 | defaultConfigurationIsVisible 769 | 0 770 | defaultConfigurationName 771 | Release 772 | isa 773 | XCConfigurationList 774 | 775 | 9F94FEE6D2DB0925C36BAC8563D8446A 776 | 777 | isa 778 | PBXTargetDependency 779 | name 780 | HLAlertController 781 | target 782 | 72E23FC75534A80D21A4DE95E8A7E0BE 783 | targetProxy 784 | 286789A2BDC92FC139ECBB4CAEB8764D 785 | 786 | A1A36D34413696BE466E2CA0AFF194DA 787 | 788 | includeInIndex 789 | 1 790 | isa 791 | PBXFileReference 792 | lastKnownFileType 793 | text.script.sh 794 | path 795 | Pods-resources.sh 796 | sourceTree 797 | <group> 798 | 799 | A1E7F95BEE96E32869B14BE6969D3546 800 | 801 | includeInIndex 802 | 1 803 | isa 804 | PBXFileReference 805 | lastKnownFileType 806 | sourcecode.c.objc 807 | name 808 | HLAlertTransition.m 809 | path 810 | HLAlertController/HLAlertTransition.m 811 | sourceTree 812 | <group> 813 | 814 | A31A2E5CDE492910A05636566DEEC706 815 | 816 | includeInIndex 817 | 1 818 | isa 819 | PBXFileReference 820 | lastKnownFileType 821 | sourcecode.c.objc 822 | path 823 | HLAlertController-dummy.m 824 | sourceTree 825 | <group> 826 | 827 | A3A2B0EEBD2E17F64B3B6D849FA016FE 828 | 829 | includeInIndex 830 | 1 831 | isa 832 | PBXFileReference 833 | lastKnownFileType 834 | sourcecode.c.h 835 | name 836 | HLAlertTransitionController.h 837 | path 838 | HLAlertController/HLAlertTransitionController.h 839 | sourceTree 840 | <group> 841 | 842 | AAED67FE0DB12409BEAE1C83122845E3 843 | 844 | fileRef 845 | F939D90507C2F675657C2FD01612849F 846 | isa 847 | PBXBuildFile 848 | settings 849 | 850 | ATTRIBUTES 851 | 852 | Public 853 | 854 | 855 | 856 | AF875E0B17C7128D67ACCA91364E6D4C 857 | 858 | fileRef 859 | 3F1469B9AF733716A3DC12B78ED267F8 860 | isa 861 | PBXBuildFile 862 | 863 | B03D6E26E03662F6DE436C411B2C5D2E 864 | 865 | includeInIndex 866 | 1 867 | isa 868 | PBXFileReference 869 | lastKnownFileType 870 | sourcecode.c.h 871 | name 872 | HLAlertTransition.h 873 | path 874 | HLAlertController/HLAlertTransition.h 875 | sourceTree 876 | <group> 877 | 878 | B24701AF33B26835B5242D9F027B7416 879 | 880 | includeInIndex 881 | 1 882 | isa 883 | PBXFileReference 884 | lastKnownFileType 885 | text.xcconfig 886 | path 887 | HLAlertController.xcconfig 888 | sourceTree 889 | <group> 890 | 891 | B37F0F91F85060E28F1DAAB522DC7EC1 892 | 893 | buildSettings 894 | 895 | ALWAYS_SEARCH_USER_PATHS 896 | NO 897 | CLANG_CXX_LANGUAGE_STANDARD 898 | gnu++0x 899 | CLANG_CXX_LIBRARY 900 | libc++ 901 | CLANG_ENABLE_MODULES 902 | YES 903 | CLANG_ENABLE_OBJC_ARC 904 | YES 905 | CLANG_WARN_BOOL_CONVERSION 906 | YES 907 | CLANG_WARN_CONSTANT_CONVERSION 908 | YES 909 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE 910 | YES 911 | CLANG_WARN_EMPTY_BODY 912 | YES 913 | CLANG_WARN_ENUM_CONVERSION 914 | YES 915 | CLANG_WARN_INT_CONVERSION 916 | YES 917 | CLANG_WARN_OBJC_ROOT_CLASS 918 | YES 919 | CLANG_WARN_UNREACHABLE_CODE 920 | YES 921 | CLANG_WARN__DUPLICATE_METHOD_MATCH 922 | YES 923 | COPY_PHASE_STRIP 924 | NO 925 | GCC_C_LANGUAGE_STANDARD 926 | gnu99 927 | GCC_DYNAMIC_NO_PIC 928 | NO 929 | GCC_OPTIMIZATION_LEVEL 930 | 0 931 | GCC_PREPROCESSOR_DEFINITIONS 932 | 933 | DEBUG=1 934 | $(inherited) 935 | 936 | GCC_SYMBOLS_PRIVATE_EXTERN 937 | NO 938 | GCC_WARN_64_TO_32_BIT_CONVERSION 939 | YES 940 | GCC_WARN_ABOUT_RETURN_TYPE 941 | YES 942 | GCC_WARN_UNDECLARED_SELECTOR 943 | YES 944 | GCC_WARN_UNINITIALIZED_AUTOS 945 | YES 946 | GCC_WARN_UNUSED_FUNCTION 947 | YES 948 | GCC_WARN_UNUSED_VARIABLE 949 | YES 950 | IPHONEOS_DEPLOYMENT_TARGET 951 | 7.0 952 | ONLY_ACTIVE_ARCH 953 | YES 954 | STRIP_INSTALLED_PRODUCT 955 | NO 956 | SYMROOT 957 | ${SRCROOT}/../build 958 | 959 | isa 960 | XCBuildConfiguration 961 | name 962 | Debug 963 | 964 | B3D1D13E0C6553800746CB8FD61CF946 965 | 966 | children 967 | 968 | 37DB56D75062CC75FCB0966E1C6E8A8E 969 | 10834806BD7B412BC24F347361FA2C8E 970 | 272643F56613CA0D336AE3DBF19DC404 971 | 6911BECA35E7518D864239B7E898EEF3 972 | A1A36D34413696BE466E2CA0AFF194DA 973 | 4E762F23EC34ED4A6FF3312D84E33A40 974 | 98C98CDFB3F20F2925F6CD1F141BB14F 975 | 976 | isa 977 | PBXGroup 978 | name 979 | Pods 980 | path 981 | Target Support Files/Pods 982 | sourceTree 983 | <group> 984 | 985 | B5164515D3035072B6AFC13CBAEE280A 986 | 987 | fileRef 988 | 6E7E5AF37923BFA48D6994B9BFC6535F 989 | isa 990 | PBXBuildFile 991 | 992 | B663AD892333BDC10346639AFB5DC323 993 | 994 | buildActionMask 995 | 2147483647 996 | files 997 | 998 | 32F84FBC74494AE8BE9A1C11EC144594 999 | 7D5C593060666256DD23F7A822F975C9 1000 | E5330CACBB8A1ECBECFF4BC47072FE77 1001 | 214CCE3D22EB4DBBC58E8FB752BEDE27 1002 | AF875E0B17C7128D67ACCA91364E6D4C 1003 | C2D99F163BE377FA4DCA951C5FC4559A 1004 | 06B5F0D45F39E0CBDC59A21D5A6F7E88 1005 | F6CC2FB3D2DE0FFAC5BDEB59870417BA 1006 | 1007 | isa 1008 | PBXSourcesBuildPhase 1009 | runOnlyForDeploymentPostprocessing 1010 | 0 1011 | 1012 | BA6428E9F66FD5A23C0A2E06ED26CD2F 1013 | 1014 | includeInIndex 1015 | 1 1016 | isa 1017 | PBXFileReference 1018 | lastKnownFileType 1019 | text 1020 | name 1021 | Podfile 1022 | path 1023 | ../Podfile 1024 | sourceTree 1025 | SOURCE_ROOT 1026 | xcLanguageSpecificationIdentifier 1027 | xcode.lang.ruby 1028 | 1029 | C2D99F163BE377FA4DCA951C5FC4559A 1030 | 1031 | fileRef 1032 | 98663CA678C2CE45F00FFEF80F9B4F29 1033 | isa 1034 | PBXBuildFile 1035 | 1036 | C3B7BDF5CE5CB8F095FE12DA55D9A9BB 1037 | 1038 | isa 1039 | PBXFileReference 1040 | lastKnownFileType 1041 | wrapper.framework 1042 | name 1043 | UIKit.framework 1044 | path 1045 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework 1046 | sourceTree 1047 | DEVELOPER_DIR 1048 | 1049 | C625EA327B7373367862C8531061BFB1 1050 | 1051 | includeInIndex 1052 | 1 1053 | isa 1054 | PBXFileReference 1055 | lastKnownFileType 1056 | sourcecode.c.h 1057 | name 1058 | HLKeyboardNotificationCenter.h 1059 | path 1060 | HLAlertController/HLKeyboardNotificationCenter.h 1061 | sourceTree 1062 | <group> 1063 | 1064 | CC7BEEAC4151064777B4978159B3E691 1065 | 1066 | includeInIndex 1067 | 1 1068 | isa 1069 | PBXFileReference 1070 | lastKnownFileType 1071 | sourcecode.c.h 1072 | path 1073 | HLAlertController-prefix.pch 1074 | sourceTree 1075 | <group> 1076 | 1077 | CF8809F54870C2EE81A4AEAE9A755A7C 1078 | 1079 | fileRef 1080 | 3C8821FDBB2BAAC53E8CD6D2225D6B2C 1081 | isa 1082 | PBXBuildFile 1083 | settings 1084 | 1085 | ATTRIBUTES 1086 | 1087 | Public 1088 | 1089 | 1090 | 1091 | D41D8CD98F00B204E9800998ECF8427E 1092 | 1093 | attributes 1094 | 1095 | LastSwiftUpdateCheck 1096 | 0700 1097 | LastUpgradeCheck 1098 | 0700 1099 | 1100 | buildConfigurationList 1101 | 2D8E8EC45A3A1A1D94AE762CB5028504 1102 | compatibilityVersion 1103 | Xcode 3.2 1104 | developmentRegion 1105 | English 1106 | hasScannedForEncodings 1107 | 0 1108 | isa 1109 | PBXProject 1110 | knownRegions 1111 | 1112 | en 1113 | 1114 | mainGroup 1115 | 7DB346D0F39D3F0E887471402A8071AB 1116 | productRefGroup 1117 | 3D3C883E707BFE087A06296F90EF5C1C 1118 | projectDirPath 1119 | 1120 | projectReferences 1121 | 1122 | projectRoot 1123 | 1124 | targets 1125 | 1126 | 72E23FC75534A80D21A4DE95E8A7E0BE 1127 | 53AA95481C30FB5199DEC3D86E0A480C 1128 | 1129 | 1130 | DEAB9B685AF351F0073E5A2869730F03 1131 | 1132 | baseConfigurationReference 1133 | B24701AF33B26835B5242D9F027B7416 1134 | buildSettings 1135 | 1136 | ENABLE_STRICT_OBJC_MSGSEND 1137 | YES 1138 | GCC_PREFIX_HEADER 1139 | Target Support Files/HLAlertController/HLAlertController-prefix.pch 1140 | IPHONEOS_DEPLOYMENT_TARGET 1141 | 7.0 1142 | MTL_ENABLE_DEBUG_INFO 1143 | YES 1144 | OTHER_LDFLAGS 1145 | 1146 | OTHER_LIBTOOLFLAGS 1147 | 1148 | PRIVATE_HEADERS_FOLDER_PATH 1149 | 1150 | PRODUCT_NAME 1151 | $(TARGET_NAME) 1152 | PUBLIC_HEADERS_FOLDER_PATH 1153 | 1154 | SDKROOT 1155 | iphoneos 1156 | SKIP_INSTALL 1157 | YES 1158 | 1159 | isa 1160 | XCBuildConfiguration 1161 | name 1162 | Debug 1163 | 1164 | E5330CACBB8A1ECBECFF4BC47072FE77 1165 | 1166 | fileRef 1167 | A1E7F95BEE96E32869B14BE6969D3546 1168 | isa 1169 | PBXBuildFile 1170 | 1171 | EBFF9E23824F195EC75A90BE2296995F 1172 | 1173 | baseConfigurationReference 1174 | 4E762F23EC34ED4A6FF3312D84E33A40 1175 | buildSettings 1176 | 1177 | ENABLE_STRICT_OBJC_MSGSEND 1178 | YES 1179 | IPHONEOS_DEPLOYMENT_TARGET 1180 | 7.0 1181 | MACH_O_TYPE 1182 | staticlib 1183 | MTL_ENABLE_DEBUG_INFO 1184 | YES 1185 | OTHER_LDFLAGS 1186 | 1187 | OTHER_LIBTOOLFLAGS 1188 | 1189 | PODS_ROOT 1190 | $(SRCROOT) 1191 | PRODUCT_NAME 1192 | $(TARGET_NAME) 1193 | SDKROOT 1194 | iphoneos 1195 | SKIP_INSTALL 1196 | YES 1197 | 1198 | isa 1199 | XCBuildConfiguration 1200 | name 1201 | Debug 1202 | 1203 | F0FA0B89106D3181FDB4561DC38E4DD5 1204 | 1205 | children 1206 | 1207 | 1B08CF51ED47F1E8407794255DD4BA42 1208 | 1209 | isa 1210 | PBXGroup 1211 | name 1212 | Pods 1213 | sourceTree 1214 | <group> 1215 | 1216 | F1DA796C348C899F9C97633349EFA27F 1217 | 1218 | fileRef 1219 | 948DECDD3FD0DA32724AB090BB860E52 1220 | isa 1221 | PBXBuildFile 1222 | settings 1223 | 1224 | ATTRIBUTES 1225 | 1226 | Public 1227 | 1228 | 1229 | 1230 | F6CC2FB3D2DE0FFAC5BDEB59870417BA 1231 | 1232 | fileRef 1233 | 08F688CFE52AB690E1989AE955A6F14B 1234 | isa 1235 | PBXBuildFile 1236 | 1237 | F83ADE18563B996CAA48C50D2D438315 1238 | 1239 | buildActionMask 1240 | 2147483647 1241 | files 1242 | 1243 | B5164515D3035072B6AFC13CBAEE280A 1244 | 1245 | isa 1246 | PBXFrameworksBuildPhase 1247 | runOnlyForDeploymentPostprocessing 1248 | 0 1249 | 1250 | F939D90507C2F675657C2FD01612849F 1251 | 1252 | includeInIndex 1253 | 1 1254 | isa 1255 | PBXFileReference 1256 | lastKnownFileType 1257 | sourcecode.c.h 1258 | name 1259 | UITextField+HLAdd.h 1260 | path 1261 | HLAlertController/UITextField+HLAdd.h 1262 | sourceTree 1263 | <group> 1264 | 1265 | 1266 | rootObject 1267 | D41D8CD98F00B204E9800998ECF8427E 1268 | 1269 | 1270 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/string.xcuserdatad/xcschemes/HLAlertController.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/string.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/string.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HLAlertController.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Pods.xcscheme 13 | 14 | isShown 15 | 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 53AA95481C30FB5199DEC3D86E0A480C 21 | 22 | primary 23 | 24 | 25 | 72E23FC75534A80D21A4DE95E8A7E0BE 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HLAlertController/HLAlertController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_HLAlertController : NSObject 3 | @end 4 | @implementation PodsDummy_HLAlertController 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HLAlertController/HLAlertController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/HLAlertController/HLAlertController.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/HLAlertController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HLAlertController" 3 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 4 | PODS_ROOT = ${SRCROOT} 5 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HLAlertController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HLAlertController" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HLAlertController" -framework "Foundation" -framework "UIKit" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/HLAlertController" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/HLAlertController" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"HLAlertController" -framework "Foundation" -framework "UIKit" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HLAlertController 2 | alert to replace system alert. 3 | 4 | easy to use 5 | 6 | pod 'HLAlertController' 7 | 8 | HLAlertController *alert = [HLAlertController alertControllerWithTitle:@"标题" message:@"副标题 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行, 允许换行" preferredStyle:style]; 9 | 10 | [alert addAction:[HLAlertAction actionWithTitle:@"取消" style:HLAlertActionStyleCancel handler:^(HLAlertAction *action) { 11 | NSLog(@"button one"); 12 | }]]; 13 | [alert addAction:[HLAlertAction actionWithTitle:@"正常" style:HLAlertActionStyleDefault handler:^(HLAlertAction *action) { 14 | NSLog(@"button two"); 15 | }]]; 16 | [alert addAction:[HLAlertAction actionWithTitle:@"警告" style:HLAlertActionStyleDestructive handler:^(HLAlertAction *action) { 17 | NSLog(@"button three"); 18 | }]]; 19 | 20 | [self presentViewController:alert animated:YES completion:nil]; 21 | 22 | ![alt text](https://github.com/JustString/HLAlertController/blob/master/snap1.PNG "alert") 23 | 24 | ![alt text](https://github.com/JustString/HLAlertController/blob/master/snap2.PNG "actionSheet") 25 | -------------------------------------------------------------------------------- /snap1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strzhao/HLAlertController/433893ff4557a72f0fd57b70589cd1001d8932f3/snap1.PNG -------------------------------------------------------------------------------- /snap2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strzhao/HLAlertController/433893ff4557a72f0fd57b70589cd1001d8932f3/snap2.PNG --------------------------------------------------------------------------------