├── .gitignore ├── .swiftlint.yml ├── .travis.yml ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── FBSnapshotTestCase │ │ ├── FBSnapshotTestCase │ │ │ ├── Categories │ │ │ │ ├── UIApplication+StrictKeyWindow.h │ │ │ │ ├── UIApplication+StrictKeyWindow.m │ │ │ │ ├── UIImage+Compare.h │ │ │ │ ├── UIImage+Compare.m │ │ │ │ ├── UIImage+Diff.h │ │ │ │ ├── UIImage+Diff.m │ │ │ │ ├── UIImage+Snapshot.h │ │ │ │ └── UIImage+Snapshot.m │ │ │ ├── FBSnapshotTestCase.h │ │ │ ├── FBSnapshotTestCase.m │ │ │ ├── FBSnapshotTestCasePlatform.h │ │ │ ├── FBSnapshotTestCasePlatform.m │ │ │ ├── FBSnapshotTestController.h │ │ │ ├── FBSnapshotTestController.m │ │ │ └── SwiftSupport.swift │ │ ├── LICENSE │ │ └── README.md │ ├── Local Podspecs │ │ └── ZHRefresh.podspec.json │ ├── Manifest.lock │ ├── Nimble-Snapshots │ │ ├── CurrentTestCaseTracker.swift │ │ ├── DynamicSize │ │ │ └── DynamicSizeSnapshot.swift │ │ ├── DynamicType │ │ │ ├── HaveValidDynamicTypeSnapshot.swift │ │ │ ├── NBSMockedApplication.h │ │ │ ├── NBSMockedApplication.m │ │ │ └── PrettyDynamicTypeSyntax.swift │ │ ├── HaveValidSnapshot.swift │ │ ├── LICENSE │ │ ├── PrettySyntax.swift │ │ ├── README.md │ │ ├── XCTestObservationCenter+CurrentTestCaseTracker.h │ │ └── XCTestObservationCenter+CurrentTestCaseTracker.m │ ├── Nimble │ │ ├── Carthage │ │ │ └── Checkouts │ │ │ │ ├── CwlCatchException │ │ │ │ └── Sources │ │ │ │ │ ├── CwlCatchException │ │ │ │ │ └── CwlCatchException.swift │ │ │ │ │ └── CwlCatchExceptionSupport │ │ │ │ │ ├── CwlCatchException.m │ │ │ │ │ └── include │ │ │ │ │ └── CwlCatchException.h │ │ │ │ └── CwlPreconditionTesting │ │ │ │ └── Sources │ │ │ │ ├── CwlMachBadInstructionHandler │ │ │ │ ├── CwlMachBadInstructionHandler.m │ │ │ │ ├── include │ │ │ │ │ └── CwlMachBadInstructionHandler.h │ │ │ │ ├── mach_excServer.c │ │ │ │ └── mach_excServer.h │ │ │ │ └── CwlPreconditionTesting │ │ │ │ ├── CwlBadInstructionException.swift │ │ │ │ ├── CwlCatchBadInstruction.swift │ │ │ │ ├── CwlDarwinDefinitions.swift │ │ │ │ └── Mach │ │ │ │ └── CwlPreconditionTesting.h │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── Nimble │ │ │ ├── Adapters │ │ │ │ ├── AdapterProtocols.swift │ │ │ │ ├── AssertionDispatcher.swift │ │ │ │ ├── AssertionRecorder.swift │ │ │ │ ├── NMBExpectation.swift │ │ │ │ ├── NMBObjCMatcher.swift │ │ │ │ ├── NimbleEnvironment.swift │ │ │ │ └── NimbleXCTestHandler.swift │ │ │ ├── DSL+Wait.swift │ │ │ ├── DSL.swift │ │ │ ├── Expectation.swift │ │ │ ├── ExpectationMessage.swift │ │ │ ├── Expression.swift │ │ │ ├── FailureMessage.swift │ │ │ ├── Matchers │ │ │ │ ├── AllPass.swift │ │ │ │ ├── AsyncMatcherWrapper.swift │ │ │ │ ├── BeAKindOf.swift │ │ │ │ ├── BeAnInstanceOf.swift │ │ │ │ ├── BeCloseTo.swift │ │ │ │ ├── BeEmpty.swift │ │ │ │ ├── BeGreaterThan.swift │ │ │ │ ├── BeGreaterThanOrEqualTo.swift │ │ │ │ ├── BeIdenticalTo.swift │ │ │ │ ├── BeLessThan.swift │ │ │ │ ├── BeLessThanOrEqual.swift │ │ │ │ ├── BeLogical.swift │ │ │ │ ├── BeNil.swift │ │ │ │ ├── BeVoid.swift │ │ │ │ ├── BeginWith.swift │ │ │ │ ├── Contain.swift │ │ │ │ ├── ContainElementSatisfying.swift │ │ │ │ ├── EndWith.swift │ │ │ │ ├── Equal.swift │ │ │ │ ├── HaveCount.swift │ │ │ │ ├── Match.swift │ │ │ │ ├── MatchError.swift │ │ │ │ ├── MatcherFunc.swift │ │ │ │ ├── MatcherProtocols.swift │ │ │ │ ├── PostNotification.swift │ │ │ │ ├── Predicate.swift │ │ │ │ ├── RaisesException.swift │ │ │ │ ├── SatisfyAnyOf.swift │ │ │ │ ├── ThrowAssertion.swift │ │ │ │ ├── ThrowError.swift │ │ │ │ └── ToSucceed.swift │ │ │ ├── Nimble.h │ │ │ └── Utils │ │ │ │ ├── Async.swift │ │ │ │ ├── Errors.swift │ │ │ │ ├── Functional.swift │ │ │ │ ├── SourceLocation.swift │ │ │ │ └── Stringers.swift │ │ │ └── NimbleObjectiveC │ │ │ ├── CurrentTestCaseTracker.h │ │ │ ├── DSL.h │ │ │ ├── DSL.m │ │ │ ├── NMBExceptionCapture.h │ │ │ ├── NMBExceptionCapture.m │ │ │ ├── NMBStringify.h │ │ │ ├── NMBStringify.m │ │ │ └── XCTestObservationCenter+Register.m │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── Quick │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── Quick │ │ │ ├── Behavior.swift │ │ │ ├── Callsite.swift │ │ │ ├── Configuration │ │ │ │ └── Configuration.swift │ │ │ ├── DSL │ │ │ │ ├── DSL.swift │ │ │ │ └── World+DSL.swift │ │ │ ├── ErrorUtility.swift │ │ │ ├── Example.swift │ │ │ ├── ExampleGroup.swift │ │ │ ├── ExampleMetadata.swift │ │ │ ├── Filter.swift │ │ │ ├── Hooks │ │ │ │ ├── Closures.swift │ │ │ │ ├── ExampleHooks.swift │ │ │ │ ├── HooksPhase.swift │ │ │ │ └── SuiteHooks.swift │ │ │ ├── NSBundle+CurrentTestBundle.swift │ │ │ ├── NSString+C99ExtendedIdentifier.swift │ │ │ ├── QuickSelectedTestSuiteBuilder.swift │ │ │ ├── QuickTestSuite.swift │ │ │ ├── URL+FileName.swift │ │ │ └── World.swift │ │ │ ├── QuickObjectiveC │ │ │ ├── Configuration │ │ │ │ ├── QuickConfiguration.h │ │ │ │ └── QuickConfiguration.m │ │ │ ├── DSL │ │ │ │ ├── QCKDSL.h │ │ │ │ ├── QCKDSL.m │ │ │ │ └── World+DSL.h │ │ │ ├── Quick.h │ │ │ ├── QuickSpec.h │ │ │ ├── QuickSpec.m │ │ │ ├── World.h │ │ │ └── XCTestSuite+QuickTestSuiteBuilder.m │ │ │ └── QuickSpecBase │ │ │ ├── QuickSpecBase.m │ │ │ └── include │ │ │ └── QuickSpecBase.h │ ├── SnapKit │ │ ├── LICENSE │ │ ├── README.md │ │ └── Source │ │ │ ├── Constraint.swift │ │ │ ├── ConstraintAttributes.swift │ │ │ ├── ConstraintConfig.swift │ │ │ ├── ConstraintConstantTarget.swift │ │ │ ├── ConstraintDSL.swift │ │ │ ├── ConstraintDescription.swift │ │ │ ├── ConstraintInsetTarget.swift │ │ │ ├── ConstraintInsets.swift │ │ │ ├── ConstraintItem.swift │ │ │ ├── ConstraintLayoutGuide+Extensions.swift │ │ │ ├── ConstraintLayoutGuide.swift │ │ │ ├── ConstraintLayoutGuideDSL.swift │ │ │ ├── ConstraintLayoutSupport.swift │ │ │ ├── ConstraintLayoutSupportDSL.swift │ │ │ ├── ConstraintMaker.swift │ │ │ ├── ConstraintMakerEditable.swift │ │ │ ├── ConstraintMakerExtendable.swift │ │ │ ├── ConstraintMakerFinalizable.swift │ │ │ ├── ConstraintMakerPriortizable.swift │ │ │ ├── ConstraintMakerRelatable.swift │ │ │ ├── ConstraintMultiplierTarget.swift │ │ │ ├── ConstraintOffsetTarget.swift │ │ │ ├── ConstraintPriority.swift │ │ │ ├── ConstraintPriorityTarget.swift │ │ │ ├── ConstraintRelatableTarget.swift │ │ │ ├── ConstraintRelation.swift │ │ │ ├── ConstraintView+Extensions.swift │ │ │ ├── ConstraintView.swift │ │ │ ├── ConstraintViewDSL.swift │ │ │ ├── Debugging.swift │ │ │ ├── LayoutConstraint.swift │ │ │ ├── LayoutConstraintItem.swift │ │ │ ├── Typealiases.swift │ │ │ └── UILayoutSupport+Extensions.swift │ ├── Target Support Files │ │ ├── FBSnapshotTestCase │ │ │ ├── FBSnapshotTestCase-dummy.m │ │ │ ├── FBSnapshotTestCase-prefix.pch │ │ │ ├── FBSnapshotTestCase-umbrella.h │ │ │ ├── FBSnapshotTestCase.modulemap │ │ │ ├── FBSnapshotTestCase.xcconfig │ │ │ └── Info.plist │ │ ├── Nimble-Snapshots │ │ │ ├── Info.plist │ │ │ ├── Nimble-Snapshots-dummy.m │ │ │ ├── Nimble-Snapshots-prefix.pch │ │ │ ├── Nimble-Snapshots-umbrella.h │ │ │ ├── Nimble-Snapshots.modulemap │ │ │ └── Nimble-Snapshots.xcconfig │ │ ├── Nimble │ │ │ ├── Info.plist │ │ │ ├── Nimble-dummy.m │ │ │ ├── Nimble-prefix.pch │ │ │ ├── Nimble-umbrella.h │ │ │ ├── Nimble.modulemap │ │ │ └── Nimble.xcconfig │ │ ├── Pods-ZHRefresh_Example │ │ │ ├── Info.plist │ │ │ ├── Pods-ZHRefresh_Example-acknowledgements.markdown │ │ │ ├── Pods-ZHRefresh_Example-acknowledgements.plist │ │ │ ├── Pods-ZHRefresh_Example-dummy.m │ │ │ ├── Pods-ZHRefresh_Example-frameworks.sh │ │ │ ├── Pods-ZHRefresh_Example-resources.sh │ │ │ ├── Pods-ZHRefresh_Example-umbrella.h │ │ │ ├── Pods-ZHRefresh_Example.debug.xcconfig │ │ │ ├── Pods-ZHRefresh_Example.modulemap │ │ │ └── Pods-ZHRefresh_Example.release.xcconfig │ │ ├── Pods-ZHRefresh_Tests │ │ │ ├── Info.plist │ │ │ ├── Pods-ZHRefresh_Tests-acknowledgements.markdown │ │ │ ├── Pods-ZHRefresh_Tests-acknowledgements.plist │ │ │ ├── Pods-ZHRefresh_Tests-dummy.m │ │ │ ├── Pods-ZHRefresh_Tests-frameworks.sh │ │ │ ├── Pods-ZHRefresh_Tests-resources.sh │ │ │ ├── Pods-ZHRefresh_Tests-umbrella.h │ │ │ ├── Pods-ZHRefresh_Tests.debug.xcconfig │ │ │ ├── Pods-ZHRefresh_Tests.modulemap │ │ │ └── Pods-ZHRefresh_Tests.release.xcconfig │ │ ├── Quick │ │ │ ├── Info.plist │ │ │ ├── Quick-dummy.m │ │ │ ├── Quick-prefix.pch │ │ │ ├── Quick-umbrella.h │ │ │ ├── Quick.modulemap │ │ │ └── Quick.xcconfig │ │ ├── SnapKit │ │ │ ├── Info.plist │ │ │ ├── SnapKit-dummy.m │ │ │ ├── SnapKit-prefix.pch │ │ │ ├── SnapKit-umbrella.h │ │ │ ├── SnapKit.modulemap │ │ │ └── SnapKit.xcconfig │ │ └── ZHRefresh │ │ │ ├── Info.plist │ │ │ ├── ResourceBundle-ZHRefresh-Info.plist │ │ │ ├── ZHRefresh-dummy.m │ │ │ ├── ZHRefresh-prefix.pch │ │ │ ├── ZHRefresh-umbrella.h │ │ │ ├── ZHRefresh.modulemap │ │ │ └── ZHRefresh.xcconfig │ └── ZHRefresh │ │ ├── LICENSE │ │ ├── README.md │ │ └── ZHRefresh │ │ ├── Assets │ │ └── ZHRefresh.bundle │ │ │ ├── arrow@2x.png │ │ │ ├── en.lproj │ │ │ └── Localizable.strings │ │ │ ├── zh-Hans.lproj │ │ │ └── Localizable.strings │ │ │ └── zh-Hant.lproj │ │ │ └── Localizable.strings │ │ └── Classes │ │ ├── UIScrollView+ZHExtension.h │ │ ├── UIScrollView+ZHExtension.m │ │ ├── UIView+Extension.swift │ │ ├── ZHRecord.swift │ │ ├── ZHRefresh.swift │ │ ├── ZHRefreshAutoFooter.swift │ │ ├── ZHRefreshAutoGifFooter.swift │ │ ├── ZHRefreshAutoNormalFooter.swift │ │ ├── ZHRefreshAutoStateFooter.swift │ │ ├── ZHRefreshBackFooter.swift │ │ ├── ZHRefreshBackGifFooter.swift │ │ ├── ZHRefreshBackNormalFooter.swift │ │ ├── ZHRefreshBackStateFooter.swift │ │ ├── ZHRefreshChiBaoZiAutoFooter.swift │ │ ├── ZHRefreshChiBaoZiFooter.swift │ │ ├── ZHRefreshChiBaoZiHeader.swift │ │ ├── ZHRefreshComponent.swift │ │ ├── ZHRefreshConst.swift │ │ ├── ZHRefreshFooter.swift │ │ ├── ZHRefreshGifHeader.swift │ │ ├── ZHRefreshHeader.swift │ │ ├── ZHRefreshKeys.swift │ │ ├── ZHRefreshNormalHeader.swift │ │ ├── ZHRefreshRunTime.h │ │ ├── ZHRefreshRunTime.m │ │ └── ZHRefreshStateHeader.swift ├── Tests │ ├── Info.plist │ └── Tests.swift ├── ZHRefresh.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── ZHRefresh-Example.xcscheme ├── ZHRefresh.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ZHRefresh │ ├── AppDelegate.swift │ ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard │ ├── DIY │ ├── ZHDIYAutoFooter.swift │ ├── ZHDIYBackFooter.swift │ ├── ZHDIYHeader.swift │ └── ZHDIYQQReaderHeader.swift │ ├── DemoViewController │ ├── CollectionViewController.swift │ ├── Example.swift │ ├── TableViewController.swift │ └── WebViewController.swift │ ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── card_refresh.imageset │ │ ├── Contents.json │ │ ├── card_refresh@2x.png │ │ └── card_refresh@3x.png │ └── header_place_holder.imageset │ │ ├── Contents.json │ │ └── header_place_holder@2x.png │ ├── Info.plist │ ├── MainViewController.swift │ └── Tool │ ├── UIViewController+Dynamic.h │ ├── UIViewController+Dynamic.m │ ├── Utilities .swift │ └── ZHRefresh_Example-Bridging-Header.h ├── LICENSE ├── README.md ├── ZHRefresh.podspec ├── ZHRefresh ├── Assets │ ├── .gitkeep │ └── ZHRefresh.bundle │ │ ├── arrow@2x.png │ │ ├── dropdown_anim__00010@2x.png │ │ ├── dropdown_anim__00011@2x.png │ │ ├── dropdown_anim__00012@2x.png │ │ ├── dropdown_anim__00013@2x.png │ │ ├── dropdown_anim__00014@2x.png │ │ ├── dropdown_anim__00015@2x.png │ │ ├── dropdown_anim__00016@2x.png │ │ ├── dropdown_anim__00017@2x.png │ │ ├── dropdown_anim__00018@2x.png │ │ ├── dropdown_anim__00019@2x.png │ │ ├── dropdown_anim__0001@2x.png │ │ ├── dropdown_anim__00020@2x.png │ │ ├── dropdown_anim__00021@2x.png │ │ ├── dropdown_anim__00022@2x.png │ │ ├── dropdown_anim__00023@2x.png │ │ ├── dropdown_anim__00024@2x.png │ │ ├── dropdown_anim__00025@2x.png │ │ ├── dropdown_anim__00026@2x.png │ │ ├── dropdown_anim__00027@2x.png │ │ ├── dropdown_anim__00028@2x.png │ │ ├── dropdown_anim__00029@2x.png │ │ ├── dropdown_anim__0002@2x.png │ │ ├── dropdown_anim__00030@2x.png │ │ ├── dropdown_anim__00031@2x.png │ │ ├── dropdown_anim__00032@2x.png │ │ ├── dropdown_anim__00033@2x.png │ │ ├── dropdown_anim__00034@2x.png │ │ ├── dropdown_anim__00035@2x.png │ │ ├── dropdown_anim__00036@2x.png │ │ ├── dropdown_anim__00037@2x.png │ │ ├── dropdown_anim__00038@2x.png │ │ ├── dropdown_anim__00039@2x.png │ │ ├── dropdown_anim__0003@2x.png │ │ ├── dropdown_anim__00040@2x.png │ │ ├── dropdown_anim__00041@2x.png │ │ ├── dropdown_anim__00042@2x.png │ │ ├── dropdown_anim__00043@2x.png │ │ ├── dropdown_anim__00044@2x.png │ │ ├── dropdown_anim__00045@2x.png │ │ ├── dropdown_anim__00046@2x.png │ │ ├── dropdown_anim__00047@2x.png │ │ ├── dropdown_anim__00048@2x.png │ │ ├── dropdown_anim__00049@2x.png │ │ ├── dropdown_anim__0004@2x.png │ │ ├── dropdown_anim__00050@2x.png │ │ ├── dropdown_anim__00051@2x.png │ │ ├── dropdown_anim__00052@2x.png │ │ ├── dropdown_anim__00053@2x.png │ │ ├── dropdown_anim__00054@2x.png │ │ ├── dropdown_anim__00055@2x.png │ │ ├── dropdown_anim__00056@2x.png │ │ ├── dropdown_anim__00057@2x.png │ │ ├── dropdown_anim__00058@2x.png │ │ ├── dropdown_anim__00059@2x.png │ │ ├── dropdown_anim__0005@2x.png │ │ ├── dropdown_anim__00060@2x.png │ │ ├── dropdown_anim__0006@2x.png │ │ ├── dropdown_anim__0007@2x.png │ │ ├── dropdown_anim__0008@2x.png │ │ ├── dropdown_anim__0009@2x.png │ │ ├── dropdown_loading_01@2x.png │ │ ├── dropdown_loading_02@2x.png │ │ ├── dropdown_loading_03@2x.png │ │ ├── en.lproj │ │ └── Localizable.strings │ │ ├── zh-Hans.lproj │ │ └── Localizable.strings │ │ └── zh-Hant.lproj │ │ └── Localizable.strings └── Classes │ ├── .gitkeep │ ├── UIScrollView+ZHExtension.h │ ├── UIScrollView+ZHExtension.m │ ├── UIView+Extension.swift │ ├── ZHRecord.swift │ ├── ZHRefresh.swift │ ├── ZHRefreshAutoFooter.swift │ ├── ZHRefreshAutoGifFooter.swift │ ├── ZHRefreshAutoNormalFooter.swift │ ├── ZHRefreshAutoStateFooter.swift │ ├── ZHRefreshBackFooter.swift │ ├── ZHRefreshBackGifFooter.swift │ ├── ZHRefreshBackNormalFooter.swift │ ├── ZHRefreshBackStateFooter.swift │ ├── ZHRefreshChiBaoZiAutoFooter.swift │ ├── ZHRefreshChiBaoZiFooter.swift │ ├── ZHRefreshChiBaoZiHeader.swift │ ├── ZHRefreshComponent.swift │ ├── ZHRefreshConst.swift │ ├── ZHRefreshFooter.swift │ ├── ZHRefreshGifHeader.swift │ ├── ZHRefreshHeader.swift │ ├── ZHRefreshKeys.swift │ ├── ZHRefreshNormalHeader.swift │ ├── ZHRefreshRunTime.h │ ├── ZHRefreshRunTime.m │ └── ZHRefreshStateHeader.swift └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: # rule identifiers to exclude from running 2 | - force_cast 3 | - cyclomatic_complexity 4 | - unused_closure_parameter 5 | - multiple_closures_with_trailing_closure 6 | - identifier_name 7 | - line_length 8 | - weak_delegate 9 | - trailing_whitespace 10 | - large_tuple 11 | - type_name 12 | # - colon 13 | # - comma 14 | # - control_statement 15 | # opt_in_rules: # some rules are only opt-in 16 | # - empty_count 17 | # - missing_docs 18 | # # Find all the available rules by running: 19 | # # swiftlint rules 20 | # included: # paths to include during linting. `--path` is ignored if present. 21 | # - Docs.M/*/*.swift 22 | excluded: # paths to ignore during linting. Takes precedence over `included`. 23 | - Carthage 24 | - Pods 25 | # - Source/ExcludedFolder 26 | # - Source/ExcludedFile.swift 27 | 28 | # configurable rules can be customized from this configuration file 29 | # binary rules can set their severity level 30 | # force_cast: warning # implicitly 31 | force_try: 32 | severity: warning # explicitly 33 | # rules that have both warning and error levels, can set just the warning level 34 | # implicitly 35 | # line_length: 36 | # warning: 300 37 | # ignores_function_declarations: true 38 | # ignores_comments: true 39 | 40 | # they can set both implicitly with an array 41 | type_body_length: 42 | - 300 # warning 43 | - 400 # error 44 | # or they can set both explicitly 45 | file_length: 46 | warning: 500 47 | error: 1200 48 | # naming rules can set warnings/errors for min_length and max_length 49 | # additionally they can set excluded names 50 | # type_name: 51 | # min_length: 4 # only warning 52 | # max_length: # warning and error 53 | # warning: 40 54 | # error: 50 55 | # excluded: iPhone # excluded via string 56 | identifier_name: 57 | min_length: # only min_length 58 | error: 3 # only error 59 | excluded: # excluded via string array 60 | - id 61 | # - URL 62 | # - GlobalAPIKey 63 | reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji) 64 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | branches: 3 | only: 4 | - master 5 | xcode_project: Example/ZHRefresh.xcworkspace 6 | osx_image: xcode9 7 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'ZHRefresh_Example' do 4 | pod 'ZHRefresh', :path => '../' 5 | pod 'SnapKit', '~> 4.0.0' 6 | 7 | target 'ZHRefresh_Tests' do 8 | inherit! :search_paths 9 | 10 | pod 'Quick', '~> 1.2.0' 11 | pod 'Nimble', '~> 7.0.2' 12 | pod 'FBSnapshotTestCase' , '~> 2.1.4' 13 | pod 'Nimble-Snapshots' , '~> 6.3.0' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FBSnapshotTestCase (2.1.4): 3 | - FBSnapshotTestCase/SwiftSupport (= 2.1.4) 4 | - FBSnapshotTestCase/Core (2.1.4) 5 | - FBSnapshotTestCase/SwiftSupport (2.1.4): 6 | - FBSnapshotTestCase/Core 7 | - Nimble (7.0.3) 8 | - Nimble-Snapshots (6.3.0): 9 | - Nimble-Snapshots/Core (= 6.3.0) 10 | - Nimble-Snapshots/Core (6.3.0): 11 | - FBSnapshotTestCase (~> 2.0) 12 | - Nimble (~> 7.0) 13 | - Quick (1.2.0) 14 | - SnapKit (4.0.0) 15 | - ZHRefresh (0.1.9) 16 | 17 | DEPENDENCIES: 18 | - FBSnapshotTestCase (~> 2.1.4) 19 | - Nimble (~> 7.0.2) 20 | - Nimble-Snapshots (~> 6.3.0) 21 | - Quick (~> 1.2.0) 22 | - SnapKit (~> 4.0.0) 23 | - ZHRefresh (from `../`) 24 | 25 | EXTERNAL SOURCES: 26 | ZHRefresh: 27 | :path: ../ 28 | 29 | SPEC CHECKSUMS: 30 | FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a 31 | Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac 32 | Nimble-Snapshots: f5459b5b091678dc942d03ec4741cacb58ba4a52 33 | Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 34 | SnapKit: a42d492c16e80209130a3379f73596c3454b7694 35 | ZHRefresh: c08c4ff6852ecfabb0c576e39a88549ab1694472 36 | 37 | PODFILE CHECKSUM: 00f8cd483bef23708d3523ad932b765c16468584 38 | 39 | COCOAPODS: 1.4.0 40 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @interface UIApplication (StrictKeyWindow) 14 | 15 | /** 16 | @return The receiver's @c keyWindow. Raises an assertion if @c nil. 17 | */ 18 | - (UIWindow *)fb_strictKeyWindow; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIApplication+StrictKeyWindow.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @implementation UIApplication (StrictKeyWindow) 14 | 15 | - (UIWindow *)fb_strictKeyWindow 16 | { 17 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; 18 | if (!keyWindow) { 19 | [NSException raise:@"FBSnapshotTestCaseNilKeyWindowException" 20 | format:@"Snapshot tests must be hosted by an application with a key window. Please ensure your test" 21 | " host sets up a key window at launch (either via storyboards or programmatically) and doesn't" 22 | " do anything to remove it while snapshot tests are running."]; 23 | } 24 | return keyWindow; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Compare.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Gabriel Handford on 3/1/09. 3 | // Copyright 2009-2013. All rights reserved. 4 | // Created by John Boiles on 10/20/11. 5 | // Copyright (c) 2011. All rights reserved 6 | // Modified by Felix Schulze on 2/11/13. 7 | // Copyright 2013. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person 10 | // obtaining a copy of this software and associated documentation 11 | // files (the "Software"), to deal in the Software without 12 | // restriction, including without limitation the rights to use, 13 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the 15 | // Software is furnished to do so, subject to the following 16 | // conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | // OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | #import 32 | 33 | @interface UIImage (Compare) 34 | 35 | - (BOOL)fb_compareWithImage:(UIImage *)image tolerance:(CGFloat)tolerance; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Diff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Gabriel Handford on 3/1/09. 3 | // Copyright 2009-2013. All rights reserved. 4 | // Created by John Boiles on 10/20/11. 5 | // Copyright (c) 2011. All rights reserved 6 | // Modified by Felix Schulze on 2/11/13. 7 | // Copyright 2013. All rights reserved. 8 | // 9 | // Permission is hereby granted, free of charge, to any person 10 | // obtaining a copy of this software and associated documentation 11 | // files (the "Software"), to deal in the Software without 12 | // restriction, including without limitation the rights to use, 13 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | // copies of the Software, and to permit persons to whom the 15 | // Software is furnished to do so, subject to the following 16 | // conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | // OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | #import 32 | 33 | @interface UIImage (Diff) 34 | 35 | - (UIImage *)fb_diffWithImage:(UIImage *)image; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/Categories/UIImage+Snapshot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | @interface UIImage (Snapshot) 14 | 15 | /// Uses renderInContext: to get a snapshot of the layer. 16 | + (UIImage *)fb_imageForLayer:(CALayer *)layer; 17 | 18 | /// Uses renderInContext: to get a snapshot of the view layer. 19 | + (UIImage *)fb_imageForViewLayer:(UIView *)view; 20 | 21 | /// Uses drawViewHierarchyInRect: to get a snapshot of the view and adds the view into a window if needed. 22 | + (UIImage *)fb_imageForView:(UIView *)view; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/FBSnapshotTestCasePlatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /** 18 | Returns a Boolean value that indicates whether the snapshot test is running in 64Bit. 19 | This method is a convenience for creating the suffixes set based on the architecture 20 | that the test is running. 21 | 22 | @returns @c YES if the test is running in 64bit, otherwise @c NO. 23 | */ 24 | BOOL FBSnapshotTestCaseIs64Bit(void); 25 | 26 | /** 27 | Returns a default set of strings that is used to append a suffix based on the architectures. 28 | @warning Do not modify this function, you can create your own and use it with @c FBSnapshotVerifyViewWithOptions() 29 | 30 | @returns An @c NSOrderedSet object containing strings that are appended to the reference images directory. 31 | */ 32 | NSOrderedSet *FBSnapshotTestCaseDefaultSuffixes(void); 33 | 34 | /** 35 | Returns a fully «normalized» file name. 36 | Strips punctuation and spaces and replaces them with @c _. Also appends the device model, running OS and screen size to the file name. 37 | 38 | @returns An @c NSString object containing the passed @c fileName with the device model, OS and screen size appended at the end. 39 | */ 40 | NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/FBSnapshotTestCase/FBSnapshotTestCasePlatform.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | */ 10 | 11 | #import 12 | #import 13 | #import 14 | 15 | BOOL FBSnapshotTestCaseIs64Bit(void) 16 | { 17 | #if __LP64__ 18 | return YES; 19 | #else 20 | return NO; 21 | #endif 22 | } 23 | 24 | NSOrderedSet *FBSnapshotTestCaseDefaultSuffixes(void) 25 | { 26 | NSMutableOrderedSet *suffixesSet = [[NSMutableOrderedSet alloc] init]; 27 | [suffixesSet addObject:@"_32"]; 28 | [suffixesSet addObject:@"_64"]; 29 | if (FBSnapshotTestCaseIs64Bit()) { 30 | return [suffixesSet reversedOrderedSet]; 31 | } 32 | return [suffixesSet copy]; 33 | } 34 | 35 | NSString *FBDeviceAgnosticNormalizedFileName(NSString *fileName) 36 | { 37 | UIDevice *device = [UIDevice currentDevice]; 38 | UIWindow *keyWindow = [[UIApplication sharedApplication] fb_strictKeyWindow]; 39 | CGSize screenSize = keyWindow.bounds.size; 40 | NSString *os = device.systemVersion; 41 | 42 | fileName = [NSString stringWithFormat:@"%@_%@%@_%.0fx%.0f", fileName, device.model, os, screenSize.width, screenSize.height]; 43 | 44 | NSMutableCharacterSet *invalidCharacters = [NSMutableCharacterSet new]; 45 | [invalidCharacters formUnionWithCharacterSet:[NSCharacterSet whitespaceCharacterSet]]; 46 | [invalidCharacters formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]]; 47 | NSArray *validComponents = [fileName componentsSeparatedByCharactersInSet:invalidCharacters]; 48 | fileName = [validComponents componentsJoinedByString:@"_"]; 49 | 50 | return fileName; 51 | } -------------------------------------------------------------------------------- /Example/Pods/FBSnapshotTestCase/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For the FBSnapshotTestCase software 4 | 5 | Copyright (c) 2013, Facebook, Inc. 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name Facebook nor the names of its contributors may be used to 17 | endorse or promote products derived from this software without specific 18 | prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ZHRefresh.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ZHRefresh", 3 | "version": "0.1.9", 4 | "summary": "a refresh control write by Swift which like MJRefresh", 5 | "swift_version": "4.0", 6 | "description": "TODO: 1. add Custom refresh style\n 2. Adaptive iPhoneX and other device", 7 | "homepage": "https://github.com/SummerHF/ZHRefresh", 8 | "license": { 9 | "type": "MIT", 10 | "file": "LICENSE" 11 | }, 12 | "authors": { 13 | "SummerHF": "391565521@qq.com" 14 | }, 15 | "source": { 16 | "git": "https://github.com/SummerHF/ZHRefresh.git", 17 | "tag": "0.1.9" 18 | }, 19 | "social_media_url": "http://summerhf.cn", 20 | "platforms": { 21 | "ios": "8.0" 22 | }, 23 | "source_files": "ZHRefresh/Classes/*.*", 24 | "frameworks": [ 25 | "UIKit", 26 | "Foundation" 27 | ], 28 | "module_name": "ZHRefresh", 29 | "resources": "ZHRefresh/Assets/ZHRefresh.bundle" 30 | } 31 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FBSnapshotTestCase (2.1.4): 3 | - FBSnapshotTestCase/SwiftSupport (= 2.1.4) 4 | - FBSnapshotTestCase/Core (2.1.4) 5 | - FBSnapshotTestCase/SwiftSupport (2.1.4): 6 | - FBSnapshotTestCase/Core 7 | - Nimble (7.0.3) 8 | - Nimble-Snapshots (6.3.0): 9 | - Nimble-Snapshots/Core (= 6.3.0) 10 | - Nimble-Snapshots/Core (6.3.0): 11 | - FBSnapshotTestCase (~> 2.0) 12 | - Nimble (~> 7.0) 13 | - Quick (1.2.0) 14 | - SnapKit (4.0.0) 15 | - ZHRefresh (0.1.9) 16 | 17 | DEPENDENCIES: 18 | - FBSnapshotTestCase (~> 2.1.4) 19 | - Nimble (~> 7.0.2) 20 | - Nimble-Snapshots (~> 6.3.0) 21 | - Quick (~> 1.2.0) 22 | - SnapKit (~> 4.0.0) 23 | - ZHRefresh (from `../`) 24 | 25 | EXTERNAL SOURCES: 26 | ZHRefresh: 27 | :path: ../ 28 | 29 | SPEC CHECKSUMS: 30 | FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a 31 | Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac 32 | Nimble-Snapshots: f5459b5b091678dc942d03ec4741cacb58ba4a52 33 | Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 34 | SnapKit: a42d492c16e80209130a3379f73596c3454b7694 35 | ZHRefresh: c08c4ff6852ecfabb0c576e39a88549ab1694472 36 | 37 | PODFILE CHECKSUM: 00f8cd483bef23708d3523ad932b765c16468584 38 | 39 | COCOAPODS: 1.4.0 40 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/CurrentTestCaseTracker.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | /// Helper class providing access to the currently executing XCTestCase instance, if any 4 | @objc public final class CurrentTestCaseTracker: NSObject, XCTestObservation { 5 | @objc public static let shared = CurrentTestCaseTracker() 6 | 7 | private(set) var currentTestCase: XCTestCase? 8 | 9 | @objc public func testCaseWillStart(_ testCase: XCTestCase) { 10 | currentTestCase = testCase 11 | } 12 | 13 | @objc public func testCaseDidFinish(_ testCase: XCTestCase) { 14 | currentTestCase = nil 15 | } 16 | } 17 | 18 | extension XCTestCase { 19 | var sanitizedName: String? { 20 | let fullName = self.name 21 | let characterSet = CharacterSet(charactersIn: "[]+-") 22 | #if swift(>=4) 23 | let name = fullName.components(separatedBy: characterSet).joined() 24 | #else 25 | let name = (fullName ?? "").components(separatedBy: characterSet).joined() 26 | #endif 27 | 28 | if let quickClass = NSClassFromString("QuickSpec"), self.isKind(of: quickClass) { 29 | let className = String(describing: type(of: self)) 30 | if let range = name.range(of: className), range.lowerBound == name.startIndex { 31 | return name.replacingCharacters(in: range, with: "") 32 | .trimmingCharacters(in: .whitespacesAndNewlines) 33 | } 34 | } 35 | 36 | return name 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/DynamicType/NBSMockedApplication.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | NS_ASSUME_NONNULL_BEGIN 5 | 6 | @interface NBSMockedApplication : NSObject 7 | 8 | - (void)mockPreferredContentSizeCategory:(UIContentSizeCategory)category; 9 | - (void)stopMockingPreferredContentSizeCategory; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/DynamicType/PrettyDynamicTypeSyntax.swift: -------------------------------------------------------------------------------- 1 | import Nimble 2 | 3 | // MARK: - Nicer syntax using == operator 4 | 5 | public struct DynamicTypeSnapshot { 6 | let name: String? 7 | let record: Bool 8 | let sizes: [UIContentSizeCategory] 9 | let deviceAgnostic: Bool 10 | 11 | init(name: String?, record: Bool, sizes: [UIContentSizeCategory], deviceAgnostic: Bool) { 12 | self.name = name 13 | self.record = record 14 | self.sizes = sizes 15 | self.deviceAgnostic = deviceAgnostic 16 | } 17 | } 18 | 19 | public func dynamicTypeSnapshot(_ name: String? = nil, sizes: [UIContentSizeCategory] = allContentSizeCategories(), 20 | deviceAgnostic: Bool = false) -> DynamicTypeSnapshot { 21 | return DynamicTypeSnapshot(name: name, record: false, sizes: sizes, deviceAgnostic: deviceAgnostic) 22 | } 23 | 24 | public func recordDynamicTypeSnapshot(_ name: String? = nil, 25 | sizes: [UIContentSizeCategory] = allContentSizeCategories(), 26 | deviceAgnostic: Bool = false) -> DynamicTypeSnapshot { 27 | return DynamicTypeSnapshot(name: name, record: true, sizes: sizes, deviceAgnostic: deviceAgnostic) 28 | } 29 | 30 | public func == (lhs: Expectation, rhs: DynamicTypeSnapshot) { 31 | if let name = rhs.name { 32 | if rhs.record { 33 | lhs.to(recordDynamicTypeSnapshot(named: name, sizes: rhs.sizes, isDeviceAgnostic: rhs.deviceAgnostic)) 34 | } else { 35 | lhs.to(haveValidDynamicTypeSnapshot(named: name, sizes: rhs.sizes, isDeviceAgnostic: rhs.deviceAgnostic)) 36 | } 37 | 38 | } else { 39 | if rhs.record { 40 | lhs.to(recordDynamicTypeSnapshot(sizes: rhs.sizes, isDeviceAgnostic: rhs.deviceAgnostic)) 41 | } else { 42 | lhs.to(haveValidDynamicTypeSnapshot(sizes: rhs.sizes, isDeviceAgnostic: rhs.deviceAgnostic)) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Artsy, Ash Furrow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/PrettySyntax.swift: -------------------------------------------------------------------------------- 1 | import Nimble 2 | 3 | // MARK: - Nicer syntax using == operator 4 | 5 | public struct Snapshot { 6 | let name: String? 7 | let record: Bool 8 | let usesDrawRect: Bool 9 | 10 | init(name: String?, record: Bool, usesDrawRect: Bool) { 11 | self.name = name 12 | self.record = record 13 | self.usesDrawRect = usesDrawRect 14 | } 15 | } 16 | 17 | public func snapshot(_ name: String? = nil, 18 | usesDrawRect: Bool = false) -> Snapshot { 19 | return Snapshot(name: name, record: false, usesDrawRect: usesDrawRect) 20 | } 21 | 22 | public func recordSnapshot(_ name: String? = nil, 23 | usesDrawRect: Bool = false) -> Snapshot { 24 | return Snapshot(name: name, record: true, usesDrawRect: usesDrawRect) 25 | } 26 | 27 | public func == (lhs: Expectation, rhs: Snapshot) { 28 | if let name = rhs.name { 29 | if rhs.record { 30 | lhs.to(recordSnapshot(named: name, usesDrawRect: rhs.usesDrawRect)) 31 | } else { 32 | lhs.to(haveValidSnapshot(named: name, usesDrawRect: rhs.usesDrawRect)) 33 | } 34 | 35 | } else { 36 | if rhs.record { 37 | lhs.to(recordSnapshot(usesDrawRect: rhs.usesDrawRect)) 38 | } else { 39 | lhs.to(haveValidSnapshot(usesDrawRect: rhs.usesDrawRect)) 40 | } 41 | } 42 | } 43 | 44 | // MARK: - Nicer syntax using emoji 45 | 46 | // swiftlint:disable:next identifier_name 47 | public func 📷(_ snapshottable: Snapshotable, file: FileString = #file, line: UInt = #line) { 48 | expect(snapshottable, file: file, line: line).to(recordSnapshot()) 49 | } 50 | 51 | // swiftlint:disable:next identifier_name 52 | public func 📷(_ snapshottable: Snapshotable, named name: String, file: FileString = #file, line: UInt = #line) { 53 | expect(snapshottable, file: file, line: line).to(recordSnapshot(named: name)) 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/XCTestObservationCenter+CurrentTestCaseTracker.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface XCTestObservationCenter (CurrentTestCaseTracker) 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Nimble-Snapshots/XCTestObservationCenter+CurrentTestCaseTracker.m: -------------------------------------------------------------------------------- 1 | #import "XCTestObservationCenter+CurrentTestCaseTracker.h" 2 | #import "Nimble_Snapshots/Nimble_Snapshots-Swift.h" 3 | 4 | @implementation XCTestObservationCenter (CurrentTestCaseTracker) 5 | 6 | + (void)load { 7 | [[self sharedTestObservationCenter] addTestObserver:[CurrentTestCaseTracker shared]]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CwlCatchException.swift 3 | // CwlAssertionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | import Foundation 22 | 23 | #if SWIFT_PACKAGE 24 | import CwlCatchExceptionSupport 25 | #endif 26 | 27 | private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? { 28 | // Get the type from an *instance*, instead of a receiving the type directly 29 | return catchExceptionOfKind(type, block) as? T 30 | } 31 | 32 | extension NSException { 33 | public static func catchException(in block: () -> Void) -> Self? { 34 | // Use a dummy instance of Self to provide the type 35 | return catchReturnTypeConverter(self, block: block) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m: -------------------------------------------------------------------------------- 1 | // 2 | // CwlCatchException.m 3 | // CwlAssertionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import "CwlCatchException.h" 22 | 23 | #if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE 24 | __attribute__((visibility("hidden"))) 25 | #endif 26 | NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)) { 27 | @try { 28 | inBlock(); 29 | } @catch (NSException *exception) { 30 | if ([exception isKindOfClass:type]) { 31 | return exception; 32 | } else { 33 | @throw; 34 | } 35 | } 36 | return nil; 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlCatchException.h 3 | // CwlCatchException 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlCatchException. 24 | FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; 25 | 26 | //! Project version string for CwlCatchException. 27 | FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; 28 | 29 | #if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE 30 | __attribute__((visibility("hidden"))) 31 | #endif 32 | NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)); 33 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlPreconditionTesting.h 3 | // CwlPreconditionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlUtils. 24 | FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; 25 | 26 | //! Project version string for CwlUtils. 27 | FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; 28 | 29 | #include "CwlMachBadInstructionHandler.h" 30 | #include "CwlCatchException.h" 31 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 2 | /// assertion messages. 3 | /// 4 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 5 | /// This is possible with XCTest-based assertion handlers. 6 | /// 7 | public class AssertionDispatcher: AssertionHandler { 8 | let handlers: [AssertionHandler] 9 | 10 | public init(handlers: [AssertionHandler]) { 11 | self.handlers = handlers 12 | } 13 | 14 | public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { 15 | for handler in handlers { 16 | handler.assert(assertion, message: message, location: location) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift: -------------------------------------------------------------------------------- 1 | import Dispatch 2 | import Foundation 3 | 4 | /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this 5 | /// class' existence 6 | internal class NimbleEnvironment { 7 | static var activeInstance: NimbleEnvironment { 8 | get { 9 | let env = Thread.current.threadDictionary["NimbleEnvironment"] 10 | if let env = env as? NimbleEnvironment { 11 | return env 12 | } else { 13 | let newEnv = NimbleEnvironment() 14 | self.activeInstance = newEnv 15 | return newEnv 16 | } 17 | } 18 | set { 19 | Thread.current.threadDictionary["NimbleEnvironment"] = newValue 20 | } 21 | } 22 | 23 | // TODO: eventually migrate the global to this environment value 24 | var assertionHandler: AssertionHandler { 25 | get { return NimbleAssertionHandler } 26 | set { NimbleAssertionHandler = newValue } 27 | } 28 | 29 | var suppressTVOSAssertionWarning: Bool = false 30 | var awaiter: Awaiter 31 | 32 | init() { 33 | let timeoutQueue: DispatchQueue 34 | if #available(OSX 10.10, *) { 35 | timeoutQueue = DispatchQueue.global(qos: .userInitiated) 36 | } else { 37 | timeoutQueue = DispatchQueue.global(priority: .high) 38 | } 39 | 40 | awaiter = Awaiter( 41 | waitLock: AssertionWaitLock(), 42 | asyncQueue: .main, 43 | timeoutQueue: timeoutQueue) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 4 | public func beGreaterThan(_ expectedValue: T?) -> Predicate { 5 | let errorMessage = "be greater than <\(stringify(expectedValue))>" 6 | return Predicate.simple(errorMessage) { actualExpression in 7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 8 | return PredicateStatus(bool: actual > expected) 9 | } 10 | return .fail 11 | } 12 | } 13 | 14 | /// A Nimble matcher that succeeds when the actual value is greater than the expected value. 15 | public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { 16 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 17 | failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" 18 | let actualValue = try actualExpression.evaluate() 19 | let matches = actualValue != nil 20 | && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending 21 | return matches 22 | }.requireNonNil 23 | } 24 | 25 | public func >(lhs: Expectation, rhs: T) { 26 | lhs.to(beGreaterThan(rhs)) 27 | } 28 | 29 | public func > (lhs: Expectation, rhs: NMBComparable?) { 30 | lhs.to(beGreaterThan(rhs)) 31 | } 32 | 33 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 34 | extension NMBObjCMatcher { 35 | @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { 36 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 37 | let expr = actualExpression.cast { $0 as? NMBComparable } 38 | return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) 39 | } 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is greater than 4 | /// or equal to the expected value. 5 | public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { 6 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 8 | let actualValue = try actualExpression.evaluate() 9 | if let actual = actualValue, let expected = expectedValue { 10 | return actual >= expected 11 | } 12 | return false 13 | }.requireNonNil 14 | } 15 | 16 | /// A Nimble matcher that succeeds when the actual value is greater than 17 | /// or equal to the expected value. 18 | public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { 19 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 20 | failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" 21 | let actualValue = try actualExpression.evaluate() 22 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending 23 | return matches 24 | }.requireNonNil 25 | } 26 | 27 | public func >=(lhs: Expectation, rhs: T) { 28 | lhs.to(beGreaterThanOrEqualTo(rhs)) 29 | } 30 | 31 | public func >=(lhs: Expectation, rhs: T) { 32 | lhs.to(beGreaterThanOrEqualTo(rhs)) 33 | } 34 | 35 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 36 | extension NMBObjCMatcher { 37 | @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { 38 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 39 | let expr = actualExpression.cast { $0 as? NMBComparable } 40 | return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 41 | } 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is the same instance 4 | /// as the expected instance. 5 | public func beIdenticalTo(_ expected: Any?) -> Predicate { 6 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 7 | #if os(Linux) 8 | let actual = try actualExpression.evaluate() as? AnyObject 9 | #else 10 | let actual = try actualExpression.evaluate() as AnyObject? 11 | #endif 12 | failureMessage.actualValue = "\(identityAsString(actual))" 13 | failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" 14 | #if os(Linux) 15 | return actual === (expected as? AnyObject) && actual !== nil 16 | #else 17 | return actual === (expected as AnyObject?) && actual !== nil 18 | #endif 19 | }.requireNonNil 20 | } 21 | 22 | public func === (lhs: Expectation, rhs: Any?) { 23 | lhs.to(beIdenticalTo(rhs)) 24 | } 25 | public func !== (lhs: Expectation, rhs: Any?) { 26 | lhs.toNot(beIdenticalTo(rhs)) 27 | } 28 | 29 | /// A Nimble matcher that succeeds when the actual value is the same instance 30 | /// as the expected instance. 31 | /// 32 | /// Alias for "beIdenticalTo". 33 | public func be(_ expected: Any?) -> Predicate { 34 | return beIdenticalTo(expected) 35 | } 36 | 37 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 38 | extension NMBObjCMatcher { 39 | @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { 40 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 41 | let aExpr = actualExpression.cast { $0 as Any? } 42 | return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) 43 | } 44 | } 45 | } 46 | #endif 47 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 4 | public func beLessThan(_ expectedValue: T?) -> Predicate { 5 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 8 | return actual < expected 9 | } 10 | return false 11 | }.requireNonNil 12 | } 13 | 14 | /// A Nimble matcher that succeeds when the actual value is less than the expected value. 15 | public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { 16 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 17 | failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" 18 | let actualValue = try actualExpression.evaluate() 19 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending 20 | return matches 21 | }.requireNonNil 22 | } 23 | 24 | public func <(lhs: Expectation, rhs: T) { 25 | lhs.to(beLessThan(rhs)) 26 | } 27 | 28 | public func < (lhs: Expectation, rhs: NMBComparable?) { 29 | lhs.to(beLessThan(rhs)) 30 | } 31 | 32 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 33 | extension NMBObjCMatcher { 34 | @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { 35 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 36 | let expr = actualExpression.cast { $0 as? NMBComparable } 37 | return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) 38 | } 39 | } 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is less than 4 | /// or equal to the expected value. 5 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { 6 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 8 | if let actual = try actualExpression.evaluate(), let expected = expectedValue { 9 | return actual <= expected 10 | } 11 | return false 12 | }.requireNonNil 13 | } 14 | 15 | /// A Nimble matcher that succeeds when the actual value is less than 16 | /// or equal to the expected value. 17 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { 18 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 19 | failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" 20 | let actualValue = try actualExpression.evaluate() 21 | return actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedDescending 22 | }.requireNonNil 23 | } 24 | 25 | public func <=(lhs: Expectation, rhs: T) { 26 | lhs.to(beLessThanOrEqualTo(rhs)) 27 | } 28 | 29 | public func <=(lhs: Expectation, rhs: T) { 30 | lhs.to(beLessThanOrEqualTo(rhs)) 31 | } 32 | 33 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 34 | extension NMBObjCMatcher { 35 | @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { 36 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 37 | let expr = actualExpression.cast { $0 as? NMBComparable } 38 | return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) 39 | } 40 | } 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> Predicate { 5 | return Predicate.simpleNilable("be nil") { actualExpression in 6 | let actualValue = try actualExpression.evaluate() 7 | return PredicateStatus(bool: actualValue == nil) 8 | } 9 | } 10 | 11 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 12 | extension NMBObjCMatcher { 13 | @objc public class func beNilMatcher() -> NMBObjCMatcher { 14 | return NMBObjCMatcher { actualExpression, failureMessage in 15 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 16 | } 17 | } 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is Void. 4 | public func beVoid() -> Predicate<()> { 5 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be void" 7 | let actualValue: ()? = try actualExpression.evaluate() 8 | return actualValue != nil 9 | } 10 | } 11 | 12 | public func == (lhs: Expectation<()>, rhs: ()) { 13 | lhs.to(beVoid()) 14 | } 15 | 16 | public func != (lhs: Expectation<()>, rhs: ()) { 17 | lhs.toNot(beVoid()) 18 | } 19 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(_ expectedValue: String?) -> Predicate { 6 | return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 8 | 9 | if let actual = try actualExpression.evaluate() { 10 | if let regexp = expectedValue { 11 | return actual.range(of: regexp, options: .regularExpression) != nil 12 | } 13 | } 14 | 15 | return false 16 | }.requireNonNil 17 | } 18 | 19 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 20 | 21 | extension NMBObjCMatcher { 22 | @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { 23 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 24 | let actual = actualExpression.cast { $0 as? String } 25 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift: -------------------------------------------------------------------------------- 1 | /** 2 | Used by the `toSucceed` matcher. 3 | 4 | This is the return type for the closure. 5 | */ 6 | public enum ToSucceedResult { 7 | case succeeded 8 | case failed(reason: String) 9 | } 10 | 11 | /** 12 | A Nimble matcher that takes in a closure for validation. 13 | 14 | Return `.succeeded` when the validation succeeds. 15 | Return `.failed` with a failure reason when the validation fails. 16 | */ 17 | public func succeed() -> Predicate<() -> ToSucceedResult> { 18 | return Predicate.define { actualExpression in 19 | let optActual = try actualExpression.evaluate() 20 | guard let actual = optActual else { 21 | return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) 22 | } 23 | 24 | switch actual() { 25 | case .succeeded: 26 | return PredicateResult( 27 | bool: true, 28 | message: .expectedCustomValueTo("succeed", "") 29 | ) 30 | case .failed(let reason): 31 | return PredicateResult( 32 | bool: false, 33 | message: .expectedCustomValueTo("succeed", " because <\(reason)>") 34 | ) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "NMBStringify.h" 4 | #import "DSL.h" 5 | 6 | #if TARGET_OS_TV 7 | #import "CwlPreconditionTesting_POSIX.h" 8 | #else 9 | #import "CwlPreconditionTesting.h" 10 | #endif 11 | 12 | FOUNDATION_EXPORT double NimbleVersionNumber; 13 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 14 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Generic 4 | 5 | internal func setFailureMessageForError( 6 | _ failureMessage: FailureMessage, 7 | postfixMessageVerb: String = "throw", 8 | actualError: Error?, 9 | error: T? = nil, 10 | errorType: T.Type? = nil, 11 | closure: ((T) -> Void)? = nil) { 12 | failureMessage.postfixMessage = "\(postfixMessageVerb) error" 13 | 14 | if let error = error { 15 | failureMessage.postfixMessage += " <\(error)>" 16 | } else if errorType != nil || closure != nil { 17 | failureMessage.postfixMessage += " from type <\(T.self)>" 18 | } 19 | if closure != nil { 20 | failureMessage.postfixMessage += " that satisfies block" 21 | } 22 | if error == nil && errorType == nil && closure == nil { 23 | failureMessage.postfixMessage = "\(postfixMessageVerb) any error" 24 | } 25 | 26 | if let actualError = actualError { 27 | failureMessage.actualValue = "<\(actualError)>" 28 | } else { 29 | failureMessage.actualValue = "no error" 30 | } 31 | } 32 | 33 | internal func errorMatchesExpectedError( 34 | _ actualError: Error, 35 | expectedError: T) -> Bool { 36 | return actualError._domain == expectedError._domain 37 | && actualError._code == expectedError._code 38 | } 39 | 40 | // Non-generic 41 | 42 | internal func setFailureMessageForError( 43 | _ failureMessage: FailureMessage, 44 | actualError: Error?, 45 | closure: ((Error) -> Void)?) { 46 | failureMessage.postfixMessage = "throw error" 47 | 48 | if closure != nil { 49 | failureMessage.postfixMessage += " that satisfies block" 50 | } else { 51 | failureMessage.postfixMessage = "throw any error" 52 | } 53 | 54 | if let actualError = actualError { 55 | failureMessage.actualValue = "<\(actualError)>" 56 | } else { 57 | failureMessage.actualValue = "no error" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Sequence { 4 | internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { 5 | for item in self { 6 | if !fn(item) { 7 | return false 8 | } 9 | } 10 | return true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Ideally we would always use `StaticString` as the type for tracking the file name 4 | // that expectations originate from, for consistency with `assert` etc. from the 5 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 6 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we 7 | // have to use `String` instead because StaticString can't be generated from Objective-C 8 | #if SWIFT_PACKAGE 9 | public typealias FileString = StaticString 10 | #else 11 | public typealias FileString = String 12 | #endif 13 | 14 | public final class SourceLocation: NSObject { 15 | public let file: FileString 16 | public let line: UInt 17 | 18 | override init() { 19 | file = "Unknown File" 20 | line = 0 21 | } 22 | 23 | init(file: FileString, line: UInt) { 24 | self.file = file 25 | self.line = line 26 | } 27 | 28 | override public var description: String { 29 | return "\(file):\(line)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") 5 | @interface CurrentTestCaseTracker : NSObject 6 | + (CurrentTestCaseTracker *)sharedInstance; 7 | @end 8 | 9 | @interface CurrentTestCaseTracker (Register) @end 10 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface NMBExceptionCapture : NSObject 5 | 6 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; 7 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); 8 | 9 | @end 10 | 11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful); 12 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); 5 | @property (nonatomic, copy) void(^ _Nullable finally)(void); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^ _Nonnull)(void))unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h: -------------------------------------------------------------------------------- 1 | @class NSString; 2 | 3 | /** 4 | * Returns a string appropriate for displaying in test output 5 | * from the provided value. 6 | * 7 | * @param anyObject A value that will show up in a test's output. 8 | * 9 | * @return The string that is returned can be 10 | * customized per type by conforming a type to the `TestOutputStringConvertible` 11 | * protocol. When stringifying a non-`TestOutputStringConvertible` type, this 12 | * function will return the value's debug description and then its 13 | * normal description if available and in that order. Otherwise it 14 | * will return the result of constructing a string from the value. 15 | * 16 | * @see `TestOutputStringConvertible` 17 | */ 18 | extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); 19 | -------------------------------------------------------------------------------- /Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m: -------------------------------------------------------------------------------- 1 | #import "NMBStringify.h" 2 | #import 3 | 4 | NSString *_Nonnull NMBStringify(id _Nullable anyObject) { 5 | return [NMBStringer stringify:anyObject]; 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Behavior.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type. 3 | */ 4 | 5 | open class Behavior { 6 | 7 | open static var name: String { return String(describing: self) } 8 | /** 9 | override this method in your behavior to define a set of reusable examples. 10 | 11 | This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` 12 | and `afterEach` closures, as well as any number of examples (defined using `it`). 13 | 14 | - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. 15 | */ 16 | open class func spec(_ aContext: @escaping () -> Context) {} 17 | } 18 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Callsite.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` 4 | // does not work as expected. 5 | #if swift(>=3.2) 6 | #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE 7 | @objcMembers 8 | public class _CallsiteBase: NSObject {} 9 | #else 10 | public class _CallsiteBase: NSObject {} 11 | #endif 12 | #else 13 | public class _CallsiteBase: NSObject {} 14 | #endif 15 | 16 | /** 17 | An object encapsulating the file and line number at which 18 | a particular example is defined. 19 | */ 20 | final public class Callsite: _CallsiteBase { 21 | /** 22 | The absolute path of the file in which an example is defined. 23 | */ 24 | public let file: String 25 | 26 | /** 27 | The line number on which an example is defined. 28 | */ 29 | public let line: UInt 30 | 31 | internal init(file: String, line: UInt) { 32 | self.file = file 33 | self.line = line 34 | } 35 | } 36 | 37 | extension Callsite { 38 | /** 39 | Returns a boolean indicating whether two Callsite objects are equal. 40 | If two callsites are in the same file and on the same line, they must be equal. 41 | */ 42 | @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { 43 | return lhs.file == rhs.file && lhs.line == rhs.line 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ErrorUtility.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | internal func raiseError(_ message: String) -> Never { 4 | #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) 5 | NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() 6 | #endif 7 | 8 | // This won't be reached when ObjC is available and the exception above is raisd 9 | fatalError(message) 10 | } 11 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` 4 | // does not work as expected. 5 | #if swift(>=3.2) 6 | #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE 7 | @objcMembers 8 | public class _ExampleMetadataBase: NSObject {} 9 | #else 10 | public class _ExampleMetadataBase: NSObject {} 11 | #endif 12 | #else 13 | public class _ExampleMetadataBase: NSObject {} 14 | #endif 15 | 16 | /** 17 | A class that encapsulates information about an example, 18 | including the index at which the example was executed, as 19 | well as the example itself. 20 | */ 21 | final public class ExampleMetadata: _ExampleMetadataBase { 22 | /** 23 | The example for which this metadata was collected. 24 | */ 25 | public let example: Example 26 | 27 | /** 28 | The index at which this example was executed in the 29 | test suite. 30 | */ 31 | public let exampleIndex: Int 32 | 33 | internal init(example: Example, exampleIndex: Int) { 34 | self.example = example 35 | self.exampleIndex = exampleIndex 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Filter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` 4 | // does not work as expected. 5 | #if swift(>=3.2) 6 | #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE 7 | @objcMembers 8 | public class _FilterBase: NSObject {} 9 | #else 10 | public class _FilterBase: NSObject {} 11 | #endif 12 | #else 13 | public class _FilterBase: NSObject {} 14 | #endif 15 | 16 | /** 17 | A mapping of string keys to booleans that can be used to 18 | filter examples or example groups. For example, a "focused" 19 | example would have the flags [Focused: true]. 20 | */ 21 | public typealias FilterFlags = [String: Bool] 22 | 23 | /** 24 | A namespace for filter flag keys, defined primarily to make the 25 | keys available in Objective-C. 26 | */ 27 | final public class Filter: _FilterBase { 28 | /** 29 | Example and example groups with [Focused: true] are included in test runs, 30 | excluding all other examples without this flag. Use this to only run one or 31 | two tests that you're currently focusing on. 32 | */ 33 | public class var focused: String { 34 | return "focused" 35 | } 36 | 37 | /** 38 | Example and example groups with [Pending: true] are excluded from test runs. 39 | Use this to temporarily suspend examples that you know do not pass yet. 40 | */ 41 | public class var pending: String { 42 | return "pending" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift: -------------------------------------------------------------------------------- 1 | // MARK: Example Hooks 2 | 3 | /** 4 | A closure executed before an example is run. 5 | */ 6 | public typealias BeforeExampleClosure = () -> Void 7 | 8 | /** 9 | A closure executed before an example is run. The closure is given example metadata, 10 | which contains information about the example that is about to be run. 11 | */ 12 | public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void 13 | 14 | /** 15 | A closure executed after an example is run. 16 | */ 17 | public typealias AfterExampleClosure = BeforeExampleClosure 18 | 19 | /** 20 | A closure executed after an example is run. The closure is given example metadata, 21 | which contains information about the example that has just finished running. 22 | */ 23 | public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure 24 | 25 | // MARK: Suite Hooks 26 | 27 | /** 28 | A closure executed before any examples are run. 29 | */ 30 | public typealias BeforeSuiteClosure = () -> Void 31 | 32 | /** 33 | A closure executed after all examples have finished running. 34 | */ 35 | public typealias AfterSuiteClosure = BeforeSuiteClosure 36 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after each example. 3 | */ 4 | final internal class ExampleHooks { 5 | internal var befores: [BeforeExampleWithMetadataClosure] = [] 6 | internal var afters: [AfterExampleWithMetadataClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { 14 | befores.append { (_: ExampleMetadata) in closure() } 15 | } 16 | 17 | internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { 18 | afters.append(closure) 19 | } 20 | 21 | internal func appendAfter(_ closure: @escaping AfterExampleClosure) { 22 | afters.append { (_: ExampleMetadata) in closure() } 23 | } 24 | 25 | internal func executeBefores(_ exampleMetadata: ExampleMetadata) { 26 | phase = .beforesExecuting 27 | for before in befores { 28 | before(exampleMetadata) 29 | } 30 | 31 | phase = .beforesFinished 32 | } 33 | 34 | internal func executeAfters(_ exampleMetadata: ExampleMetadata) { 35 | phase = .aftersExecuting 36 | for after in afters { 37 | after(exampleMetadata) 38 | } 39 | 40 | phase = .aftersFinished 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A description of the execution cycle of the current example with 3 | respect to the hooks of that example. 4 | */ 5 | internal enum HooksPhase { 6 | case nothingExecuted 7 | case beforesExecuting 8 | case beforesFinished 9 | case aftersExecuting 10 | case aftersFinished 11 | } 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after all examples. 3 | */ 4 | final internal class SuiteHooks { 5 | internal var befores: [BeforeSuiteClosure] = [] 6 | internal var afters: [AfterSuiteClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { 14 | afters.append(closure) 15 | } 16 | 17 | internal func executeBefores() { 18 | phase = .beforesExecuting 19 | for before in befores { 20 | before() 21 | } 22 | phase = .beforesFinished 23 | } 24 | 25 | internal func executeAfters() { 26 | phase = .aftersExecuting 27 | for after in afters { 28 | after() 29 | } 30 | phase = .aftersFinished 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift: -------------------------------------------------------------------------------- 1 | #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | import Foundation 4 | 5 | extension Bundle { 6 | 7 | /** 8 | Locates the first bundle with a '.xctest' file extension. 9 | */ 10 | internal static var currentTestBundle: Bundle? { 11 | return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } 12 | } 13 | 14 | /** 15 | Return the module name of the bundle. 16 | Uses the bundle filename and transform it to match Xcode's transformation. 17 | Module name has to be a valid "C99 extended identifier". 18 | */ 19 | internal var moduleName: String { 20 | let fileName = bundleURL.fileName as NSString 21 | return fileName.c99ExtendedIdentifier 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift: -------------------------------------------------------------------------------- 1 | #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) 2 | import Foundation 3 | 4 | public extension NSString { 5 | 6 | private static var invalidCharacters: CharacterSet = { 7 | var invalidCharacters = CharacterSet() 8 | 9 | let invalidCharacterSets: [CharacterSet] = [ 10 | .whitespacesAndNewlines, 11 | .illegalCharacters, 12 | .controlCharacters, 13 | .punctuationCharacters, 14 | .nonBaseCharacters, 15 | .symbols 16 | ] 17 | 18 | for invalidSet in invalidCharacterSets { 19 | invalidCharacters.formUnion(invalidSet) 20 | } 21 | 22 | return invalidCharacters 23 | }() 24 | 25 | @objc(qck_c99ExtendedIdentifier) 26 | var c99ExtendedIdentifier: String { 27 | let validComponents = components(separatedBy: NSString.invalidCharacters) 28 | let result = validComponents.joined(separator: "_") 29 | 30 | return result.isEmpty ? "_" : result 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift: -------------------------------------------------------------------------------- 1 | #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | import XCTest 4 | 5 | /** 6 | This protocol defines the role of an object that builds test suites. 7 | */ 8 | internal protocol QuickTestSuiteBuilder { 9 | 10 | /** 11 | Construct a `QuickTestSuite` instance with the appropriate test cases added as tests. 12 | 13 | Subsequent calls to this method should return equivalent test suites. 14 | */ 15 | func buildTestSuite() -> QuickTestSuite 16 | 17 | } 18 | 19 | /** 20 | A base class for a class cluster of Quick test suites, that should correctly 21 | build dynamic test suites for XCTest to execute. 22 | */ 23 | public class QuickTestSuite: XCTestSuite { 24 | 25 | private static var builtTestSuites: Set = Set() 26 | 27 | /** 28 | Construct a test suite for a specific, selected subset of test cases (rather 29 | than the default, which as all test cases). 30 | 31 | If this method is called multiple times for the same test case class, e.g.. 32 | 33 | FooSpec/testFoo 34 | FooSpec/testBar 35 | 36 | It is expected that the first call should return a valid test suite, and 37 | all subsequent calls should return `nil`. 38 | */ 39 | @objc 40 | public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { 41 | guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } 42 | 43 | let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) 44 | if inserted { 45 | return builder.buildTestSuite() 46 | } else { 47 | return nil 48 | } 49 | } 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/Quick/URL+FileName.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension URL { 4 | 5 | /** 6 | Returns the path file name without file extension. 7 | */ 8 | var fileName: String { 9 | return self.deletingPathExtension().lastPathComponent 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface World (SWIFT_EXTENSION(Quick)) 4 | - (void)beforeSuite:(void (^ __nonnull)(void))closure; 5 | - (void)afterSuite:(void (^ __nonnull)(void))closure; 6 | - (void)sharedExamples:(NSString * __nonnull)name closure:(void (^ __nonnull)(NSDictionary * __nonnull (^ __nonnull)(void)))closure; 7 | - (void)describe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 8 | - (void)context:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 9 | - (void)fdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 10 | - (void)xdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; 11 | - (void)beforeEach:(void (^ __nonnull)(void))closure; 12 | - (void)beforeEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; 13 | - (void)afterEach:(void (^ __nonnull)(void))closure; 14 | - (void)afterEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; 15 | - (void)itWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 16 | - (void)fitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 17 | - (void)xitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; 18 | - (void)itBehavesLikeSharedExampleNamed:(NSString * __nonnull)name sharedExampleContext:(NSDictionary * __nonnull (^ __nonnull)(void))sharedExampleContext flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line; 19 | - (void)pending:(NSString * __nonnull)description closure:(void (^ __nonnull)(void))closure; 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | QuickSpec is a base class all specs written in Quick inherit from. 5 | They need to inherit from QuickSpec, a subclass of XCTestCase, in 6 | order to be discovered by the XCTest framework. 7 | 8 | XCTest automatically compiles a list of XCTestCase subclasses included 9 | in the test target. It iterates over each class in that list, and creates 10 | a new instance of that class for each test method. It then creates an 11 | "invocation" to execute that test method. The invocation is an instance of 12 | NSInvocation, which represents a single message send in Objective-C. 13 | The invocation is set on the XCTestCase instance, and the test is run. 14 | 15 | Most of the code in QuickSpec is dedicated to hooking into XCTest events. 16 | First, when the spec is first loaded and before it is sent any messages, 17 | the +[NSObject initialize] method is called. QuickSpec overrides this method 18 | to call +[QuickSpec spec]. This builds the example group stacks and 19 | registers them with Quick.World, a global register of examples. 20 | 21 | Then, XCTest queries QuickSpec for a list of test methods. Normally, XCTest 22 | automatically finds all methods whose selectors begin with the string "test". 23 | However, QuickSpec overrides this default behavior by implementing the 24 | +[XCTestCase testInvocations] method. This method iterates over each example 25 | registered in Quick.World, defines a new method for that example, and 26 | returns an invocation to call that method to XCTest. Those invocations are 27 | the tests that are run by XCTest. Their selector names are displayed in 28 | the Xcode test navigation bar. 29 | */ 30 | @interface QuickSpec : XCTestCase 31 | 32 | /** 33 | Override this method in your spec to define a set of example groups 34 | and examples. 35 | 36 | @code 37 | override func spec() { 38 | describe("winter") { 39 | it("is coming") { 40 | // ... 41 | } 42 | } 43 | } 44 | @endcode 45 | 46 | See DSL.swift for more information on what syntax is available. 47 | */ 48 | - (void)spec; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/World.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ExampleGroup; 4 | @class ExampleMetadata; 5 | 6 | SWIFT_CLASS("_TtC5Quick5World") 7 | @interface World 8 | 9 | @property (nonatomic) ExampleGroup * __nullable currentExampleGroup; 10 | @property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; 11 | @property (nonatomic) BOOL isRunningAdditionalSuites; 12 | + (World * __nonnull)sharedWorld; 13 | - (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; 14 | - (void)finalizeConfiguration; 15 | - (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; 16 | - (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; 17 | - (void)performWithCurrentExampleGroup:(ExampleGroup * __nonnull)group closure:(void (^ __nonnull)(void))closure; 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | @interface XCTestSuite (QuickTestSuiteBuilder) 6 | @end 7 | 8 | @implementation XCTestSuite (QuickTestSuiteBuilder) 9 | 10 | /** 11 | In order to ensure we can correctly build dynamic test suites, we need to 12 | replace some of the default test suite constructors. 13 | */ 14 | + (void)load { 15 | Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:)); 16 | Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:)); 17 | method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName); 18 | } 19 | 20 | /** 21 | The `+testSuiteForTestCaseWithName:` method is called when a specific test case 22 | class is run from the Xcode test navigator. If the built test suite is `nil`, 23 | Xcode will not run any tests for that test case. 24 | 25 | Given if the following test case class is run from the Xcode test navigator: 26 | 27 | FooSpec 28 | testFoo 29 | testBar 30 | 31 | XCTest will invoke this once per test case, with test case names following this format: 32 | 33 | FooSpec/testFoo 34 | FooSpec/testBar 35 | */ 36 | + (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { 37 | return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m: -------------------------------------------------------------------------------- 1 | #import "QuickSpecBase.h" 2 | 3 | #pragma mark - _QuickSelectorWrapper 4 | 5 | @interface _QuickSelectorWrapper () 6 | @property(nonatomic, assign) SEL selector; 7 | @end 8 | 9 | @implementation _QuickSelectorWrapper 10 | 11 | - (instancetype)initWithSelector:(SEL)selector { 12 | self = [super init]; 13 | _selector = selector; 14 | return self; 15 | } 16 | 17 | @end 18 | 19 | 20 | #pragma mark - _QuickSpecBase 21 | 22 | @implementation _QuickSpecBase 23 | 24 | - (instancetype)init { 25 | self = [super initWithInvocation: nil]; 26 | return self; 27 | } 28 | 29 | /** 30 | Invocations for each test method in the test case. QuickSpec overrides this method to define a 31 | new method for each example defined in +[QuickSpec spec]. 32 | 33 | @return An array of invocations that execute the newly defined example methods. 34 | */ 35 | + (NSArray *)testInvocations { 36 | NSArray<_QuickSelectorWrapper *> *wrappers = [self _qck_testMethodSelectors]; 37 | NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:wrappers.count]; 38 | 39 | for (_QuickSelectorWrapper *wrapper in wrappers) { 40 | SEL selector = wrapper.selector; 41 | NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; 42 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 43 | invocation.selector = selector; 44 | 45 | [invocations addObject:invocation]; 46 | } 47 | 48 | return invocations; 49 | } 50 | 51 | + (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors { 52 | return @[]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface _QuickSelectorWrapper : NSObject 5 | - (instancetype)initWithSelector:(SEL)selector; 6 | @end 7 | 8 | @interface _QuickSpecBase : XCTestCase 9 | + (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors; 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | @end 12 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | public typealias ConstraintInterfaceLayoutDirection = UIUserInterfaceLayoutDirection 27 | #else 28 | import AppKit 29 | public typealias ConstraintInterfaceLayoutDirection = NSUserInterfaceLayoutDirection 30 | #endif 31 | 32 | 33 | public struct ConstraintConfig { 34 | 35 | public static var interfaceLayoutDirection: ConstraintInterfaceLayoutDirection = .leftToRight 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintInsets.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintInsets = UIEdgeInsets 33 | #else 34 | public typealias ConstraintInsets = NSEdgeInsets 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public final class ConstraintItem { 32 | 33 | internal weak var target: AnyObject? 34 | internal let attributes: ConstraintAttributes 35 | 36 | internal init(target: AnyObject?, attributes: ConstraintAttributes) { 37 | self.target = target 38 | self.attributes = attributes 39 | } 40 | 41 | internal var layoutConstraintItem: LayoutConstraintItem? { 42 | return self.target as? LayoutConstraintItem 43 | } 44 | 45 | } 46 | 47 | public func ==(lhs: ConstraintItem, rhs: ConstraintItem) -> Bool { 48 | // pointer equality 49 | guard lhs !== rhs else { 50 | return true 51 | } 52 | 53 | // must both have valid targets and identical attributes 54 | guard let target1 = lhs.target, 55 | let target2 = rhs.target, 56 | target1 === target2 && lhs.attributes == rhs.attributes else { 57 | return false 58 | } 59 | 60 | return true 61 | } 62 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 9.0, OSX 10.11, *) 30 | public extension ConstraintLayoutGuide { 31 | 32 | public var snp: ConstraintLayoutGuideDSL { 33 | return ConstraintLayoutGuideDSL(guide: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 9.0, *) 33 | public typealias ConstraintLayoutGuide = UILayoutGuide 34 | #else 35 | @available(OSX 10.11, *) 36 | public typealias ConstraintLayoutGuide = NSLayoutGuide 37 | #endif 38 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutSupport.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | @available(iOS 8.0, *) 33 | public typealias ConstraintLayoutSupport = UILayoutSupport 34 | #else 35 | public class ConstraintLayoutSupport {} 36 | #endif 37 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | @available(iOS 8.0, *) 32 | public struct ConstraintLayoutSupportDSL: ConstraintDSL { 33 | 34 | public var target: AnyObject? { 35 | return self.support 36 | } 37 | 38 | internal let support: ConstraintLayoutSupport 39 | 40 | internal init(support: ConstraintLayoutSupport) { 41 | self.support = support 42 | 43 | } 44 | 45 | public var top: ConstraintItem { 46 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.top) 47 | } 48 | 49 | public var bottom: ConstraintItem { 50 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.bottom) 51 | } 52 | 53 | public var height: ConstraintItem { 54 | return ConstraintItem(target: self.target, attributes: ConstraintAttributes.height) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMakerEditable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerEditable: ConstraintMakerPriortizable { 32 | 33 | @discardableResult 34 | public func multipliedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 35 | self.description.multiplier = amount 36 | return self 37 | } 38 | 39 | @discardableResult 40 | public func dividedBy(_ amount: ConstraintMultiplierTarget) -> ConstraintMakerEditable { 41 | return self.multipliedBy(1.0 / amount.constraintMultiplierTargetValue) 42 | } 43 | 44 | @discardableResult 45 | public func offset(_ amount: ConstraintOffsetTarget) -> ConstraintMakerEditable { 46 | self.description.constant = amount.constraintOffsetTargetValue 47 | return self 48 | } 49 | 50 | @discardableResult 51 | public func inset(_ amount: ConstraintInsetTarget) -> ConstraintMakerEditable { 52 | self.description.constant = amount.constraintInsetTargetValue 53 | return self 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class ConstraintMakerFinalizable { 32 | 33 | internal let description: ConstraintDescription 34 | 35 | internal init(_ description: ConstraintDescription) { 36 | self.description = description 37 | } 38 | 39 | @discardableResult 40 | public func labeled(_ label: String) -> ConstraintMakerFinalizable { 41 | self.description.label = label 42 | return self 43 | } 44 | 45 | public var constraint: Constraint { 46 | return self.description.constraint! 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintPriorityTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintPriorityTarget { 32 | 33 | var constraintPriorityTargetValue: Float { get } 34 | 35 | } 36 | 37 | extension Int: ConstraintPriorityTarget { 38 | 39 | public var constraintPriorityTargetValue: Float { 40 | return Float(self) 41 | } 42 | 43 | } 44 | 45 | extension UInt: ConstraintPriorityTarget { 46 | 47 | public var constraintPriorityTargetValue: Float { 48 | return Float(self) 49 | } 50 | 51 | } 52 | 53 | extension Float: ConstraintPriorityTarget { 54 | 55 | public var constraintPriorityTargetValue: Float { 56 | return self 57 | } 58 | 59 | } 60 | 61 | extension Double: ConstraintPriorityTarget { 62 | 63 | public var constraintPriorityTargetValue: Float { 64 | return Float(self) 65 | } 66 | 67 | } 68 | 69 | extension CGFloat: ConstraintPriorityTarget { 70 | 71 | public var constraintPriorityTargetValue: Float { 72 | return Float(self) 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public protocol ConstraintRelatableTarget { 32 | } 33 | 34 | extension Int: ConstraintRelatableTarget { 35 | } 36 | 37 | extension UInt: ConstraintRelatableTarget { 38 | } 39 | 40 | extension Float: ConstraintRelatableTarget { 41 | } 42 | 43 | extension Double: ConstraintRelatableTarget { 44 | } 45 | 46 | extension CGFloat: ConstraintRelatableTarget { 47 | } 48 | 49 | extension CGSize: ConstraintRelatableTarget { 50 | } 51 | 52 | extension CGPoint: ConstraintRelatableTarget { 53 | } 54 | 55 | extension ConstraintInsets: ConstraintRelatableTarget { 56 | } 57 | 58 | extension ConstraintItem: ConstraintRelatableTarget { 59 | } 60 | 61 | extension ConstraintView: ConstraintRelatableTarget { 62 | } 63 | 64 | @available(iOS 9.0, OSX 10.11, *) 65 | extension ConstraintLayoutGuide: ConstraintRelatableTarget { 66 | } 67 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintRelation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | internal enum ConstraintRelation : Int { 32 | case equal = 1 33 | case lessThanOrEqual 34 | case greaterThanOrEqual 35 | 36 | internal var layoutRelation: LayoutRelation { 37 | get { 38 | switch(self) { 39 | case .equal: 40 | return .equal 41 | case .lessThanOrEqual: 42 | return .lessThanOrEqual 43 | case .greaterThanOrEqual: 44 | return .greaterThanOrEqual 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/ConstraintView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | #if os(iOS) || os(tvOS) 32 | public typealias ConstraintView = UIView 33 | #else 34 | public typealias ConstraintView = NSView 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/LayoutConstraint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #else 27 | import AppKit 28 | #endif 29 | 30 | 31 | public class LayoutConstraint : NSLayoutConstraint { 32 | 33 | public var label: String? { 34 | get { 35 | return self.identifier 36 | } 37 | set { 38 | self.identifier = newValue 39 | } 40 | } 41 | 42 | internal weak var constraint: Constraint? = nil 43 | 44 | } 45 | 46 | internal func ==(lhs: LayoutConstraint, rhs: LayoutConstraint) -> Bool { 47 | guard lhs.firstItem === rhs.firstItem && 48 | lhs.secondItem === rhs.secondItem && 49 | lhs.firstAttribute == rhs.firstAttribute && 50 | lhs.secondAttribute == rhs.secondAttribute && 51 | lhs.relation == rhs.relation && 52 | lhs.priority == rhs.priority && 53 | lhs.multiplier == rhs.multiplier else { 54 | return false 55 | } 56 | return true 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/Typealiases.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | import Foundation 25 | 26 | #if os(iOS) || os(tvOS) 27 | import UIKit 28 | typealias LayoutRelation = NSLayoutRelation 29 | typealias LayoutAttribute = NSLayoutAttribute 30 | typealias LayoutPriority = UILayoutPriority 31 | #else 32 | import AppKit 33 | typealias LayoutRelation = NSLayoutConstraint.Relation 34 | typealias LayoutAttribute = NSLayoutConstraint.Attribute 35 | typealias LayoutPriority = NSLayoutConstraint.Priority 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /Example/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SnapKit 3 | // 4 | // Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #if os(iOS) || os(tvOS) 25 | import UIKit 26 | #endif 27 | 28 | 29 | @available(iOS 8.0, *) 30 | public extension ConstraintLayoutSupport { 31 | 32 | public var snp: ConstraintLayoutSupportDSL { 33 | return ConstraintLayoutSupportDSL(support: self) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_FBSnapshotTestCase : NSObject 3 | @end 4 | @implementation PodsDummy_FBSnapshotTestCase 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "FBSnapshotTestCase.h" 14 | #import "FBSnapshotTestCasePlatform.h" 15 | #import "FBSnapshotTestController.h" 16 | 17 | FOUNDATION_EXPORT double FBSnapshotTestCaseVersionNumber; 18 | FOUNDATION_EXPORT const unsigned char FBSnapshotTestCaseVersionString[]; 19 | 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.modulemap: -------------------------------------------------------------------------------- 1 | framework module FBSnapshotTestCase { 2 | umbrella header "FBSnapshotTestCase-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/FBSnapshotTestCase.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "Foundation" -framework "QuartzCore" -framework "UIKit" -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/FBSnapshotTestCase 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/FBSnapshotTestCase/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 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.4 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/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 | FMWK 17 | CFBundleShortVersionString 18 | 6.3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Nimble_Snapshots : NSObject 3 | @end 4 | @implementation PodsDummy_Nimble_Snapshots 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "XCTestObservationCenter+CurrentTestCaseTracker.h" 14 | #import "NBSMockedApplication.h" 15 | 16 | FOUNDATION_EXPORT double Nimble_SnapshotsVersionNumber; 17 | FOUNDATION_EXPORT const unsigned char Nimble_SnapshotsVersionString[]; 18 | 19 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble_Snapshots { 2 | umbrella header "Nimble-Snapshots-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble-Snapshots/Nimble-Snapshots.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble-Snapshots 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble-Snapshots 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/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 | FMWK 17 | CFBundleShortVersionString 18 | 7.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Nimble : NSObject 3 | @end 4 | @implementation PodsDummy_Nimble 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "Nimble.h" 14 | #import "DSL.h" 15 | #import "NMBExceptionCapture.h" 16 | #import "NMBStringify.h" 17 | #import "CwlCatchException.h" 18 | #import "CwlMachBadInstructionHandler.h" 19 | #import "mach_excServer.h" 20 | #import "CwlPreconditionTesting.h" 21 | 22 | FOUNDATION_EXPORT double NimbleVersionNumber; 23 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.modulemap: -------------------------------------------------------------------------------- 1 | framework module Nimble { 2 | umbrella header "Nimble-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Nimble/Nimble.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) -suppress-warnings $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Pods-ZHRefresh_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ZHRefresh_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ZHRefresh_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Pods-ZHRefresh_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ZHRefresh_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ZHRefresh_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Pods-ZHRefresh_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh/ZHRefresh.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" -framework "ZHRefresh" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Pods-ZHRefresh_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ZHRefresh_Example { 2 | umbrella header "Pods-ZHRefresh_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Example/Pods-ZHRefresh_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh/ZHRefresh.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SnapKit" -framework "ZHRefresh" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/Pods-ZHRefresh_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ZHRefresh_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ZHRefresh_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/Pods-ZHRefresh_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ZHRefresh_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ZHRefresh_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/Pods-ZHRefresh_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble-Snapshots" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble-Snapshots/Nimble_Snapshots.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh/ZHRefresh.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "Nimble" -framework "Nimble_Snapshots" -framework "Quick" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/Pods-ZHRefresh_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ZHRefresh_Tests { 2 | umbrella header "Pods-ZHRefresh_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ZHRefresh_Tests/Pods-ZHRefresh_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble-Snapshots" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble-Snapshots/Nimble_Snapshots.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh/ZHRefresh.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "FBSnapshotTestCase" -framework "Nimble" -framework "Nimble_Snapshots" -framework "Quick" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Quick : NSObject 3 | @end 4 | @implementation PodsDummy_Quick 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "QuickConfiguration.h" 14 | #import "QCKDSL.h" 15 | #import "Quick.h" 16 | #import "QuickSpec.h" 17 | 18 | FOUNDATION_EXPORT double QuickVersionNumber; 19 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 20 | 21 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.modulemap: -------------------------------------------------------------------------------- 1 | framework module Quick { 2 | umbrella header "Quick-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Quick/Quick.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick 2 | ENABLE_BITCODE = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 6 | OTHER_LDFLAGS = -framework "XCTest" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/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 | FMWK 17 | CFBundleShortVersionString 18 | 4.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SnapKit : NSObject 3 | @end 4 | @implementation PodsDummy_SnapKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double SnapKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module SnapKit { 2 | umbrella header "SnapKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SnapKit/SnapKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/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 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.9 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ResourceBundle-ZHRefresh-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.1.4 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ZHRefresh-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ZHRefresh : NSObject 3 | @end 4 | @implementation PodsDummy_ZHRefresh 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ZHRefresh-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ZHRefresh-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "UIScrollView+ZHExtension.h" 14 | #import "ZHRefreshRunTime.h" 15 | 16 | FOUNDATION_EXPORT double ZHRefreshVersionNumber; 17 | FOUNDATION_EXPORT const unsigned char ZHRefreshVersionString[]; 18 | 19 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ZHRefresh.modulemap: -------------------------------------------------------------------------------- 1 | framework module ZHRefresh { 2 | umbrella header "ZHRefresh-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ZHRefresh/ZHRefresh.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZHRefresh 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 SummerHF <391565521@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/arrow@2x.png -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/zh-Hans.lproj/Localizable.strings -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Assets/ZHRefresh.bundle/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "ZHRefreshHeaderIdleText" = "下拉可以刷新"; 2 | "ZHRefreshHeaderPullingText" = "鬆開立即刷新"; 3 | "ZHRefreshHeaderRefreshingText" = "正在刷新數據中..."; 4 | 5 | "ZHRefreshAutoFooterIdleText" = "點擊或上拉加載更多"; 6 | "ZHRefreshAutoFooterRefreshingText" = "正在加載更多的數據..."; 7 | "ZHRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢"; 8 | 9 | "ZHRefreshBackFooterIdleText" = "上拉可以加載更多"; 10 | "ZHRefreshBackFooterPullingText" = "鬆開立即加載更多"; 11 | "ZHRefreshBackFooterRefreshingText" = "正在加載更多的數據..."; 12 | "ZHRefreshBackFooterNoMoreDataText" = "已經全部加載完畢"; 13 | 14 | "ZHRefreshHeaderLastTimeText" = "最後更新:"; 15 | "ZHRefreshHeaderDateTodayText" = "今天"; 16 | "ZHRefreshHeaderNoneLastDateText" = "無記錄"; 17 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshChiBaoZiAutoFooter.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshChiBaoZiAutoFooter.swift 2 | // Refresh 3 | // 4 | // Created by macbookair on 2018/5/10. 5 | // 6 | // 7 | // Copyright (c) 2018 macbookair(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | class ZHRefreshChiBaoZiAutoFooter: ZHRefreshAutoGifFooter { 31 | override func prepare() { 32 | super.prepare() 33 | /// 设置普通状态的动画图片 34 | var idleImages = [UIImage]() 35 | for i in 1...60 { 36 | let string = String(format: "dropdown_anim__000%zd", i) 37 | let image = UIImage(named: string)! 38 | idleImages.append(image) 39 | } 40 | set(images: idleImages, state: .idle) 41 | /// 设置即将刷新状态的动画图片 42 | var refreshingImages = [UIImage]() 43 | for i in 1...3 { 44 | let string = String(format: "dropdown_anim__000%zd", i) 45 | let image = UIImage(named: string)! 46 | refreshingImages.append(image) 47 | } 48 | set(images: refreshingImages, state: .pulling) 49 | /// 设置正在刷新状态的动画图片 50 | set(images: refreshingImages, state: .refreshing) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshChiBaoZiFooter.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshChiBaoZiFooter.swift 2 | // Refresh 3 | // 4 | // Created by SummerHF on 10/05/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | class ZHRefreshChiBaoZiFooter: ZHRefreshBackGifFooter { 31 | 32 | override func prepare() { 33 | super.prepare() 34 | /// 设置普通状态的动画图片 35 | var idleImages = [UIImage]() 36 | for i in 1...60 { 37 | let string = String(format: "dropdown_anim__000%zd", i) 38 | let image = UIImage(named: string)! 39 | idleImages.append(image) 40 | } 41 | set(images: idleImages, state: .idle) 42 | /// 设置即将刷新状态的动画图片 43 | var refreshingImages = [UIImage]() 44 | for i in 1...3 { 45 | let string = String(format: "dropdown_anim__000%zd", i) 46 | let image = UIImage(named: string)! 47 | refreshingImages.append(image) 48 | } 49 | set(images: refreshingImages, state: .pulling) 50 | /// 设置正在刷新状态的动画图片 51 | set(images: refreshingImages, state: .refreshing) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshChiBaoZiHeader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZHRefreshChiBaoZiHeader.swift 3 | // Refresh 4 | // 5 | // Created by SummerHF on 02/05/2018. 6 | // Copyright © 2018 summer. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ZHRefreshChiBaoZiHeader: ZHRefreshGifHeader { 12 | 13 | override func prepare() { 14 | super.prepare() 15 | /// 设置普通状态的动画图片 16 | var idleImages = [UIImage]() 17 | for i in 1...60 { 18 | let string = String(format: "dropdown_anim__000%zd", i) 19 | let image = UIImage(named: string)! 20 | idleImages.append(image) 21 | } 22 | set(images: idleImages, state: .idle) 23 | /// 设置即将刷新状态的动画图片 24 | var refreshingImages = [UIImage]() 25 | for i in 1...3 { 26 | let string = String(format: "dropdown_anim__000%zd", i) 27 | let image = UIImage(named: string)! 28 | refreshingImages.append(image) 29 | } 30 | set(images: refreshingImages, state: .pulling) 31 | /// 设置正在刷新状态的动画图片 32 | set(images: refreshingImages, state: .refreshing) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshConst.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshConst.swift 2 | // Refresh 3 | // 4 | // Created by SummerHF on 28/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | /// 字体大小 31 | let ZHRefreshLableFont = UIFont.boldSystemFont(ofSize: 14) 32 | /// 文字颜色 33 | let ZHRefreshLableTextColor = UIColor(red: 90/255.0, green: 90/255.0, blue: 90/255.0, alpha: 1.0) 34 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshRunTime.h: -------------------------------------------------------------------------------- 1 | // ZHRefreshRunTime.h 2 | // Refresh 3 | // 4 | // Created by SummerHF on 27/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | 30 | @interface ZHRefreshRuntime : NSObject 31 | 32 | /** objc_msgSend不能使用纯OC实现 这里借助OC来完成 */ 33 | + (BOOL)target:(id)target canPerformSelector:(SEL)selctor; 34 | /** 发送消息 */ 35 | + (void)target:(id)target performSelector:(SEL)selctor view:(UIView *)view; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/ZHRefresh/ZHRefresh/Classes/ZHRefreshRunTime.m: -------------------------------------------------------------------------------- 1 | // ZHRefreshRunTime.m 2 | // Refresh 3 | // 4 | // Created by SummerHF on 27/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import "ZHRefreshRunTime.h" 29 | #import 30 | 31 | // 运行时objc_msgSend 32 | #define ZHRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) 33 | #define ZHRefreshMsgTarget(target) (__bridge void *)(target) 34 | 35 | @implementation ZHRefreshRuntime 36 | 37 | + (BOOL)target:(id)target canPerformSelector:(SEL)selctor { 38 | return [target respondsToSelector:selctor]; 39 | } 40 | 41 | + (void)target:(id)target performSelector:(SEL)selctor view:(UIView *)view { 42 | ZHRefreshMsgSend(ZHRefreshMsgTarget(target), selctor, view); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | // https://github.com/Quick/Quick 2 | 3 | import Quick 4 | import Nimble 5 | import ZHRefresh 6 | 7 | class TableOfContentsSpec: QuickSpec { 8 | override func spec() { 9 | describe("these will fail") { 10 | 11 | it("can do maths") { 12 | expect(1) == 2 13 | } 14 | 15 | it("can read") { 16 | expect("number") == "string" 17 | } 18 | 19 | it("will eventually fail") { 20 | expect("time").toEventually( equal("done") ) 21 | } 22 | 23 | context("these will pass") { 24 | 25 | it("can do maths") { 26 | expect(23) == 23 27 | } 28 | 29 | it("can read") { 30 | expect("🐮") == "🐮" 31 | } 32 | 33 | it("will eventually pass") { 34 | var time = "passing" 35 | 36 | DispatchQueue.main.async { 37 | time = "done" 38 | } 39 | 40 | waitUntil { done in 41 | Thread.sleep(forTimeInterval: 0.5) 42 | expect(time) == "done" 43 | 44 | done() 45 | } 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Example/ZHRefresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ZHRefresh.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/ZHRefresh.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/ZHRefresh/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ZHRefresh 4 | // 5 | // Created by SummerHF on 05/11/2018. 6 | // Copyright (c) 2018 SummerHF. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/card_refresh.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "card_refresh@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "card_refresh@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/card_refresh.imageset/card_refresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/ZHRefresh/Images.xcassets/card_refresh.imageset/card_refresh@2x.png -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/card_refresh.imageset/card_refresh@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/ZHRefresh/Images.xcassets/card_refresh.imageset/card_refresh@3x.png -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/header_place_holder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "header_place_holder@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/ZHRefresh/Images.xcassets/header_place_holder.imageset/header_place_holder@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/Example/ZHRefresh/Images.xcassets/header_place_holder.imageset/header_place_holder@2x.png -------------------------------------------------------------------------------- /Example/ZHRefresh/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 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | UILaunchStoryboardName 31 | LaunchScreen 32 | UIMainStoryboardFile 33 | Main 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Example/ZHRefresh/Tool/UIViewController+Dynamic.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Dynamic.h 3 | // ZHRefresh_Example 4 | // 5 | // Created by SummerHF on 11/05/2018. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (Dynamic) 12 | 13 | @property (nonatomic, copy)NSString * method; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/ZHRefresh/Tool/UIViewController+Dynamic.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Dynamic.m 3 | // ZHRefresh_Example 4 | // 5 | // Created by SummerHF on 11/05/2018. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+Dynamic.h" 10 | #import 11 | 12 | @implementation UIViewController (Dynamic) 13 | 14 | /** 检测是否有内存泄漏 */ 15 | 16 | + (void)load { 17 | Method mehtod1 = class_getInstanceMethod([self class], NSSelectorFromString(@"dealloc")); 18 | Method method2 = class_getInstanceMethod([self class], @selector(swizzleDealloc)); 19 | method_exchangeImplementations(mehtod1, method2); 20 | } 21 | 22 | - (void)swizzleDealloc { 23 | NSLog(@"%@ ---> 已被释放", self); 24 | [self swizzleDealloc]; 25 | } 26 | 27 | static const char key = '\0'; 28 | 29 | - (void)setMethod:(NSString *)method { 30 | objc_setAssociatedObject(self, &key, method, OBJC_ASSOCIATION_COPY_NONATOMIC); 31 | } 32 | 33 | - (NSString *)method { 34 | return objc_getAssociatedObject(self, &key); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/ZHRefresh/Tool/ZHRefresh_Example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "UIViewController+Dynamic.h" 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 SummerHF <391565521@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ZHRefresh.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint ZHRefresh.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'ZHRefresh' 11 | s.version = '0.1.9' 12 | s.summary = 'a refresh control write by Swift which like MJRefresh' 13 | s.swift_version = '4.0' 14 | 15 | # This description is used to generate tags and improve search results. 16 | # * Think: What does it do? Why did you write it? What is the focus? 17 | # * Try to keep it short, snappy and to the point. 18 | # * Write the description between the DESC delimiters below. 19 | # * Finally, don't worry about the indent, CocoaPods strips it! 20 | 21 | s.description = <<-DESC 22 | TODO: 1. add Custom refresh style 23 | 2. Adaptive iPhoneX and other device 24 | DESC 25 | 26 | s.homepage = 'https://github.com/SummerHF/ZHRefresh' 27 | s.license = { :type => 'MIT', :file => 'LICENSE' } 28 | s.author = { 'SummerHF' => '391565521@qq.com' } 29 | s.source = { :git => 'https://github.com/SummerHF/ZHRefresh.git', :tag => s.version.to_s } 30 | s.social_media_url = 'http://summerhf.cn' 31 | s.ios.deployment_target = '8.0' 32 | s.source_files = 'ZHRefresh/Classes/*.*' 33 | s.frameworks = 'UIKit', 'Foundation' 34 | s.module_name = 'ZHRefresh' 35 | s.resources = "ZHRefresh/Assets/ZHRefresh.bundle" 36 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 37 | # s.public_header_files = 'Pod/Classes/**/*.h' 38 | # s.dependency 'AFNetworking', '~> 2.3' 39 | end 40 | -------------------------------------------------------------------------------- /ZHRefresh/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/.gitkeep -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/arrow@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00010@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00010@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00011@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00011@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00012@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00012@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00013@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00013@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00014@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00014@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00015@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00015@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00016@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00016@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00017@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00017@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00018@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00018@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00019@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00019@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0001@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0001@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00020@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00020@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00021@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00021@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00022@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00022@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00023@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00023@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00024@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00024@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00025@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00025@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00026@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00026@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00027@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00027@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00028@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00028@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00029@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00029@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0002@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0002@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00030@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00030@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00031@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00031@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00032@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00032@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00033@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00033@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00034@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00034@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00035@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00035@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00036@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00036@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00037@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00037@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00038@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00038@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00039@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00039@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0003@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0003@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00040@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00040@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00041@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00041@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00042@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00042@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00043@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00043@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00044@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00044@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00045@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00045@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00046@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00046@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00047@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00047@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00048@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00048@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00049@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00049@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0004@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0004@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00050@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00050@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00051@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00051@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00052@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00052@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00053@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00053@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00054@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00054@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00055@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00055@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00056@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00056@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00057@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00057@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00058@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00058@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00059@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00059@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0005@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0005@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00060@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__00060@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0006@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0006@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0007@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0007@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0008@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0008@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0009@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_anim__0009@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_01@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_02@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/dropdown_loading_03@2x.png -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Assets/ZHRefresh.bundle/zh-Hans.lproj/Localizable.strings -------------------------------------------------------------------------------- /ZHRefresh/Assets/ZHRefresh.bundle/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "ZHRefreshHeaderIdleText" = "下拉可以刷新"; 2 | "ZHRefreshHeaderPullingText" = "鬆開立即刷新"; 3 | "ZHRefreshHeaderRefreshingText" = "正在刷新數據中..."; 4 | 5 | "ZHRefreshAutoFooterIdleText" = "點擊或上拉加載更多"; 6 | "ZHRefreshAutoFooterRefreshingText" = "正在加載更多的數據..."; 7 | "ZHRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢"; 8 | 9 | "ZHRefreshBackFooterIdleText" = "上拉可以加載更多"; 10 | "ZHRefreshBackFooterPullingText" = "鬆開立即加載更多"; 11 | "ZHRefreshBackFooterRefreshingText" = "正在加載更多的數據..."; 12 | "ZHRefreshBackFooterNoMoreDataText" = "已經全部加載完畢"; 13 | 14 | "ZHRefreshHeaderLastTimeText" = "最後更新:"; 15 | "ZHRefreshHeaderDateTodayText" = "今天"; 16 | "ZHRefreshHeaderNoneLastDateText" = "無記錄"; 17 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SummerHF/ZHRefresh/a6d7c43c1cf62e0a23046cd6d93961a1e8627b33/ZHRefresh/Classes/.gitkeep -------------------------------------------------------------------------------- /ZHRefresh/Classes/UIScrollView+ZHExtension.h: -------------------------------------------------------------------------------- 1 | // UIScrollView+ZHExtension.h 2 | // Refresh 3 | // 4 | // Created by SummerHF on 27/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | 30 | @interface UIScrollView (ZHExtension) 31 | 32 | @property(nonatomic, readonly) UIEdgeInsets zh_inset; 33 | 34 | @property(nonatomic, assign) CGFloat zh_insertT; 35 | @property(nonatomic, assign) CGFloat zh_insertB; 36 | @property(nonatomic, assign) CGFloat zh_insertL; 37 | @property(nonatomic, assign) CGFloat zh_insertR; 38 | 39 | @property(nonatomic, assign) CGFloat zh_offsetX; 40 | @property(nonatomic, assign) CGFloat zh_offsetY; 41 | 42 | @property(nonatomic, assign) CGFloat zh_contentW; 43 | @property(nonatomic, assign) CGFloat zh_contentH; 44 | 45 | #pragma mark - other 46 | 47 | @property(nonatomic, copy)void (^zh_reloadDataBlock)(NSInteger totalCount); 48 | 49 | - (NSInteger)zh_totalCount; 50 | 51 | @end 52 | 53 | @interface NSBundle (ZHExtension) 54 | 55 | + (instancetype)zh_refreshBundle; 56 | + (NSString *)zh_localizedStringForKey:(NSString *)key; 57 | + (NSString *)zh_localizedStringForKey:(NSString *)key value:(NSString *)value; 58 | 59 | @end 60 | 61 | @interface UILabel (ZHExtension) 62 | 63 | - (CGFloat)zh_textWidth; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshChiBaoZiAutoFooter.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshChiBaoZiAutoFooter.swift 2 | // Refresh 3 | // 4 | // Created by macbookair on 2018/5/10. 5 | // 6 | // 7 | // Copyright (c) 2018 macbookair(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | public class ZHRefreshChiBaoZiAutoFooter: ZHRefreshAutoGifFooter { 31 | override public func prepare() { 32 | super.prepare() 33 | /// 设置普通状态的动画图片 34 | var idleImages = [UIImage]() 35 | for i in 1...60 { 36 | let string = String(format: "dropdown_anim__000%zd@2x", i) 37 | let image = UIImage.bundleImage(name: string)! 38 | idleImages.append(image) 39 | } 40 | set(images: idleImages, state: .idle) 41 | /// 设置即将刷新状态的动画图片 42 | var refreshingImages = [UIImage]() 43 | for i in 1...3 { 44 | let string = String(format: "dropdown_anim__000%zd@2x", i) 45 | let image = UIImage.bundleImage(name: string)! 46 | refreshingImages.append(image) 47 | } 48 | set(images: refreshingImages, state: .pulling) 49 | /// 设置正在刷新状态的动画图片 50 | set(images: refreshingImages, state: .refreshing) 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshChiBaoZiFooter.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshChiBaoZiFooter.swift 2 | // Refresh 3 | // 4 | // Created by SummerHF on 10/05/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | public class ZHRefreshChiBaoZiFooter: ZHRefreshBackGifFooter { 31 | 32 | override public func prepare() { 33 | super.prepare() 34 | /// 设置普通状态的动画图片 35 | var idleImages = [UIImage]() 36 | for i in 1...60 { 37 | let string = String(format: "dropdown_anim__000%zd@2x", i) 38 | let image = UIImage.bundleImage(name: string)! 39 | idleImages.append(image) 40 | } 41 | set(images: idleImages, state: .idle) 42 | /// 设置即将刷新状态的动画图片 43 | var refreshingImages = [UIImage]() 44 | for i in 1...3 { 45 | let string = String(format: "dropdown_anim__000%zd@2x", i) 46 | let image = UIImage.bundleImage(name: string)! 47 | refreshingImages.append(image) 48 | } 49 | set(images: refreshingImages, state: .pulling) 50 | /// 设置正在刷新状态的动画图片 51 | set(images: refreshingImages, state: .refreshing) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshChiBaoZiHeader.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshChiBaoZiHeader.swift 2 | // Refresh 3 | // 4 | // Created by SummerHF on 10/05/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | public class ZHRefreshChiBaoZiHeader: ZHRefreshGifHeader { 31 | 32 | override public func prepare() { 33 | super.prepare() 34 | /// 设置普通状态的动画图片 35 | var idleImages = [UIImage]() 36 | for i in 1...60 { 37 | let string = String(format: "dropdown_anim__000%zd@2x", i) 38 | let image = UIImage.bundleImage(name: string)! 39 | idleImages.append(image) 40 | } 41 | set(images: idleImages, state: .idle) 42 | /// 设置即将刷新状态的动画图片 43 | var refreshingImages = [UIImage]() 44 | for i in 1...3 { 45 | let string = String(format: "dropdown_anim__000%zd@2x", i) 46 | let image = UIImage.bundleImage(name: string)! 47 | refreshingImages.append(image) 48 | } 49 | set(images: refreshingImages, state: .pulling) 50 | /// 设置正在刷新状态的动画图片 51 | set(images: refreshingImages, state: .refreshing) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshConst.swift: -------------------------------------------------------------------------------- 1 | // ZHRefreshConst.swift 2 | // Refresh 3 | // 4 | // Created by SummerHF on 28/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | import UIKit 29 | 30 | /// 字体大小 31 | let ZHRefreshLableFont = UIFont.boldSystemFont(ofSize: 14) 32 | /// 文字颜色 33 | let ZHRefreshLableTextColor = UIColor(red: 90/255.0, green: 90/255.0, blue: 90/255.0, alpha: 1.0) 34 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshRunTime.h: -------------------------------------------------------------------------------- 1 | // ZHRefreshRunTime.h 2 | // Refresh 3 | // 4 | // Created by SummerHF on 27/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import 29 | 30 | @interface ZHRefreshRuntime : NSObject 31 | 32 | /** objc_msgSend不能使用纯OC实现 这里借助OC来完成 */ 33 | + (BOOL)target:(id)target canPerformSelector:(SEL)selctor; 34 | /** 发送消息 */ 35 | + (void)target:(id)target performSelector:(SEL)selctor view:(UIView *)view; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ZHRefresh/Classes/ZHRefreshRunTime.m: -------------------------------------------------------------------------------- 1 | // ZHRefreshRunTime.m 2 | // Refresh 3 | // 4 | // Created by SummerHF on 27/04/2018. 5 | // 6 | // 7 | // Copyright (c) 2018 SummerHF(https://github.com/summerhf) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | // 27 | 28 | #import "ZHRefreshRunTime.h" 29 | #import 30 | 31 | // 运行时objc_msgSend 32 | #define ZHRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) 33 | #define ZHRefreshMsgTarget(target) (__bridge void *)(target) 34 | 35 | @implementation ZHRefreshRuntime 36 | 37 | + (BOOL)target:(id)target canPerformSelector:(SEL)selctor { 38 | return [target respondsToSelector:selctor]; 39 | } 40 | 41 | + (void)target:(id)target performSelector:(SEL)selctor view:(UIView *)view { 42 | ZHRefreshMsgSend(ZHRefreshMsgTarget(target), selctor, view); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------