├── .swift-version ├── _Pods.xcodeproj ├── _Pods 2.xcodeproj ├── demo.gif ├── OCExample ├── OCExample │ ├── test.png │ ├── OCExample-Bridging-Header.h │ ├── LTAdvanced │ │ ├── LTHeaderView.h │ │ ├── LTAdvancedManagerDemo.h │ │ ├── LTAdvancedTestViewController.h │ │ └── LTHeaderView.m │ ├── ViewController.h │ ├── LTSimple │ │ ├── LTSimpleTestOneVC.h │ │ ├── LTSimpleManagerDemo.h │ │ └── LTSimpleTestOneVC.m │ ├── LTPersonalMainPage │ │ └── Controller │ │ │ ├── LTPersonMainPageDemo.h │ │ │ └── LTPersonalMainPageTestVC.h │ ├── LTPageView │ │ └── Controller │ │ │ ├── LTCustomTitleItemView.h │ │ │ ├── LTPageViewDemo.h │ │ │ ├── LTPageViewTestOneVC.h │ │ │ ├── LTPageViewMoreDemo.h │ │ │ └── LTCustomTitleItemView.m │ ├── AppDelegate.h │ ├── View │ │ ├── TestTableViewCell.h │ │ └── TestTableViewCell.m │ ├── main.m │ ├── LTFollowMoveView │ │ ├── LTFollowMoveDemo.h │ │ ├── LTFollowMoveTestView.h │ │ ├── LTFollowMoveDemo.m │ │ └── LTFollowMoveTestView.m │ ├── LTMixPageView │ │ ├── LTMixPageViewDemo.h │ │ ├── LTMixPageSimpleDemo.h │ │ ├── LTMixPageSimpleChildViewController.h │ │ └── LTMixPageSimpleChildViewController.m │ ├── LTLivePlayLoopsDemo │ │ └── LTLivePlayLoopsListDemo.h │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ └── AppDelegate.m ├── Pods │ ├── MJRefresh │ │ ├── MJRefresh │ │ │ ├── MJRefresh.bundle │ │ │ │ ├── arrow@2x.png │ │ │ │ ├── en.lproj │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── zh-Hans.lproj │ │ │ │ │ └── Localizable.strings │ │ │ │ └── zh-Hant.lproj │ │ │ │ │ └── Localizable.strings │ │ │ ├── Base │ │ │ │ ├── MJRefreshBackFooter.h │ │ │ │ ├── MJRefreshAutoFooter.h │ │ │ │ ├── MJRefreshHeader.h │ │ │ │ ├── MJRefreshFooter.h │ │ │ │ └── MJRefreshFooter.m │ │ │ ├── Custom │ │ │ │ ├── Footer │ │ │ │ │ ├── Auto │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.h │ │ │ │ │ │ ├── MJRefreshAutoGifFooter.h │ │ │ │ │ │ ├── MJRefreshAutoStateFooter.h │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.m │ │ │ │ │ │ └── MJRefreshAutoStateFooter.m │ │ │ │ │ └── Back │ │ │ │ │ │ ├── MJRefreshBackNormalFooter.h │ │ │ │ │ │ ├── MJRefreshBackGifFooter.h │ │ │ │ │ │ ├── MJRefreshBackStateFooter.h │ │ │ │ │ │ └── MJRefreshBackStateFooter.m │ │ │ │ └── Header │ │ │ │ │ ├── MJRefreshNormalHeader.h │ │ │ │ │ ├── MJRefreshGifHeader.h │ │ │ │ │ └── MJRefreshStateHeader.h │ │ │ ├── NSBundle+MJRefresh.h │ │ │ ├── MJRefresh.h │ │ │ ├── UIView+MJExtension.h │ │ │ ├── UIScrollView+MJExtension.h │ │ │ ├── UIScrollView+MJRefresh.h │ │ │ ├── UIView+MJExtension.m │ │ │ ├── MJRefreshConst.m │ │ │ ├── NSBundle+MJRefresh.m │ │ │ └── MJRefreshConst.h │ │ └── LICENSE │ ├── Target Support Files │ │ ├── MJRefresh │ │ │ ├── MJRefresh.modulemap │ │ │ ├── MJRefresh-dummy.m │ │ │ ├── MJRefresh-prefix.pch │ │ │ ├── MJRefresh.xcconfig │ │ │ ├── MJRefresh.debug.xcconfig │ │ │ ├── MJRefresh.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── MJRefresh-Info.plist │ │ │ └── MJRefresh-umbrella.h │ │ ├── LTScrollView │ │ │ ├── LTScrollView.modulemap │ │ │ ├── LTScrollView-dummy.m │ │ │ ├── LTScrollView-prefix.pch │ │ │ ├── LTScrollView-umbrella.h │ │ │ ├── LTScrollView.debug.xcconfig │ │ │ ├── LTScrollView.release.xcconfig │ │ │ └── LTScrollView-Info.plist │ │ └── Pods-OCExample │ │ │ ├── Pods-OCExample.modulemap │ │ │ ├── Pods-OCExample-dummy.m │ │ │ ├── Pods-OCExample-umbrella.h │ │ │ ├── Info.plist │ │ │ ├── Pods-OCExample-Info.plist │ │ │ ├── Pods-OCExample.debug.xcconfig │ │ │ ├── Pods-OCExample.release.xcconfig │ │ │ └── Pods-OCExample-acknowledgements.markdown │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── LTScrollView.podspec.json │ └── Pods.xcodeproj │ │ └── xcshareddata │ │ └── xcschemes │ │ ├── MJRefresh.xcscheme │ │ ├── LTScrollView.xcscheme │ │ └── Pods-OCExample.xcscheme ├── OCExample.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── OCExample.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Podfile └── Podfile.lock ├── Example ├── LTScrollView │ ├── test.png │ ├── Demo │ │ ├── LTCustomTitleView │ │ │ └── LTCustomTitleView.swift │ │ ├── LTAdvanced │ │ │ └── Controller │ │ │ │ ├── LTHeaderView.swift │ │ │ │ └── LTAdvancedTestOneVC.swift │ │ ├── LTMixPageView │ │ │ └── Controller │ │ │ │ ├── LTMixPageViewDemo.swift │ │ │ │ └── LTMixPageSimpleChildViewController.swift │ │ ├── LTFollowMoveView │ │ │ ├── LTFollowMoveDemo.swift │ │ │ └── LTFollowMoveTestView.swift │ │ ├── LTPageView │ │ │ └── Controller │ │ │ │ ├── LTPageViewDemo.swift │ │ │ │ └── LTPageViewTestOneVC.swift │ │ ├── LTPersonalMainPage │ │ │ └── Controller │ │ │ │ └── LTPersonalMainPageTestVC.swift │ │ ├── LTLivePlayLoopsDemo │ │ │ └── LTLivePlayLoopsListDemo.swift │ │ └── LTSimple │ │ │ └── Controller │ │ │ └── LTSimpleTestOneVC.swift │ ├── Lib │ │ └── Main │ │ │ ├── LTExtension │ │ │ ├── LTVCExtension.swift │ │ │ ├── LTDispatchQueue.swift │ │ │ ├── LTCollectionFlowLayout.swift │ │ │ ├── LTTableView.swift │ │ │ ├── LTTableViewProtocal.swift │ │ │ └── LTScrollExtension.swift │ │ │ ├── LTTitleView │ │ │ └── LTPageTitleItemType.swift │ │ │ └── LTPageView │ │ │ └── LTPageScrollView.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── Base.lproj │ │ └── Main.storyboard │ └── AppDelegate.swift ├── Pods │ ├── MJRefresh │ │ ├── MJRefresh │ │ │ ├── MJRefresh.bundle │ │ │ │ ├── arrow@2x.png │ │ │ │ ├── en.lproj │ │ │ │ │ └── Localizable.strings │ │ │ │ ├── zh-Hans.lproj │ │ │ │ │ └── Localizable.strings │ │ │ │ └── zh-Hant.lproj │ │ │ │ │ └── Localizable.strings │ │ │ ├── Base │ │ │ │ ├── MJRefreshBackFooter.h │ │ │ │ ├── MJRefreshAutoFooter.h │ │ │ │ ├── MJRefreshHeader.h │ │ │ │ ├── MJRefreshFooter.h │ │ │ │ └── MJRefreshFooter.m │ │ │ ├── Custom │ │ │ │ ├── Footer │ │ │ │ │ ├── Auto │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.h │ │ │ │ │ │ ├── MJRefreshAutoGifFooter.h │ │ │ │ │ │ ├── MJRefreshAutoStateFooter.h │ │ │ │ │ │ ├── MJRefreshAutoNormalFooter.m │ │ │ │ │ │ └── MJRefreshAutoStateFooter.m │ │ │ │ │ └── Back │ │ │ │ │ │ ├── MJRefreshBackNormalFooter.h │ │ │ │ │ │ ├── MJRefreshBackGifFooter.h │ │ │ │ │ │ ├── MJRefreshBackStateFooter.h │ │ │ │ │ │ └── MJRefreshBackStateFooter.m │ │ │ │ └── Header │ │ │ │ │ ├── MJRefreshNormalHeader.h │ │ │ │ │ ├── MJRefreshGifHeader.h │ │ │ │ │ └── MJRefreshStateHeader.h │ │ │ ├── NSBundle+MJRefresh.h │ │ │ ├── MJRefresh.h │ │ │ ├── UIView+MJExtension.h │ │ │ ├── UIScrollView+MJExtension.h │ │ │ ├── UIScrollView+MJRefresh.h │ │ │ ├── UIView+MJExtension.m │ │ │ ├── MJRefreshConst.m │ │ │ ├── NSBundle+MJRefresh.m │ │ │ └── MJRefreshConst.h │ │ └── LICENSE │ ├── Target Support Files │ │ ├── MJRefresh │ │ │ ├── MJRefresh.modulemap │ │ │ ├── MJRefresh-dummy.m │ │ │ ├── MJRefresh-prefix.pch │ │ │ ├── MJRefresh.xcconfig │ │ │ ├── Info.plist │ │ │ └── MJRefresh-umbrella.h │ │ ├── Pods-LTScrollView_Tests │ │ │ ├── Pods-LTScrollView_Tests-acknowledgements.markdown │ │ │ ├── Pods-LTScrollView_Tests.modulemap │ │ │ ├── Pods-LTScrollView_Tests-dummy.m │ │ │ ├── Pods-LTScrollView_Tests-umbrella.h │ │ │ ├── Pods-LTScrollView_Tests.debug.xcconfig │ │ │ ├── Pods-LTScrollView_Tests.release.xcconfig │ │ │ ├── Info.plist │ │ │ └── Pods-LTScrollView_Tests-acknowledgements.plist │ │ └── Pods-LTScrollView_Example │ │ │ ├── Pods-LTScrollView_Example.modulemap │ │ │ ├── Pods-LTScrollView_Example-dummy.m │ │ │ ├── Pods-LTScrollView_Example-umbrella.h │ │ │ ├── Pods-LTScrollView_Example.debug.xcconfig │ │ │ ├── Pods-LTScrollView_Example.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-LTScrollView_Example-acknowledgements.markdown │ │ │ └── Pods-LTScrollView_Example-acknowledgements.plist │ ├── Manifest.lock │ └── Local Podspecs │ │ └── LTScrollView.podspec.json ├── Podfile ├── LTScrollView.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Podfile.lock └── LTScrollView.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── .travis.yml ├── .gitignore ├── LTScrollView.podspec └── LICENSE /.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /_Pods 2.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/demo.gif -------------------------------------------------------------------------------- /OCExample/OCExample/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/OCExample/OCExample/test.png -------------------------------------------------------------------------------- /Example/LTScrollView/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/Example/LTScrollView/test.png -------------------------------------------------------------------------------- /OCExample/OCExample/OCExample-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 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/arrow@2x.png -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MJRefresh/MJRefresh.modulemap: -------------------------------------------------------------------------------- 1 | framework module MJRefresh { 2 | umbrella header "MJRefresh-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh.modulemap: -------------------------------------------------------------------------------- 1 | framework module MJRefresh { 2 | umbrella header "MJRefresh-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MJRefresh/MJRefresh-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MJRefresh : NSObject 3 | @end 4 | @implementation PodsDummy_MJRefresh 5 | @end 6 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MJRefresh : NSObject 3 | @end 4 | @implementation PodsDummy_MJRefresh 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView.modulemap: -------------------------------------------------------------------------------- 1 | framework module LTScrollView { 2 | umbrella header "LTScrollView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_LTScrollView : NSObject 3 | @end 4 | @implementation PodsDummy_LTScrollView 5 | @end 6 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_OCExample { 2 | umbrella header "Pods-OCExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glthello/LTScrollView/HEAD/OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hans.lproj/Localizable.strings -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_OCExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_OCExample 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'LTScrollView_Example' do 4 | # 个人项目中使用 5 | # pod 'LTScrollView' 6 | 7 | # 本Demo中使用, LTScrollView不依赖任何第三方框架 8 | pod 'MJRefresh', '~> 3.1.14.1' 9 | 10 | end 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_LTScrollView_Tests { 2 | umbrella header "Pods-LTScrollView_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /OCExample/OCExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/LTScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_LTScrollView_Example { 2 | umbrella header "Pods-LTScrollView_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_LTScrollView_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_LTScrollView_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_LTScrollView_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_LTScrollView_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTCustomTitleView/LTCustomTitleView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTCustomTitleView.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by 高刘通 on 2018/9/7. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTAdvanced/LTHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTHeaderView.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/19. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTHeaderView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MJRefresh (3.1.14.1) 3 | 4 | DEPENDENCIES: 5 | - MJRefresh (~> 3.1.14.1) 6 | 7 | SPEC CHECKSUMS: 8 | MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42 9 | 10 | PODFILE CHECKSUM: 82b708ab46a28bc85bc2e47cf4d3b34634a17f2e 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MJRefresh (3.1.14.1) 3 | 4 | DEPENDENCIES: 5 | - MJRefresh (~> 3.1.14.1) 6 | 7 | SPEC CHECKSUMS: 8 | MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42 9 | 10 | PODFILE CHECKSUM: 82b708ab46a28bc85bc2e47cf4d3b34634a17f2e 11 | 12 | COCOAPODS: 1.2.0 13 | -------------------------------------------------------------------------------- /OCExample/OCExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MJRefresh/MJRefresh-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 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTSimple/LTSimpleTestOneVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTSimpleTestOneVC.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTSimpleTestOneVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh-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 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTSimple/LTSimpleManagerDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTSimpleManagerDemo.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTSimpleManagerDemo : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView-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/LTScrollView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /OCExample/OCExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTAdvanced/LTAdvancedManagerDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTAdvancedManagerDemo.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/19. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTAdvancedManagerDemo : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/LTScrollView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OCExample/OCExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshBackFooter : MJRefreshFooter 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPersonalMainPage/Controller/LTPersonMainPageDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTPersonMainPageDemo.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/6/28. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTPersonMainPageDemo : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Base/MJRefreshBackFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshBackFooter : MJRefreshFooter 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPageView/Controller/LTCustomTitleItemView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTCustomTitleItemView.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/11. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | 9 | #import "LTScrollView-Swift.h" 10 | 11 | @interface LTCustomTitleItemView : UIButton 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPageView/Controller/LTPageViewDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageViewDemo.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/6/28. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTPageViewDemo : UIViewController 12 | 13 | @property(assign, nonatomic) BOOL isFromMix; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /OCExample/OCExample/View/TestTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestTableViewCell.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TestTableViewCell : UITableViewCell 12 | 13 | + (instancetype)cellWithTableView:(UITableView *)tableView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPageView/Controller/LTPageViewTestOneVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageViewTestOneVC.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/6/28. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTPageViewTestOneVC : UIViewController 12 | 13 | @property(assign, nonatomic) NSInteger totalCount; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTAdvanced/LTAdvancedTestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTAdvancedTestViewController.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/19. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTAdvancedTestViewController : UIViewController 12 | 13 | @property(assign, nonatomic) NSInteger totalCount; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPersonalMainPage/Controller/LTPersonalMainPageTestVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTPersonalMainPageTestVC.h 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/6/28. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LTPersonalMainPageTestVC : UIViewController 12 | 13 | @property(assign, nonatomic) NSInteger totalCount; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OCExample/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | 3 | target 'OCExample' do 4 | use_frameworks! 5 | 6 | #pod 'LTScrollView', '~> 0.4.2' 7 | 8 | pod 'LTScrollView', :path => '../' 9 | 10 | #pod 'LTScrollView/LTLoopsPlay', :path => '../' 11 | #pod 'LTScrollView/LTFollowMove', :path => '../' 12 | 13 | 14 | #本Demo中使用, LTScrollView不依赖任何第三方框架 15 | pod 'MJRefresh', '~> 3.1.14.1' 16 | 17 | end 18 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView-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 LTScrollViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char LTScrollViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample-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_OCExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_OCExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter 12 | /** 菊花的样式 */ 13 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 14 | @end 15 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter : MJRefreshAutoStateFooter 12 | /** 菊花的样式 */ 13 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 14 | @end 15 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_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_LTScrollView_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_LTScrollView_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_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_LTScrollView_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_LTScrollView_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+MJRefresh.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 16/6/13. 6 | // Copyright © 2016年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (MJRefresh) 12 | + (instancetype)mj_refreshBundle; 13 | + (UIImage *)mj_arrowImage; 14 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value; 15 | + (NSString *)mj_localizedStringForKey:(NSString *)key; 16 | @end 17 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+MJRefresh.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 16/6/13. 6 | // Copyright © 2016年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSBundle (MJRefresh) 12 | + (instancetype)mj_refreshBundle; 13 | + (UIImage *)mj_arrowImage; 14 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value; 15 | + (NSString *)mj_localizedStringForKey:(NSString *)key; 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshNormalHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshNormalHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshNormalHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshNormalHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshNormalHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPageView/Controller/LTPageViewMoreDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageViewMoreDemo.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2021/11/20. 6 | // Copyright © 2021 LT. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSUInteger, EStyle) { 12 | EStyleDefault, 13 | EStyleSetSyle, 14 | EStyleSetSyleOther, 15 | EStyleCustomStyle 16 | }; 17 | 18 | @interface LTPageViewMoreDemo : UIViewController 19 | 20 | - (instancetype)initWithStyle:(EStyle)style; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackNormalFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackNormalFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *arrowView; 13 | /** 菊花的样式 */ 14 | @property (assign, nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MJRefresh 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | PODS_BUILD_DIR = $BUILD_DIR 5 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh/MJRefresh.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh/MJRefresh.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/LTScrollView.xcworkspace -scheme LTScrollView-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | 4 | #import "UIScrollView+MJRefresh.h" 5 | #import "UIScrollView+MJExtension.h" 6 | #import "UIView+MJExtension.h" 7 | 8 | #import "MJRefreshNormalHeader.h" 9 | #import "MJRefreshGifHeader.h" 10 | 11 | #import "MJRefreshBackNormalFooter.h" 12 | #import "MJRefreshBackGifFooter.h" 13 | #import "MJRefreshAutoNormalFooter.h" 14 | #import "MJRefreshAutoGifFooter.h" -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | 4 | #import "UIScrollView+MJRefresh.h" 5 | #import "UIScrollView+MJExtension.h" 6 | #import "UIView+MJExtension.h" 7 | 8 | #import "MJRefreshNormalHeader.h" 9 | #import "MJRefreshGifHeader.h" 10 | 11 | #import "MJRefreshBackNormalFooter.h" 12 | #import "MJRefreshBackGifFooter.h" 13 | #import "MJRefreshAutoNormalFooter.h" 14 | #import "MJRefreshAutoGifFooter.h" -------------------------------------------------------------------------------- /OCExample/OCExample/LTFollowMoveView/LTFollowMoveDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveDemo.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface LTFollowMoveDemo : UIViewController 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTMixPageView/LTMixPageViewDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageViewDemo.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface LTMixPageViewDemo : UIViewController 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTMixPageView/LTMixPageSimpleDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageSimpleDemo.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface LTMixPageSimpleDemo : UIViewController 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshGifHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshGifHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTFollowMoveView/LTFollowMoveTestView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveTestView.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | #define kReturnHeight UIScreen.mainScreen.bounds.size.height * 0.618 20 | 21 | @interface LTFollowMoveTestView : UIView 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshGifHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshGifHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshStateHeader.h" 10 | 11 | @interface MJRefreshGifHeader : MJRefreshStateHeader 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh/MJRefresh.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "MJRefresh" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTLivePlayLoopsDemo/LTLivePlayLoopsListDemo.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTLivePlayLoopsListDemo.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface LTLivePlayLoopsListDemo : UIViewController 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/MJRefresh/MJRefresh.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "MJRefresh" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoGifFooter : MJRefreshAutoStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackGifFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackGifFooter : MJRefreshBackStateFooter 12 | @property (weak, nonatomic, readonly) UIImageView *gifView; 13 | 14 | /** 设置state状态下的动画图片images 动画持续时间duration*/ 15 | - (void)setImages:(NSArray *)images duration:(NSTimeInterval)duration forState:(MJRefreshState)state; 16 | - (void)setImages:(NSArray *)images forState:(MJRefreshState)state; 17 | @end 18 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTMixPageView/LTMixPageSimpleChildViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageSimpleChildViewController.h 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface LTMixPageSimpleChildViewController : UIViewController 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/LTScrollView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LTScrollView", 3 | "version": "0.1.1", 4 | "summary": "LTScrollView", 5 | "description": "TODO: Add long description of the pod here.A short description of LTScrollView.", 6 | "homepage": "https://github.com/gltwy/LTScrollView", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "1282990794@qq.com": "1282990794@qq.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/gltwy/LTScrollView.git", 16 | "tag": "0.1.1" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "LTScrollView/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh 8 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MJRefresh 8 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter : MJRefreshBackFooter 12 | /** 文字距离圈圈、箭头的距离 */ 13 | @property (assign, nonatomic) CGFloat labelLeftInset; 14 | /** 显示刷新状态的label */ 15 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 16 | /** 设置state状态下的文字 */ 17 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 18 | 19 | /** 获取state状态下的title */ 20 | - (NSString *)titleForState:(MJRefreshState)state; 21 | @end 22 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter : MJRefreshBackFooter 12 | /** 文字距离圈圈、箭头的距离 */ 13 | @property (assign, nonatomic) CGFloat labelLeftInset; 14 | /** 显示刷新状态的label */ 15 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 16 | /** 设置state状态下的文字 */ 17 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 18 | 19 | /** 获取state状态下的title */ 20 | - (NSString *)titleForState:(MJRefreshState)state; 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "MJRefreshHeaderIdleText" = "下拉可以刷新"; 2 | "MJRefreshHeaderPullingText" = "鬆開立即刷新"; 3 | "MJRefreshHeaderRefreshingText" = "正在刷新數據中..."; 4 | 5 | "MJRefreshAutoFooterIdleText" = "點擊或上拉加載更多"; 6 | "MJRefreshAutoFooterRefreshingText" = "正在加載更多的數據..."; 7 | "MJRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢"; 8 | 9 | "MJRefreshBackFooterIdleText" = "上拉可以加載更多"; 10 | "MJRefreshBackFooterPullingText" = "鬆開立即加載更多"; 11 | "MJRefreshBackFooterRefreshingText" = "正在加載更多的數據..."; 12 | "MJRefreshBackFooterNoMoreDataText" = "已經全部加載完畢"; 13 | 14 | "MJRefreshHeaderLastTimeText" = "最後更新:"; 15 | "MJRefreshHeaderDateTodayText" = "今天"; 16 | "MJRefreshHeaderNoneLastDateText" = "無記錄"; 17 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefresh.bundle/zh-Hant.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "MJRefreshHeaderIdleText" = "下拉可以刷新"; 2 | "MJRefreshHeaderPullingText" = "鬆開立即刷新"; 3 | "MJRefreshHeaderRefreshingText" = "正在刷新數據中..."; 4 | 5 | "MJRefreshAutoFooterIdleText" = "點擊或上拉加載更多"; 6 | "MJRefreshAutoFooterRefreshingText" = "正在加載更多的數據..."; 7 | "MJRefreshAutoFooterNoMoreDataText" = "已經全部加載完畢"; 8 | 9 | "MJRefreshBackFooterIdleText" = "上拉可以加載更多"; 10 | "MJRefreshBackFooterPullingText" = "鬆開立即加載更多"; 11 | "MJRefreshBackFooterRefreshingText" = "正在加載更多的數據..."; 12 | "MJRefreshBackFooterNoMoreDataText" = "已經全部加載完畢"; 13 | 14 | "MJRefreshHeaderLastTimeText" = "最後更新:"; 15 | "MJRefreshHeaderDateTodayText" = "今天"; 16 | "MJRefreshHeaderNoneLastDateText" = "無記錄"; 17 | -------------------------------------------------------------------------------- /OCExample/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - LTScrollView (0.4.3): 3 | - LTScrollView/LTFollowMove (= 0.4.3) 4 | - LTScrollView/LTLoopsPlay (= 0.4.3) 5 | - LTScrollView/LTFollowMove (0.4.3) 6 | - LTScrollView/LTLoopsPlay (0.4.3) 7 | - MJRefresh (3.1.14.1) 8 | 9 | DEPENDENCIES: 10 | - LTScrollView (from `../`) 11 | - MJRefresh (~> 3.1.14.1) 12 | 13 | SPEC REPOS: 14 | https://github.com/CocoaPods/Specs.git: 15 | - MJRefresh 16 | 17 | EXTERNAL SOURCES: 18 | LTScrollView: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | LTScrollView: 5d3de4bfe7b5bf591486fa2529d863ccf4cde973 23 | MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42 24 | 25 | PODFILE CHECKSUM: c3444a95e8c2d3a4bb00720b12f23ba1d220f97e 26 | 27 | COCOAPODS: 1.11.2 28 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoFooter.h" 10 | 11 | @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter 12 | /** 文字距离圈圈、箭头的距离 */ 13 | @property (assign, nonatomic) CGFloat labelLeftInset; 14 | /** 显示刷新状态的label */ 15 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 16 | 17 | /** 设置state状态下的文字 */ 18 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 19 | 20 | /** 隐藏刷新状态的文字 */ 21 | @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden; 22 | @end 23 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoStateFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoFooter.h" 10 | 11 | @interface MJRefreshAutoStateFooter : MJRefreshAutoFooter 12 | /** 文字距离圈圈、箭头的距离 */ 13 | @property (assign, nonatomic) CGFloat labelLeftInset; 14 | /** 显示刷新状态的label */ 15 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 16 | 17 | /** 设置state状态下的文字 */ 18 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 19 | 20 | /** 隐藏刷新状态的文字 */ 21 | @property (assign, nonatomic, getter=isRefreshingTitleHidden) BOOL refreshingTitleHidden; 22 | @end 23 | -------------------------------------------------------------------------------- /OCExample/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - LTScrollView (0.4.3): 3 | - LTScrollView/LTFollowMove (= 0.4.3) 4 | - LTScrollView/LTLoopsPlay (= 0.4.3) 5 | - LTScrollView/LTFollowMove (0.4.3) 6 | - LTScrollView/LTLoopsPlay (0.4.3) 7 | - MJRefresh (3.1.14.1) 8 | 9 | DEPENDENCIES: 10 | - LTScrollView (from `../`) 11 | - MJRefresh (~> 3.1.14.1) 12 | 13 | SPEC REPOS: 14 | https://github.com/CocoaPods/Specs.git: 15 | - MJRefresh 16 | 17 | EXTERNAL SOURCES: 18 | LTScrollView: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | LTScrollView: 5d3de4bfe7b5bf591486fa2529d863ccf4cde973 23 | MJRefresh: 238e6a37e2dba12160ee3b79f6d2a2b26abcab42 24 | 25 | PODFILE CHECKSUM: c3444a95e8c2d3a4bb00720b12f23ba1d220f97e 26 | 27 | COCOAPODS: 1.11.2 28 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshAutoFooter : MJRefreshFooter 12 | /** 是否自动刷新(默认为YES) */ 13 | @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh; 14 | 15 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 16 | @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性"); 17 | 18 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 19 | @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent; 20 | @end 21 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Base/MJRefreshAutoFooter.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoFooter.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshFooter.h" 10 | 11 | @interface MJRefreshAutoFooter : MJRefreshFooter 12 | /** 是否自动刷新(默认为YES) */ 13 | @property (assign, nonatomic, getter=isAutomaticallyRefresh) BOOL automaticallyRefresh; 14 | 15 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 16 | @property (assign, nonatomic) CGFloat appearencePercentTriggerAutoRefresh MJRefreshDeprecated("请使用triggerAutomaticallyRefreshPercent属性"); 17 | 18 | /** 当底部控件出现多少时就自动刷新(默认为1.0,也就是底部控件完全出现时,才会自动刷新) */ 19 | @property (assign, nonatomic) CGFloat triggerAutomaticallyRefreshPercent; 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/UIView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIView (MJExtension) 13 | @property (assign, nonatomic) CGFloat mj_x; 14 | @property (assign, nonatomic) CGFloat mj_y; 15 | @property (assign, nonatomic) CGFloat mj_w; 16 | @property (assign, nonatomic) CGFloat mj_h; 17 | @property (assign, nonatomic) CGSize mj_size; 18 | @property (assign, nonatomic) CGPoint mj_origin; 19 | @end 20 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/UIView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIView (MJExtension) 13 | @property (assign, nonatomic) CGFloat mj_x; 14 | @property (assign, nonatomic) CGFloat mj_y; 15 | @property (assign, nonatomic) CGFloat mj_w; 16 | @property (assign, nonatomic) CGFloat mj_h; 17 | @property (assign, nonatomic) CGSize mj_size; 18 | @property (assign, nonatomic) CGPoint mj_origin; 19 | @end 20 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 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 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 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 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshStateHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshHeader.h" 10 | 11 | @interface MJRefreshStateHeader : MJRefreshHeader 12 | #pragma mark - 刷新时间相关 13 | /** 利用这个block来决定显示的更新时间文字 */ 14 | @property (copy, nonatomic) NSString *(^lastUpdatedTimeText)(NSDate *lastUpdatedTime); 15 | /** 显示上一次刷新时间的label */ 16 | @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel; 17 | 18 | #pragma mark - 状态相关 19 | /** 文字距离圈圈、箭头的距离 */ 20 | @property (assign, nonatomic) CGFloat labelLeftInset; 21 | /** 显示刷新状态的label */ 22 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 23 | /** 设置state状态下的文字 */ 24 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 25 | @end 26 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Header/MJRefreshStateHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshStateHeader.h 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshHeader.h" 10 | 11 | @interface MJRefreshStateHeader : MJRefreshHeader 12 | #pragma mark - 刷新时间相关 13 | /** 利用这个block来决定显示的更新时间文字 */ 14 | @property (copy, nonatomic) NSString *(^lastUpdatedTimeText)(NSDate *lastUpdatedTime); 15 | /** 显示上一次刷新时间的label */ 16 | @property (weak, nonatomic, readonly) UILabel *lastUpdatedTimeLabel; 17 | 18 | #pragma mark - 状态相关 19 | /** 文字距离圈圈、箭头的距离 */ 20 | @property (assign, nonatomic) CGFloat labelLeftInset; 21 | /** 显示刷新状态的label */ 22 | @property (weak, nonatomic, readonly) UILabel *stateLabel; 23 | /** 设置state状态下的文字 */ 24 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state; 25 | @end 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MJRefresh/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 | 3.1.14 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/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 | 3.1.14 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/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/LTScrollView/Lib/Main/LTExtension/LTVCExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTVCExtension.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIViewController { 13 | 14 | private struct LTVCKey { 15 | static var sKey = "glt_scrollViewKey" 16 | static var oKey = "glt_upOffsetKey" 17 | } 18 | 19 | @objc public var glt_scrollView: UIScrollView? { 20 | get { return objc_getAssociatedObject(self, <VCKey.sKey) as? UIScrollView } 21 | set { objc_setAssociatedObject(self, <VCKey.sKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } 22 | } 23 | 24 | public var glt_upOffset: String? { 25 | get { return objc_getAssociatedObject(self, <VCKey.oKey) as? String } 26 | set { objc_setAssociatedObject(self, <VCKey.oKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) } 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_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 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh-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 | 3.1.14 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_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 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/LTScrollView/LTScrollView-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.4.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample-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/MJRefresh/MJRefresh/UIScrollView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIScrollView (MJExtension) 13 | @property (readonly, nonatomic) UIEdgeInsets mj_inset; 14 | 15 | @property (assign, nonatomic) CGFloat mj_insetT; 16 | @property (assign, nonatomic) CGFloat mj_insetB; 17 | @property (assign, nonatomic) CGFloat mj_insetL; 18 | @property (assign, nonatomic) CGFloat mj_insetR; 19 | 20 | @property (assign, nonatomic) CGFloat mj_offsetX; 21 | @property (assign, nonatomic) CGFloat mj_offsetY; 22 | 23 | @property (assign, nonatomic) CGFloat mj_contentW; 24 | @property (assign, nonatomic) CGFloat mj_contentH; 25 | @end 26 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/UIScrollView+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+Extension.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import 11 | 12 | @interface UIScrollView (MJExtension) 13 | @property (readonly, nonatomic) UIEdgeInsets mj_inset; 14 | 15 | @property (assign, nonatomic) CGFloat mj_insetT; 16 | @property (assign, nonatomic) CGFloat mj_insetB; 17 | @property (assign, nonatomic) CGFloat mj_insetL; 18 | @property (assign, nonatomic) CGFloat mj_insetR; 19 | 20 | @property (assign, nonatomic) CGFloat mj_offsetX; 21 | @property (assign, nonatomic) CGFloat mj_offsetY; 22 | 23 | @property (assign, nonatomic) CGFloat mj_contentW; 24 | @property (assign, nonatomic) CGFloat mj_contentH; 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Tests/Pods-LTScrollView_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshHeader.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 下拉刷新控件:负责监控用户下拉的状态 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshHeader : MJRefreshComponent 13 | /** 创建header */ 14 | + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建header */ 16 | + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 这个key用来存储上一次下拉刷新成功的时间 */ 19 | @property (copy, nonatomic) NSString *lastUpdatedTimeKey; 20 | /** 上一次下拉刷新成功的时间 */ 21 | @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime; 22 | 23 | /** 忽略多少scrollView的contentInset的top */ 24 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop; 25 | @end 26 | -------------------------------------------------------------------------------- /LTScrollView.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = 'LTScrollView' 4 | s.version = '0.4.5' 5 | s.summary = 'LTScrollView' 6 | 7 | s.description = <<-DESC 8 | TODO: ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC / Swift,实现原理:http://blog.csdn.net/glt_code/article/details/78576628 9 | DESC 10 | 11 | s.homepage = 'https://github.com/gltwy/LTScrollView' 12 | s.license = { :type => 'MIT', :file => 'LICENSE' } 13 | s.author = { '1282990794@qq.com' => '1282990794@qq.com' } 14 | s.source = { :git => 'https://github.com/gltwy/LTScrollView.git', :tag => s.version.to_s } 15 | 16 | s.ios.deployment_target = '11.0' 17 | s.swift_version = '5.0' 18 | 19 | s.subspec 'LTLoopsPlay' do |p| 20 | p.source_files = 'Example/LTScrollView/Lib/LTLoopsPlay/*.{swift}' 21 | end 22 | 23 | s.subspec 'LTFollowMove' do |f| 24 | f.source_files = 'Example/LTScrollView/Lib/LTFollowMove/*.{swift}' 25 | end 26 | 27 | s.source_files = 'Example/LTScrollView/Lib/**/*.{swift}' 28 | end 29 | -------------------------------------------------------------------------------- /OCExample/Pods/Local Podspecs/LTScrollView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LTScrollView", 3 | "version": "0.4.3", 4 | "summary": "LTScrollView", 5 | "description": "TODO: ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC / Swift,实现原理:http://blog.csdn.net/glt_code/article/details/78576628", 6 | "homepage": "https://github.com/gltwy/LTScrollView", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "1282990794@qq.com": "1282990794@qq.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/gltwy/LTScrollView.git", 16 | "tag": "0.4.3" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "swift_versions": "5.0", 22 | "source_files": "Example/LTScrollView/Lib/**/*.{swift}", 23 | "subspecs": [ 24 | { 25 | "name": "LTLoopsPlay", 26 | "source_files": "Example/LTScrollView/Lib/LTLoopsPlay/*.{swift}" 27 | }, 28 | { 29 | "name": "LTFollowMove", 30 | "source_files": "Example/LTScrollView/Lib/LTFollowMove/*.{swift}" 31 | } 32 | ], 33 | "swift_version": "5.0" 34 | } 35 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Base/MJRefreshHeader.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshHeader.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 下拉刷新控件:负责监控用户下拉的状态 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshHeader : MJRefreshComponent 13 | /** 创建header */ 14 | + (instancetype)headerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建header */ 16 | + (instancetype)headerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 这个key用来存储上一次下拉刷新成功的时间 */ 19 | @property (copy, nonatomic) NSString *lastUpdatedTimeKey; 20 | /** 上一次下拉刷新成功的时间 */ 21 | @property (strong, nonatomic, readonly) NSDate *lastUpdatedTime; 22 | 23 | /** 忽略多少scrollView的contentInset的top */ 24 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetTop; 25 | @end 26 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTExtension/LTDispatchQueue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTDispatchQueue.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension DispatchQueue { 12 | private static var _onceTracker = [String]() 13 | public class func once(token: String, block: () -> ()) { 14 | objc_sync_enter(self) 15 | defer { 16 | objc_sync_exit(self) 17 | } 18 | if _onceTracker.contains(token) { 19 | return 20 | } 21 | _onceTracker.append(token) 22 | block() 23 | } 24 | 25 | func async(block: @escaping ()->()) { 26 | self.async(execute: block) 27 | } 28 | 29 | func after(time: DispatchTime, block: @escaping ()->()) { 30 | self.asyncAfter(deadline: time, execute: block) 31 | } 32 | } 33 | 34 | extension DispatchQueue { 35 | func after(_ delay: TimeInterval, execute: @escaping () -> Void) { 36 | asyncAfter(deadline: .now() + delay, execute: execute) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+MJRefresh.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 给ScrollView增加下拉刷新、上拉刷新的功能 9 | 10 | #import 11 | #import "MJRefreshConst.h" 12 | 13 | @class MJRefreshHeader, MJRefreshFooter; 14 | 15 | @interface UIScrollView (MJRefresh) 16 | /** 下拉刷新控件 */ 17 | @property (strong, nonatomic) MJRefreshHeader *mj_header; 18 | @property (strong, nonatomic) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header"); 19 | /** 上拉刷新控件 */ 20 | @property (strong, nonatomic) MJRefreshFooter *mj_footer; 21 | @property (strong, nonatomic) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer"); 22 | 23 | #pragma mark - other 24 | - (NSInteger)mj_totalDataCount; 25 | @property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount); 26 | @end 27 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/UIScrollView+MJRefresh.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIScrollView+MJRefresh.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/4. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 给ScrollView增加下拉刷新、上拉刷新的功能 9 | 10 | #import 11 | #import "MJRefreshConst.h" 12 | 13 | @class MJRefreshHeader, MJRefreshFooter; 14 | 15 | @interface UIScrollView (MJRefresh) 16 | /** 下拉刷新控件 */ 17 | @property (strong, nonatomic) MJRefreshHeader *mj_header; 18 | @property (strong, nonatomic) MJRefreshHeader *header MJRefreshDeprecated("使用mj_header"); 19 | /** 上拉刷新控件 */ 20 | @property (strong, nonatomic) MJRefreshFooter *mj_footer; 21 | @property (strong, nonatomic) MJRefreshFooter *footer MJRefreshDeprecated("使用mj_footer"); 22 | 23 | #pragma mark - other 24 | - (NSInteger)mj_totalDataCount; 25 | @property (copy, nonatomic) void (^mj_reloadDataBlock)(NSInteger totalDataCount); 26 | @end 27 | -------------------------------------------------------------------------------- /Example/LTScrollView/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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 1282990794@qq.com <1282990794@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/Target Support Files/MJRefresh/MJRefresh-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 "MJRefreshAutoFooter.h" 14 | #import "MJRefreshBackFooter.h" 15 | #import "MJRefreshComponent.h" 16 | #import "MJRefreshFooter.h" 17 | #import "MJRefreshHeader.h" 18 | #import "MJRefreshAutoGifFooter.h" 19 | #import "MJRefreshAutoNormalFooter.h" 20 | #import "MJRefreshAutoStateFooter.h" 21 | #import "MJRefreshBackGifFooter.h" 22 | #import "MJRefreshBackNormalFooter.h" 23 | #import "MJRefreshBackStateFooter.h" 24 | #import "MJRefreshGifHeader.h" 25 | #import "MJRefreshNormalHeader.h" 26 | #import "MJRefreshStateHeader.h" 27 | #import "MJRefresh.h" 28 | #import "MJRefreshConst.h" 29 | #import "NSBundle+MJRefresh.h" 30 | #import "UIScrollView+MJExtension.h" 31 | #import "UIScrollView+MJRefresh.h" 32 | #import "UIView+MJExtension.h" 33 | 34 | FOUNDATION_EXPORT double MJRefreshVersionNumber; 35 | FOUNDATION_EXPORT const unsigned char MJRefreshVersionString[]; 36 | 37 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/MJRefresh/MJRefresh-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 "MJRefreshAutoFooter.h" 14 | #import "MJRefreshBackFooter.h" 15 | #import "MJRefreshComponent.h" 16 | #import "MJRefreshFooter.h" 17 | #import "MJRefreshHeader.h" 18 | #import "MJRefreshAutoGifFooter.h" 19 | #import "MJRefreshAutoNormalFooter.h" 20 | #import "MJRefreshAutoStateFooter.h" 21 | #import "MJRefreshBackGifFooter.h" 22 | #import "MJRefreshBackNormalFooter.h" 23 | #import "MJRefreshBackStateFooter.h" 24 | #import "MJRefreshGifHeader.h" 25 | #import "MJRefreshNormalHeader.h" 26 | #import "MJRefreshStateHeader.h" 27 | #import "MJRefresh.h" 28 | #import "MJRefreshConst.h" 29 | #import "NSBundle+MJRefresh.h" 30 | #import "UIScrollView+MJExtension.h" 31 | #import "UIScrollView+MJRefresh.h" 32 | #import "UIView+MJExtension.h" 33 | 34 | FOUNDATION_EXPORT double MJRefreshVersionNumber; 35 | FOUNDATION_EXPORT const unsigned char MJRefreshVersionString[]; 36 | 37 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 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 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 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/MJRefresh/MJRefresh/Base/MJRefreshFooter.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 上拉刷新控件 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshFooter : MJRefreshComponent 13 | /** 创建footer */ 14 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建footer */ 16 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 提示没有更多的数据 */ 19 | - (void)endRefreshingWithNoMoreData; 20 | - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData"); 21 | 22 | /** 重置没有更多的数据(消除没有更多数据的状态) */ 23 | - (void)resetNoMoreData; 24 | 25 | /** 忽略多少scrollView的contentInset的bottom */ 26 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom; 27 | 28 | /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */ 29 | @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden; 30 | @end 31 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.h 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 上拉刷新控件 9 | 10 | #import "MJRefreshComponent.h" 11 | 12 | @interface MJRefreshFooter : MJRefreshComponent 13 | /** 创建footer */ 14 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock; 15 | /** 创建footer */ 16 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action; 17 | 18 | /** 提示没有更多的数据 */ 19 | - (void)endRefreshingWithNoMoreData; 20 | - (void)noticeNoMoreData MJRefreshDeprecated("使用endRefreshingWithNoMoreData"); 21 | 22 | /** 重置没有更多的数据(消除没有更多数据的状态) */ 23 | - (void)resetNoMoreData; 24 | 25 | /** 忽略多少scrollView的contentInset的bottom */ 26 | @property (assign, nonatomic) CGFloat ignoredScrollViewContentInsetBottom; 27 | 28 | /** 自动根据有无数据来显示和隐藏(有数据就显示,没有数据隐藏。默认是NO) */ 29 | @property (assign, nonatomic, getter=isAutomaticallyHidden) BOOL automaticallyHidden; 30 | @end 31 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView/LTScrollView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "LTScrollView" -framework "MJRefresh" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/LTScrollView/LTScrollView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "LTScrollView" -framework "MJRefresh" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Example/LTScrollView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | LTScrollView 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /OCExample/OCExample/View/TestTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestTableViewCell.m 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "TestTableViewCell.h" 18 | 19 | @implementation TestTableViewCell 20 | 21 | + (instancetype)cellWithTableView:(UITableView *)tableView { 22 | TestTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([self class])]; 23 | if (cell == nil) { 24 | cell = [[TestTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([self class])]; 25 | } 26 | return cell; 27 | } 28 | 29 | -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 30 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 31 | } 32 | return self; 33 | } 34 | 35 | - (void)awakeFromNib { 36 | [super awakeFromNib]; 37 | // Initialization code 38 | } 39 | 40 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 41 | [super setSelected:selected animated:animated]; 42 | 43 | // Configure the view for the selected state 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## MJRefresh 5 | 6 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTTitleView/LTPageTitleItemType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageTitleItemView.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by 高刘通 on 2020/8/22. 6 | // Copyright © 2020 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | fileprivate enum LTAssociatedKeys { 12 | static var glt_isSelected = "glt_isSelected" 13 | } 14 | 15 | @objc public protocol LTPageTitleItemType where Self: UIButton { 16 | 17 | /// 当前选中、取消选中的索引 18 | @objc var glt_index: Int { get set } 19 | 20 | /// 可选实现 - 首次设置frame以后,frame的值, 此方法仅会调用一次 21 | /// layoutSubviews中的frame会跟随放大效果改变,故此方法为初次设置后的frame 22 | @objc optional 23 | func glt_layoutSubviews() 24 | 25 | /// 可选实现 - 可在此方法内部进行未选中后的一些处理 26 | @objc optional 27 | func glt_unselected() 28 | 29 | /// 可选实现 - 可在此方法内部进行选中后的一些处理 30 | @objc optional 31 | func glt_selected() 32 | 33 | /// 可选实现 - 合并成一个方法,进行选中和未选中的处理 34 | @objc optional 35 | func glt_setSelected(_ isSelected: Bool) 36 | } 37 | 38 | public extension LTPageTitleItemType { 39 | 40 | /// 当前选中以及取消选中 41 | var glt_isSelected: Bool { 42 | get { 43 | return objc_getAssociatedObject(self, <AssociatedKeys.glt_isSelected) as? Bool ?? false 44 | } 45 | set { 46 | let _isSelected = newValue 47 | objc_setAssociatedObject(self, <AssociatedKeys.glt_isSelected, _isSelected, .OBJC_ASSOCIATION_ASSIGN) 48 | _isSelected ? glt_selected?() : glt_unselected?() 49 | glt_setSelected?(_isSelected) 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /OCExample/OCExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | LTScrollView 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTPageView/LTPageScrollView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageScrollView.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class LTPageScrollView: UIScrollView, UIGestureRecognizerDelegate { 12 | 13 | /** 如果LTPageView 与 LTSimple结合使用 需要将它设置为true */ 14 | @objc public var isSimpeMix = false 15 | 16 | @objc public var gestureRecognizerEnabledHandle: ((Bool) -> Void)? 17 | 18 | public override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { 19 | 20 | guard let gestureView = gestureRecognizer.view else { return gestureBeginRet(true) } 21 | 22 | guard isSimpeMix else { return gestureBeginRet(true) } 23 | 24 | guard gestureRecognizer.isKind(of: NSClassFromString("UIScrollViewPanGestureRecognizer")!) else { 25 | return gestureBeginRet(true) 26 | } 27 | 28 | let velocityX = (gestureRecognizer as! UIPanGestureRecognizer).velocity(in: gestureView).x 29 | 30 | if velocityX > 0 { // 右滑 31 | if self.contentOffset.x == 0 { 32 | return gestureBeginRet(false) 33 | } 34 | }else if velocityX < 0 {// 左滑 35 | if self.contentOffset.x + self.glt_width == self.contentSize.width { 36 | return gestureBeginRet(false) 37 | } 38 | } 39 | 40 | return gestureBeginRet(true) 41 | } 42 | 43 | private func gestureBeginRet(_ isEnabled: Bool) -> Bool { 44 | gestureRecognizerEnabledHandle?(isEnabled) 45 | return isEnabled 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTExtension/LTCollectionFlowLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTCollectionFlowLayout.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by 高刘通 on 2018/7/30. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UICollectionViewFlowLayout { 12 | 13 | private struct LTCollectionViewHandleKey { 14 | static var key = "glt_collectionViewContentSizeHandle" 15 | } 16 | 17 | public static var glt_sliderHeight: CGFloat? { 18 | get { return objc_getAssociatedObject(self, <CollectionViewHandleKey.key) as? CGFloat } 19 | set { objc_setAssociatedObject(self, <CollectionViewHandleKey.key, newValue, .OBJC_ASSOCIATION_ASSIGN) } 20 | } 21 | 22 | public class func loadOnce() { 23 | DispatchQueue.once(token: "LTFlowLayout") { 24 | let originSelector = #selector(getter: UICollectionViewLayout.collectionViewContentSize) 25 | let swizzleSelector = #selector(UICollectionViewFlowLayout.glt_collectionViewContentSize) 26 | glt_swizzleMethod(self, originSelector, swizzleSelector) 27 | } 28 | } 29 | 30 | @objc dynamic func glt_collectionViewContentSize() -> CGSize { 31 | 32 | let contentSize = self.glt_collectionViewContentSize() 33 | 34 | guard let collectionView = collectionView else { return contentSize } 35 | 36 | guard let glt_sliderHeight = UICollectionViewFlowLayout.glt_sliderHeight, glt_sliderHeight > 0 else { return contentSize } 37 | 38 | let collectionViewH = collectionView.bounds.height - glt_sliderHeight 39 | 40 | return contentSize.height < collectionViewH ? CGSize(width: contentSize.width, height: collectionViewH) : contentSize 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTExtension/LTTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTTableView.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2017/11/14. 6 | // Copyright © 2017年 LT. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 外界可以继承自LTTableView做一些特殊处理 12 | public class LTTableView: UITableView, UIGestureRecognizerDelegate { 13 | 14 | /// 滑动是否是simpleManager(即是headerView)?否则滑动的是cell上的pageView 15 | private var isScrollSimple = false 16 | 17 | /** 如果LTPageView 与 LTSimple结合使用 需要将它设置为true */ 18 | @objc var isSimpeMix = false 19 | 20 | /** 是否到了边缘 - 当到了边缘的时候也不能滑动 */ 21 | @objc var isEnabled = true 22 | 23 | public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { 24 | if (isScrollSimple || !isEnabled) && isSimpeMix { 25 | return false 26 | } 27 | return gestureRecognizer.isKind(of: UIPanGestureRecognizer.self) && otherGestureRecognizer.isKind(of: UIPanGestureRecognizer.self) 28 | } 29 | 30 | public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { 31 | guard isSimpeMix else { return true } 32 | var touchView = touch.view 33 | while touchView != nil { 34 | if let isSimple = touchView?.isKind(of: LTSimpleManager.self), isSimple { 35 | self.isScrollSimple = true 36 | return true 37 | } 38 | touchView = touchView?.next as? UIView 39 | } 40 | self.isScrollSimple = false 41 | return true 42 | } 43 | 44 | public override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { 45 | isEnabled = true 46 | return true 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/UIView+MJExtension.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "UIView+MJExtension.h" 11 | 12 | @implementation UIView (MJExtension) 13 | - (void)setMj_x:(CGFloat)mj_x 14 | { 15 | CGRect frame = self.frame; 16 | frame.origin.x = mj_x; 17 | self.frame = frame; 18 | } 19 | 20 | - (CGFloat)mj_x 21 | { 22 | return self.frame.origin.x; 23 | } 24 | 25 | - (void)setMj_y:(CGFloat)mj_y 26 | { 27 | CGRect frame = self.frame; 28 | frame.origin.y = mj_y; 29 | self.frame = frame; 30 | } 31 | 32 | - (CGFloat)mj_y 33 | { 34 | return self.frame.origin.y; 35 | } 36 | 37 | - (void)setMj_w:(CGFloat)mj_w 38 | { 39 | CGRect frame = self.frame; 40 | frame.size.width = mj_w; 41 | self.frame = frame; 42 | } 43 | 44 | - (CGFloat)mj_w 45 | { 46 | return self.frame.size.width; 47 | } 48 | 49 | - (void)setMj_h:(CGFloat)mj_h 50 | { 51 | CGRect frame = self.frame; 52 | frame.size.height = mj_h; 53 | self.frame = frame; 54 | } 55 | 56 | - (CGFloat)mj_h 57 | { 58 | return self.frame.size.height; 59 | } 60 | 61 | - (void)setMj_size:(CGSize)mj_size 62 | { 63 | CGRect frame = self.frame; 64 | frame.size = mj_size; 65 | self.frame = frame; 66 | } 67 | 68 | - (CGSize)mj_size 69 | { 70 | return self.frame.size; 71 | } 72 | 73 | - (void)setMj_origin:(CGPoint)mj_origin 74 | { 75 | CGRect frame = self.frame; 76 | frame.origin = mj_origin; 77 | self.frame = frame; 78 | } 79 | 80 | - (CGPoint)mj_origin 81 | { 82 | return self.frame.origin; 83 | } 84 | @end 85 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/UIView+MJExtension.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // UIView+Extension.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 14-5-28. 7 | // Copyright (c) 2014年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "UIView+MJExtension.h" 11 | 12 | @implementation UIView (MJExtension) 13 | - (void)setMj_x:(CGFloat)mj_x 14 | { 15 | CGRect frame = self.frame; 16 | frame.origin.x = mj_x; 17 | self.frame = frame; 18 | } 19 | 20 | - (CGFloat)mj_x 21 | { 22 | return self.frame.origin.x; 23 | } 24 | 25 | - (void)setMj_y:(CGFloat)mj_y 26 | { 27 | CGRect frame = self.frame; 28 | frame.origin.y = mj_y; 29 | self.frame = frame; 30 | } 31 | 32 | - (CGFloat)mj_y 33 | { 34 | return self.frame.origin.y; 35 | } 36 | 37 | - (void)setMj_w:(CGFloat)mj_w 38 | { 39 | CGRect frame = self.frame; 40 | frame.size.width = mj_w; 41 | self.frame = frame; 42 | } 43 | 44 | - (CGFloat)mj_w 45 | { 46 | return self.frame.size.width; 47 | } 48 | 49 | - (void)setMj_h:(CGFloat)mj_h 50 | { 51 | CGRect frame = self.frame; 52 | frame.size.height = mj_h; 53 | self.frame = frame; 54 | } 55 | 56 | - (CGFloat)mj_h 57 | { 58 | return self.frame.size.height; 59 | } 60 | 61 | - (void)setMj_size:(CGSize)mj_size 62 | { 63 | CGRect frame = self.frame; 64 | frame.size = mj_size; 65 | self.frame = frame; 66 | } 67 | 68 | - (CGSize)mj_size 69 | { 70 | return self.frame.size; 71 | } 72 | 73 | - (void)setMj_origin:(CGPoint)mj_origin 74 | { 75 | CGRect frame = self.frame; 76 | frame.origin = mj_origin; 77 | self.frame = frame; 78 | } 79 | 80 | - (CGPoint)mj_origin 81 | { 82 | return self.frame.origin; 83 | } 84 | @end 85 | -------------------------------------------------------------------------------- /OCExample/OCExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTAdvanced/Controller/LTHeaderView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTHeaderView.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | import UIKit 18 | 19 | class LTHeaderView: UIView { 20 | 21 | private lazy var label: UILabel = { 22 | let label = UILabel() 23 | label.text = "点击响应事件" 24 | label.textColor = UIColor.white 25 | label.frame.origin.y = 30 26 | label.frame.origin.x = 50 27 | label.isUserInteractionEnabled = true 28 | label.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.tapLabel(_:)))) 29 | label.sizeToFit() 30 | return label 31 | }() 32 | 33 | @objc private func tapLabel(_ gesture: UITapGestureRecognizer) { 34 | print("tapLabel☄") 35 | } 36 | 37 | override init(frame: CGRect) { 38 | super.init(frame: frame) 39 | backgroundColor = UIColor.blue 40 | addSubview(label) 41 | } 42 | 43 | required init?(coder aDecoder: NSCoder) { 44 | fatalError("init(coder:) has not been implemented") 45 | } 46 | 47 | //MARK: 暂用,待优化。 48 | override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { 49 | for tempView in self.subviews { 50 | if tempView.isKind(of: UILabel.self) { 51 | let button = tempView as! UILabel 52 | let newPoint = self.convert(point, to: button) 53 | if button.bounds.contains(newPoint) { 54 | return true 55 | } 56 | } 57 | } 58 | return false 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /OCExample/OCExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Example/LTScrollView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /OCExample/OCExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefreshConst.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | #import 4 | 5 | const CGFloat MJRefreshLabelLeftInset = 25; 6 | const CGFloat MJRefreshHeaderHeight = 54.0; 7 | const CGFloat MJRefreshFooterHeight = 44.0; 8 | const CGFloat MJRefreshFastAnimationDuration = 0.25; 9 | const CGFloat MJRefreshSlowAnimationDuration = 0.4; 10 | 11 | NSString *const MJRefreshKeyPathContentOffset = @"contentOffset"; 12 | NSString *const MJRefreshKeyPathContentInset = @"contentInset"; 13 | NSString *const MJRefreshKeyPathContentSize = @"contentSize"; 14 | NSString *const MJRefreshKeyPathPanState = @"state"; 15 | 16 | NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey"; 17 | 18 | NSString *const MJRefreshHeaderIdleText = @"MJRefreshHeaderIdleText"; 19 | NSString *const MJRefreshHeaderPullingText = @"MJRefreshHeaderPullingText"; 20 | NSString *const MJRefreshHeaderRefreshingText = @"MJRefreshHeaderRefreshingText"; 21 | 22 | NSString *const MJRefreshAutoFooterIdleText = @"MJRefreshAutoFooterIdleText"; 23 | NSString *const MJRefreshAutoFooterRefreshingText = @"MJRefreshAutoFooterRefreshingText"; 24 | NSString *const MJRefreshAutoFooterNoMoreDataText = @"MJRefreshAutoFooterNoMoreDataText"; 25 | 26 | NSString *const MJRefreshBackFooterIdleText = @"MJRefreshBackFooterIdleText"; 27 | NSString *const MJRefreshBackFooterPullingText = @"MJRefreshBackFooterPullingText"; 28 | NSString *const MJRefreshBackFooterRefreshingText = @"MJRefreshBackFooterRefreshingText"; 29 | NSString *const MJRefreshBackFooterNoMoreDataText = @"MJRefreshBackFooterNoMoreDataText"; 30 | 31 | NSString *const MJRefreshHeaderLastTimeText = @"MJRefreshHeaderLastTimeText"; 32 | NSString *const MJRefreshHeaderDateTodayText = @"MJRefreshHeaderDateTodayText"; 33 | NSString *const MJRefreshHeaderNoneLastDateText = @"MJRefreshHeaderNoneLastDateText"; -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefreshConst.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | #import 4 | 5 | const CGFloat MJRefreshLabelLeftInset = 25; 6 | const CGFloat MJRefreshHeaderHeight = 54.0; 7 | const CGFloat MJRefreshFooterHeight = 44.0; 8 | const CGFloat MJRefreshFastAnimationDuration = 0.25; 9 | const CGFloat MJRefreshSlowAnimationDuration = 0.4; 10 | 11 | NSString *const MJRefreshKeyPathContentOffset = @"contentOffset"; 12 | NSString *const MJRefreshKeyPathContentInset = @"contentInset"; 13 | NSString *const MJRefreshKeyPathContentSize = @"contentSize"; 14 | NSString *const MJRefreshKeyPathPanState = @"state"; 15 | 16 | NSString *const MJRefreshHeaderLastUpdatedTimeKey = @"MJRefreshHeaderLastUpdatedTimeKey"; 17 | 18 | NSString *const MJRefreshHeaderIdleText = @"MJRefreshHeaderIdleText"; 19 | NSString *const MJRefreshHeaderPullingText = @"MJRefreshHeaderPullingText"; 20 | NSString *const MJRefreshHeaderRefreshingText = @"MJRefreshHeaderRefreshingText"; 21 | 22 | NSString *const MJRefreshAutoFooterIdleText = @"MJRefreshAutoFooterIdleText"; 23 | NSString *const MJRefreshAutoFooterRefreshingText = @"MJRefreshAutoFooterRefreshingText"; 24 | NSString *const MJRefreshAutoFooterNoMoreDataText = @"MJRefreshAutoFooterNoMoreDataText"; 25 | 26 | NSString *const MJRefreshBackFooterIdleText = @"MJRefreshBackFooterIdleText"; 27 | NSString *const MJRefreshBackFooterPullingText = @"MJRefreshBackFooterPullingText"; 28 | NSString *const MJRefreshBackFooterRefreshingText = @"MJRefreshBackFooterRefreshingText"; 29 | NSString *const MJRefreshBackFooterNoMoreDataText = @"MJRefreshBackFooterNoMoreDataText"; 30 | 31 | NSString *const MJRefreshHeaderLastTimeText = @"MJRefreshHeaderLastTimeText"; 32 | NSString *const MJRefreshHeaderDateTodayText = @"MJRefreshHeaderDateTodayText"; 33 | NSString *const MJRefreshHeaderNoneLastDateText = @"MJRefreshHeaderNoneLastDateText"; -------------------------------------------------------------------------------- /OCExample/OCExample/LTFollowMoveView/LTFollowMoveDemo.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveDemo.m 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "LTFollowMoveDemo.h" 18 | #import "LTFollowMoveTestView.h" 19 | #import "LTScrollView-Swift.h" 20 | 21 | @interface LTFollowMoveDemo () 22 | @property(strong, nonatomic) UIButton *jumpButton; 23 | @property(strong, nonatomic) LTFollowMoveTestView *testView; 24 | @end 25 | 26 | @implementation LTFollowMoveDemo 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | self.view.backgroundColor = [UIColor grayColor]; 31 | [self.view addSubview:self.jumpButton]; 32 | } 33 | 34 | - (void)jumpButtonClick { 35 | LTFollowMoveView *moveView = [[LTFollowMoveView alloc] initWithFrame:UIScreen.mainScreen.bounds contentView:self.testView]; 36 | [moveView setShowFinishedHandle:^{ 37 | NSLog(@"setShowFinishedHandle"); 38 | }]; 39 | [moveView showInView:self.view]; 40 | } 41 | 42 | - (LTFollowMoveTestView *)testView { 43 | if (!_testView) { 44 | _testView = [[LTFollowMoveTestView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, kReturnHeight)]; 45 | } 46 | return _testView; 47 | } 48 | 49 | - (UIButton *)jumpButton { 50 | if (!_jumpButton) { 51 | _jumpButton = [UIButton buttonWithType:UIButtonTypeCustom]; 52 | _jumpButton.frame = CGRectMake(0, kReturnHeight, self.view.frame.size.width, 50); 53 | [_jumpButton setTitle:@"点击弹出" forState:UIControlStateNormal]; 54 | _jumpButton.titleLabel.font = [UIFont systemFontOfSize:14]; 55 | [_jumpButton addTarget:self action:@selector(jumpButtonClick) forControlEvents:UIControlEventTouchUpInside]; 56 | _jumpButton.backgroundColor = [UIColor redColor]; 57 | } 58 | return _jumpButton; 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTAdvanced/LTHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTHeaderView.m 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/19. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "LTHeaderView.h" 18 | 19 | @interface LTHeaderView () 20 | @property(strong, nonatomic) UILabel *testLabel; 21 | @end 22 | 23 | @implementation LTHeaderView 24 | 25 | -(instancetype)initWithFrame:(CGRect)frame { 26 | if (self = [super initWithFrame:frame]) { 27 | [self setupSubviews]; 28 | } 29 | return self; 30 | } 31 | 32 | #pragma mark - 布局子视图 33 | -(void)setupSubviews { 34 | self.backgroundColor = [UIColor blueColor]; 35 | [self addSubview:self.testLabel]; 36 | } 37 | 38 | -(void)tagGesture:(UITapGestureRecognizer *)gesture { 39 | NSLog(@"响应事件,回调自己处理吧。"); 40 | } 41 | 42 | - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { 43 | for (UIView *subView in self.subviews) { 44 | if ([subView isKindOfClass:[UILabel class]]) { 45 | UILabel *subLabel = (UILabel *)subView; 46 | CGPoint convertP = [self convertPoint:point toView:subLabel]; 47 | if (CGRectContainsPoint(subLabel.bounds, convertP)) { 48 | return YES; 49 | } 50 | } 51 | } 52 | return NO; 53 | } 54 | 55 | -(UILabel *)testLabel { 56 | if (!_testLabel) { 57 | _testLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 30, 200, 20)]; 58 | _testLabel.text = @"点击响应事件"; 59 | _testLabel.backgroundColor = [UIColor grayColor]; 60 | _testLabel.textColor = [UIColor whiteColor]; 61 | _testLabel.userInteractionEnabled = YES; 62 | UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tagGesture:)]; 63 | [_testLabel addGestureRecognizer:gesture]; 64 | } 65 | return _testLabel; 66 | } 67 | 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoNormalFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter() 12 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView; 13 | @end 14 | 15 | @implementation MJRefreshAutoNormalFooter 16 | #pragma mark - 懒加载子控件 17 | - (UIActivityIndicatorView *)loadingView 18 | { 19 | if (!_loadingView) { 20 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle]; 21 | loadingView.hidesWhenStopped = YES; 22 | [self addSubview:_loadingView = loadingView]; 23 | } 24 | return _loadingView; 25 | } 26 | 27 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle 28 | { 29 | _activityIndicatorViewStyle = activityIndicatorViewStyle; 30 | 31 | self.loadingView = nil; 32 | [self setNeedsLayout]; 33 | } 34 | #pragma mark - 重写父类的方法 35 | - (void)prepare 36 | { 37 | [super prepare]; 38 | 39 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; 40 | } 41 | 42 | - (void)placeSubviews 43 | { 44 | [super placeSubviews]; 45 | 46 | if (self.loadingView.constraints.count) return; 47 | 48 | // 圈圈 49 | CGFloat loadingCenterX = self.mj_w * 0.5; 50 | if (!self.isRefreshingTitleHidden) { 51 | loadingCenterX -= self.stateLabel.mj_textWith * 0.5 + self.labelLeftInset; 52 | } 53 | CGFloat loadingCenterY = self.mj_h * 0.5; 54 | self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY); 55 | } 56 | 57 | - (void)setState:(MJRefreshState)state 58 | { 59 | MJRefreshCheckState 60 | 61 | // 根据状态做事情 62 | if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { 63 | [self.loadingView stopAnimating]; 64 | } else if (state == MJRefreshStateRefreshing) { 65 | [self.loadingView startAnimating]; 66 | } 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoNormalFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/4/24. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoNormalFooter.h" 10 | 11 | @interface MJRefreshAutoNormalFooter() 12 | @property (weak, nonatomic) UIActivityIndicatorView *loadingView; 13 | @end 14 | 15 | @implementation MJRefreshAutoNormalFooter 16 | #pragma mark - 懒加载子控件 17 | - (UIActivityIndicatorView *)loadingView 18 | { 19 | if (!_loadingView) { 20 | UIActivityIndicatorView *loadingView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:self.activityIndicatorViewStyle]; 21 | loadingView.hidesWhenStopped = YES; 22 | [self addSubview:_loadingView = loadingView]; 23 | } 24 | return _loadingView; 25 | } 26 | 27 | - (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle 28 | { 29 | _activityIndicatorViewStyle = activityIndicatorViewStyle; 30 | 31 | self.loadingView = nil; 32 | [self setNeedsLayout]; 33 | } 34 | #pragma mark - 重写父类的方法 35 | - (void)prepare 36 | { 37 | [super prepare]; 38 | 39 | self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray; 40 | } 41 | 42 | - (void)placeSubviews 43 | { 44 | [super placeSubviews]; 45 | 46 | if (self.loadingView.constraints.count) return; 47 | 48 | // 圈圈 49 | CGFloat loadingCenterX = self.mj_w * 0.5; 50 | if (!self.isRefreshingTitleHidden) { 51 | loadingCenterX -= self.stateLabel.mj_textWith * 0.5 + self.labelLeftInset; 52 | } 53 | CGFloat loadingCenterY = self.mj_h * 0.5; 54 | self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY); 55 | } 56 | 57 | - (void)setState:(MJRefreshState)state 58 | { 59 | MJRefreshCheckState 60 | 61 | // 根据状态做事情 62 | if (state == MJRefreshStateNoMoreData || state == MJRefreshStateIdle) { 63 | [self.loadingView stopAnimating]; 64 | } else if (state == MJRefreshStateRefreshing) { 65 | [self.loadingView startAnimating]; 66 | } 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "MJRefreshFooter.h" 11 | 12 | @interface MJRefreshFooter() 13 | 14 | @end 15 | 16 | @implementation MJRefreshFooter 17 | #pragma mark - 构造方法 18 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock 19 | { 20 | MJRefreshFooter *cmp = [[self alloc] init]; 21 | cmp.refreshingBlock = refreshingBlock; 22 | return cmp; 23 | } 24 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action 25 | { 26 | MJRefreshFooter *cmp = [[self alloc] init]; 27 | [cmp setRefreshingTarget:target refreshingAction:action]; 28 | return cmp; 29 | } 30 | 31 | #pragma mark - 重写父类的方法 32 | - (void)prepare 33 | { 34 | [super prepare]; 35 | 36 | // 设置自己的高度 37 | self.mj_h = MJRefreshFooterHeight; 38 | 39 | // 默认不会自动隐藏 40 | self.automaticallyHidden = NO; 41 | } 42 | 43 | - (void)willMoveToSuperview:(UIView *)newSuperview 44 | { 45 | [super willMoveToSuperview:newSuperview]; 46 | 47 | if (newSuperview) { 48 | // 监听scrollView数据的变化 49 | if ([self.scrollView isKindOfClass:[UITableView class]] || [self.scrollView isKindOfClass:[UICollectionView class]]) { 50 | [self.scrollView setMj_reloadDataBlock:^(NSInteger totalDataCount) { 51 | if (self.isAutomaticallyHidden) { 52 | self.hidden = (totalDataCount == 0); 53 | } 54 | }]; 55 | } 56 | } 57 | } 58 | 59 | #pragma mark - 公共方法 60 | - (void)endRefreshingWithNoMoreData 61 | { 62 | self.state = MJRefreshStateNoMoreData; 63 | } 64 | 65 | - (void)noticeNoMoreData 66 | { 67 | [self endRefreshingWithNoMoreData]; 68 | } 69 | 70 | - (void)resetNoMoreData 71 | { 72 | self.state = MJRefreshStateIdle; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Base/MJRefreshFooter.m: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | // MJRefreshFooter.m 4 | // MJRefreshExample 5 | // 6 | // Created by MJ Lee on 15/3/5. 7 | // Copyright (c) 2015年 小码哥. All rights reserved. 8 | // 9 | 10 | #import "MJRefreshFooter.h" 11 | 12 | @interface MJRefreshFooter() 13 | 14 | @end 15 | 16 | @implementation MJRefreshFooter 17 | #pragma mark - 构造方法 18 | + (instancetype)footerWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock 19 | { 20 | MJRefreshFooter *cmp = [[self alloc] init]; 21 | cmp.refreshingBlock = refreshingBlock; 22 | return cmp; 23 | } 24 | + (instancetype)footerWithRefreshingTarget:(id)target refreshingAction:(SEL)action 25 | { 26 | MJRefreshFooter *cmp = [[self alloc] init]; 27 | [cmp setRefreshingTarget:target refreshingAction:action]; 28 | return cmp; 29 | } 30 | 31 | #pragma mark - 重写父类的方法 32 | - (void)prepare 33 | { 34 | [super prepare]; 35 | 36 | // 设置自己的高度 37 | self.mj_h = MJRefreshFooterHeight; 38 | 39 | // 默认不会自动隐藏 40 | self.automaticallyHidden = NO; 41 | } 42 | 43 | - (void)willMoveToSuperview:(UIView *)newSuperview 44 | { 45 | [super willMoveToSuperview:newSuperview]; 46 | 47 | if (newSuperview) { 48 | // 监听scrollView数据的变化 49 | if ([self.scrollView isKindOfClass:[UITableView class]] || [self.scrollView isKindOfClass:[UICollectionView class]]) { 50 | [self.scrollView setMj_reloadDataBlock:^(NSInteger totalDataCount) { 51 | if (self.isAutomaticallyHidden) { 52 | self.hidden = (totalDataCount == 0); 53 | } 54 | }]; 55 | } 56 | } 57 | } 58 | 59 | #pragma mark - 公共方法 60 | - (void)endRefreshingWithNoMoreData 61 | { 62 | self.state = MJRefreshStateNoMoreData; 63 | } 64 | 65 | - (void)noticeNoMoreData 66 | { 67 | [self endRefreshingWithNoMoreData]; 68 | } 69 | 70 | - (void)resetNoMoreData 71 | { 72 | self.state = MJRefreshStateIdle; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTMixPageView/Controller/LTMixPageViewDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageViewDemo.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LTMixPageViewDemo: UIViewController { 12 | 13 | private lazy var viewControllers: [UIViewController] = { 14 | let defaultVC = LTMixPageSimpleDemo() 15 | let setVC = LTMixPageSimpleDemo() 16 | let setStyleOtherVC = LTMixPageSimpleDemo() 17 | let testVC = LTPageViewDemo(isFromMix: true) 18 | let customStyleVC = LTMixPageSimpleDemo() 19 | return [defaultVC, setVC, setStyleOtherVC, testVC, customStyleVC] 20 | }() 21 | 22 | private lazy var titles: [String] = { 23 | return ["上下左右", "自定义", "注意设置", "isSimpeMix", "否则无效"] 24 | }() 25 | 26 | private lazy var layout: LTLayout = { 27 | let layout = LTLayout() 28 | layout.sliderHeight = 40 29 | layout.lrMargin = 20 30 | layout.titleMargin = 20 31 | layout.bottomLineColor = .randomColor 32 | layout.titleColor = .randomColor 33 | layout.titleSelectColor = .randomColor 34 | layout.titleViewBgColor = .white 35 | layout.titleFont = UIFont.systemFont(ofSize: 12) 36 | return layout 37 | }() 38 | 39 | private lazy var pageView: LTPageView = { 40 | let pageView = LTPageView(frame: CGRect(x: 0, y: GLT_NAVCHEIGHT, width: GLT_MAINWIDTH, height: GLT_MAINWHEIGHT - GLT_NAVCHEIGHT - GLT_BOTTOMSPACE), currentViewController: self, viewControllers: viewControllers, titles: titles, layout: layout/*, itemViewClass: LTCustomTitleItemView.self */) 41 | pageView.isClickScrollAnimation = true 42 | return pageView 43 | }() 44 | 45 | 46 | override func viewDidLoad() { 47 | super.viewDidLoad() 48 | view.backgroundColor = UIColor.white 49 | automaticallyAdjustsScrollViewInsets = false 50 | view.addSubview(pageView) 51 | pageView.didSelectIndexBlock = {(_, index) in 52 | print("pageView.didSelectIndexBlock", index) 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTFollowMoveView/LTFollowMoveDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveDemo.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LTFollowMoveDemo: UIViewController, LTFollowMoveViewDelegate { 12 | 13 | private lazy var cancelButton: UIButton = { 14 | let cancelButton = UIButton(type: .custom) 15 | cancelButton.frame = CGRect(x: 0, y: returnHeight, width: view.glt_width, height: 50) 16 | cancelButton.setTitle("点击弹出", for: .normal) 17 | cancelButton.backgroundColor = .red 18 | cancelButton.addTarget(self, action: #selector(jump), for: .touchUpInside) 19 | return cancelButton 20 | }() 21 | 22 | private lazy var moveView: LTFollowMoveTestView = { 23 | let moveView = LTFollowMoveTestView(frame: CGRect(x: 0, y: 0, width: self.view.glt_width, height: returnHeight)) 24 | return moveView 25 | }() 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | view.backgroundColor = .gray 30 | view.addSubview(cancelButton) 31 | } 32 | 33 | @objc func jump() { 34 | let testView = LTFollowMoveView(frame: UIScreen.main.bounds, contentView: self.moveView) 35 | testView.delegate = self 36 | /** 37 | testView.stretchRate = 0.5 38 | testView.isTapHide = true 39 | testView.isQuickPanHide = false 40 | testView.isCanPanBlank = true 41 | testView.willShowHandle = { 42 | print("即将展示 - 1") 43 | } 44 | testView.showFinishedHandle = { 45 | print("展示完成 - 1") 46 | } 47 | testView.dismissFinishedHandle = { 48 | print("消失完成 - 1") 49 | } 50 | */ 51 | testView.show(inView: self.view) 52 | } 53 | 54 | func showFinished(followView: LTFollowMoveView) { 55 | print("展示完成 - 2") 56 | } 57 | 58 | func dismissFinished(followView: LTFollowMoveView) { 59 | print("消失完成 - 2") 60 | } 61 | 62 | func willShow(followView: LTFollowMoveView) { 63 | print("即将展示 - 2") 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTFollowMoveView/LTFollowMoveTestView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveTestView.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | let returnHeight: CGFloat = UIScreen.main.bounds.height * 0.618 12 | 13 | class LTFollowMoveTestView: UIView, LTTableViewProtocal { 14 | 15 | private lazy var titleLabel: UILabel = { 16 | let titleLabel = UILabel(frame: CGRect.init(x: 0, y: 0, width: self.glt_width, height: 44)) 17 | titleLabel.text = "评论-下拉拖动" 18 | titleLabel.backgroundColor = .green 19 | titleLabel.textAlignment = .center 20 | return titleLabel 21 | }() 22 | 23 | private lazy var tableView: UITableView = { 24 | let tableView = tableViewConfig(CGRect(x: 0, y:44, width: self.bounds.width, height: returnHeight - 44), self, self, nil) 25 | if #available(iOS 11.0, *) { 26 | tableView.contentInsetAdjustmentBehavior = .never 27 | } 28 | return tableView 29 | }() 30 | 31 | override init(frame: CGRect) { 32 | super.init(frame: frame) 33 | addSubview(titleLabel) 34 | addSubview(tableView) 35 | } 36 | 37 | required init?(coder: NSCoder) { 38 | fatalError("init(coder:) has not been implemented") 39 | } 40 | 41 | deinit { 42 | print("释放了") 43 | } 44 | } 45 | 46 | 47 | 48 | extension LTFollowMoveTestView: UITableViewDelegate, UITableViewDataSource { 49 | 50 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 51 | return 30 52 | } 53 | 54 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 55 | let cell = cellWithTableView(tableView) 56 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 57 | return cell 58 | } 59 | 60 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 61 | return 100.0 62 | } 63 | 64 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 65 | print("didSelectRowAt - \(indexPath.row)") 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+MJRefresh.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 16/6/13. 6 | // Copyright © 2016年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "NSBundle+MJRefresh.h" 10 | #import "MJRefreshComponent.h" 11 | 12 | @implementation NSBundle (MJRefresh) 13 | + (instancetype)mj_refreshBundle 14 | { 15 | static NSBundle *refreshBundle = nil; 16 | if (refreshBundle == nil) { 17 | // 这里不使用mainBundle是为了适配pod 1.x和0.x 18 | refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]]; 19 | } 20 | return refreshBundle; 21 | } 22 | 23 | + (UIImage *)mj_arrowImage 24 | { 25 | static UIImage *arrowImage = nil; 26 | if (arrowImage == nil) { 27 | arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 28 | } 29 | return arrowImage; 30 | } 31 | 32 | + (NSString *)mj_localizedStringForKey:(NSString *)key 33 | { 34 | return [self mj_localizedStringForKey:key value:nil]; 35 | } 36 | 37 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value 38 | { 39 | static NSBundle *bundle = nil; 40 | if (bundle == nil) { 41 | // (iOS获取的语言字符串比较不稳定)目前框架只处理en、zh-Hans、zh-Hant三种情况,其他按照系统默认处理 42 | NSString *language = [NSLocale preferredLanguages].firstObject; 43 | if ([language hasPrefix:@"en"]) { 44 | language = @"en"; 45 | } else if ([language hasPrefix:@"zh"]) { 46 | if ([language rangeOfString:@"Hans"].location != NSNotFound) { 47 | language = @"zh-Hans"; // 简体中文 48 | } else { // zh-Hant\zh-HK\zh-TW 49 | language = @"zh-Hant"; // 繁體中文 50 | } 51 | } else { 52 | language = @"en"; 53 | } 54 | 55 | // 从MJRefresh.bundle中查找资源 56 | bundle = [NSBundle bundleWithPath:[[NSBundle mj_refreshBundle] pathForResource:language ofType:@"lproj"]]; 57 | } 58 | value = [bundle localizedStringForKey:key value:value table:nil]; 59 | return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil]; 60 | } 61 | @end 62 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/NSBundle+MJRefresh.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+MJRefresh.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 16/6/13. 6 | // Copyright © 2016年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "NSBundle+MJRefresh.h" 10 | #import "MJRefreshComponent.h" 11 | 12 | @implementation NSBundle (MJRefresh) 13 | + (instancetype)mj_refreshBundle 14 | { 15 | static NSBundle *refreshBundle = nil; 16 | if (refreshBundle == nil) { 17 | // 这里不使用mainBundle是为了适配pod 1.x和0.x 18 | refreshBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[MJRefreshComponent class]] pathForResource:@"MJRefresh" ofType:@"bundle"]]; 19 | } 20 | return refreshBundle; 21 | } 22 | 23 | + (UIImage *)mj_arrowImage 24 | { 25 | static UIImage *arrowImage = nil; 26 | if (arrowImage == nil) { 27 | arrowImage = [[UIImage imageWithContentsOfFile:[[self mj_refreshBundle] pathForResource:@"arrow@2x" ofType:@"png"]] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 28 | } 29 | return arrowImage; 30 | } 31 | 32 | + (NSString *)mj_localizedStringForKey:(NSString *)key 33 | { 34 | return [self mj_localizedStringForKey:key value:nil]; 35 | } 36 | 37 | + (NSString *)mj_localizedStringForKey:(NSString *)key value:(NSString *)value 38 | { 39 | static NSBundle *bundle = nil; 40 | if (bundle == nil) { 41 | // (iOS获取的语言字符串比较不稳定)目前框架只处理en、zh-Hans、zh-Hant三种情况,其他按照系统默认处理 42 | NSString *language = [NSLocale preferredLanguages].firstObject; 43 | if ([language hasPrefix:@"en"]) { 44 | language = @"en"; 45 | } else if ([language hasPrefix:@"zh"]) { 46 | if ([language rangeOfString:@"Hans"].location != NSNotFound) { 47 | language = @"zh-Hans"; // 简体中文 48 | } else { // zh-Hant\zh-HK\zh-TW 49 | language = @"zh-Hant"; // 繁體中文 50 | } 51 | } else { 52 | language = @"en"; 53 | } 54 | 55 | // 从MJRefresh.bundle中查找资源 56 | bundle = [NSBundle bundleWithPath:[[NSBundle mj_refreshBundle] pathForResource:language ofType:@"lproj"]]; 57 | } 58 | value = [bundle localizedStringForKey:key value:value table:nil]; 59 | return [[NSBundle mainBundle] localizedStringForKey:key value:value table:nil]; 60 | } 61 | @end 62 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter() 12 | { 13 | /** 显示刷新状态的label */ 14 | __unsafe_unretained UILabel *_stateLabel; 15 | } 16 | /** 所有状态对应的文字 */ 17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles; 18 | @end 19 | 20 | @implementation MJRefreshBackStateFooter 21 | #pragma mark - 懒加载 22 | - (NSMutableDictionary *)stateTitles 23 | { 24 | if (!_stateTitles) { 25 | self.stateTitles = [NSMutableDictionary dictionary]; 26 | } 27 | return _stateTitles; 28 | } 29 | 30 | - (UILabel *)stateLabel 31 | { 32 | if (!_stateLabel) { 33 | [self addSubview:_stateLabel = [UILabel mj_label]]; 34 | } 35 | return _stateLabel; 36 | } 37 | 38 | #pragma mark - 公共方法 39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state 40 | { 41 | if (title == nil) return; 42 | self.stateTitles[@(state)] = title; 43 | self.stateLabel.text = self.stateTitles[@(self.state)]; 44 | } 45 | 46 | - (NSString *)titleForState:(MJRefreshState)state { 47 | return self.stateTitles[@(state)]; 48 | } 49 | 50 | #pragma mark - 重写父类的方法 51 | - (void)prepare 52 | { 53 | [super prepare]; 54 | 55 | // 初始化间距 56 | self.labelLeftInset = MJRefreshLabelLeftInset; 57 | 58 | // 初始化文字 59 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterIdleText] forState:MJRefreshStateIdle]; 60 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterPullingText] forState:MJRefreshStatePulling]; 61 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterRefreshingText] forState:MJRefreshStateRefreshing]; 62 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; 63 | } 64 | 65 | - (void)placeSubviews 66 | { 67 | [super placeSubviews]; 68 | 69 | if (self.stateLabel.constraints.count) return; 70 | 71 | // 状态标签 72 | self.stateLabel.frame = self.bounds; 73 | } 74 | 75 | - (void)setState:(MJRefreshState)state 76 | { 77 | MJRefreshCheckState 78 | 79 | // 设置状态文字 80 | self.stateLabel.text = self.stateTitles[@(state)]; 81 | } 82 | @end 83 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshBackStateFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshBackStateFooter.h" 10 | 11 | @interface MJRefreshBackStateFooter() 12 | { 13 | /** 显示刷新状态的label */ 14 | __unsafe_unretained UILabel *_stateLabel; 15 | } 16 | /** 所有状态对应的文字 */ 17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles; 18 | @end 19 | 20 | @implementation MJRefreshBackStateFooter 21 | #pragma mark - 懒加载 22 | - (NSMutableDictionary *)stateTitles 23 | { 24 | if (!_stateTitles) { 25 | self.stateTitles = [NSMutableDictionary dictionary]; 26 | } 27 | return _stateTitles; 28 | } 29 | 30 | - (UILabel *)stateLabel 31 | { 32 | if (!_stateLabel) { 33 | [self addSubview:_stateLabel = [UILabel mj_label]]; 34 | } 35 | return _stateLabel; 36 | } 37 | 38 | #pragma mark - 公共方法 39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state 40 | { 41 | if (title == nil) return; 42 | self.stateTitles[@(state)] = title; 43 | self.stateLabel.text = self.stateTitles[@(self.state)]; 44 | } 45 | 46 | - (NSString *)titleForState:(MJRefreshState)state { 47 | return self.stateTitles[@(state)]; 48 | } 49 | 50 | #pragma mark - 重写父类的方法 51 | - (void)prepare 52 | { 53 | [super prepare]; 54 | 55 | // 初始化间距 56 | self.labelLeftInset = MJRefreshLabelLeftInset; 57 | 58 | // 初始化文字 59 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterIdleText] forState:MJRefreshStateIdle]; 60 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterPullingText] forState:MJRefreshStatePulling]; 61 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterRefreshingText] forState:MJRefreshStateRefreshing]; 62 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshBackFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; 63 | } 64 | 65 | - (void)placeSubviews 66 | { 67 | [super placeSubviews]; 68 | 69 | if (self.stateLabel.constraints.count) return; 70 | 71 | // 状态标签 72 | self.stateLabel.frame = self.bounds; 73 | } 74 | 75 | - (void)setState:(MJRefreshState)state 76 | { 77 | MJRefreshCheckState 78 | 79 | // 设置状态文字 80 | self.stateLabel.text = self.stateTitles[@(state)]; 81 | } 82 | @end 83 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-LTScrollView_Example/Pods-LTScrollView_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | MJRefresh 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTExtension/LTTableViewProtocal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTTableViewProtocal.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | public protocol LTTableViewProtocal { } 13 | 14 | public extension LTTableViewProtocal { 15 | 16 | private func configIdentifier(_ identifier: inout String) -> String { 17 | var index = identifier.firstIndex(of: ".") 18 | guard index != nil else { return identifier } 19 | index = identifier.index(index!, offsetBy: 1) 20 | identifier = String(identifier[index! ..< identifier.endIndex]) 21 | return identifier 22 | } 23 | 24 | func registerCell(_ tableView: UITableView, _ cellCls: AnyClass) { 25 | var identifier = NSStringFromClass(cellCls) 26 | identifier = configIdentifier(&identifier) 27 | tableView.register(cellCls, forCellReuseIdentifier: identifier) 28 | } 29 | 30 | public func cellWithTableView(_ tableView: UITableView) -> T { 31 | var identifier = NSStringFromClass(T.self) 32 | identifier = configIdentifier(&identifier) 33 | var cell = tableView.dequeueReusableCell(withIdentifier: identifier) 34 | if cell == nil { 35 | cell = UITableViewCell(style: .default, reuseIdentifier: identifier) 36 | } 37 | return cell as! T 38 | } 39 | 40 | public func tableViewConfig(_ delegate: UITableViewDelegate, _ dataSource: UITableViewDataSource, _ style: UITableView.Style?) -> UITableView { 41 | let tableView = UITableView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height), style: style ?? .plain) 42 | tableView.delegate = delegate 43 | tableView.dataSource = dataSource 44 | return tableView 45 | } 46 | 47 | public func tableViewConfig(_ frame: CGRect ,_ delegate: UITableViewDelegate, _ dataSource: UITableViewDataSource, _ style: UITableView.Style?) -> UITableView { 48 | let tableView = UITableView(frame: frame, style: style ?? .plain) 49 | tableView.delegate = delegate 50 | tableView.dataSource = dataSource 51 | if #available(iOS 11.0, *) { 52 | tableView.contentInsetAdjustmentBehavior = .never 53 | } else { 54 | // Fallback on earlier versions 55 | } 56 | return tableView 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /OCExample/Pods/Target Support Files/Pods-OCExample/Pods-OCExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## LTScrollView 5 | 6 | Copyright (c) 2017 1282990794@qq.com <1282990794@qq.com> 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## MJRefresh 28 | 29 | Copyright (c) 2013-2015 MJRefresh (https://github.com/CoderMJLee/MJRefresh) 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | 49 | Generated by CocoaPods - https://cocoapods.org 50 | -------------------------------------------------------------------------------- /OCExample/OCExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "AppDelegate.h" 18 | #import "ViewController.h" 19 | 20 | @interface AppDelegate () 21 | 22 | @end 23 | 24 | @implementation AppDelegate 25 | 26 | 27 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 28 | // Override point for customization after application launch. 29 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; 30 | return YES; 31 | } 32 | 33 | 34 | - (void)applicationWillResignActive:(UIApplication *)application { 35 | // 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. 36 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 37 | } 38 | 39 | 40 | - (void)applicationDidEnterBackground:(UIApplication *)application { 41 | // 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. 42 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 43 | } 44 | 45 | 46 | - (void)applicationWillEnterForeground:(UIApplication *)application { 47 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 48 | } 49 | 50 | 51 | - (void)applicationDidBecomeActive:(UIApplication *)application { 52 | // 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. 53 | } 54 | 55 | 56 | - (void)applicationWillTerminate:(UIApplication *)application { 57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTPageView/Controller/LTPageViewDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageViewDemo.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by 高刘通 on 2018/6/11. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LTPageViewDemo: UIViewController { 12 | 13 | 14 | private lazy var viewControllers: [UIViewController] = { 15 | let defaultVC = LTPageViewMoreDemo(style: .default) 16 | let setVC = LTPageViewMoreDemo(style: .setStyle) 17 | let setStyleOtherVC = LTPageViewMoreDemo(style: .setStyleOther) 18 | let customStyleVC = LTPageViewMoreDemo(style: .customStyle) 19 | return [defaultVC, setVC, setStyleOtherVC, customStyleVC] 20 | }() 21 | 22 | private lazy var titles: [String] = { 23 | return ["自定义标题样式", "系统样式1", "系统样式2", "默认"] 24 | }() 25 | 26 | private lazy var layout: LTLayout = { 27 | let layout = LTLayout() 28 | layout.sliderHeight = 40 29 | layout.lrMargin = 20 30 | layout.titleMargin = 20 31 | layout.bottomLineColor = .randomColor 32 | layout.titleColor = .randomColor 33 | layout.titleSelectColor = .randomColor 34 | layout.titleViewBgColor = .white 35 | return layout 36 | }() 37 | 38 | private lazy var pageView: LTPageView = { 39 | let pageView = LTPageView(frame: CGRect(x: 0, y: self.isFromMix ? 0 : GLT_NAVCHEIGHT, width: GLT_MAINWIDTH, height: GLT_MAINWHEIGHT - GLT_NAVCHEIGHT - GLT_BOTTOMSPACE), currentViewController: self, viewControllers: viewControllers, titles: titles, layout: layout/*, itemViewClass: LTCustomTitleItemView.self*/) 40 | pageView.isClickScrollAnimation = true 41 | return pageView 42 | }() 43 | 44 | private lazy var isFromMix: Bool = false 45 | 46 | init(isFromMix: Bool = false) { 47 | super.init(nibName: nil, bundle: nil) 48 | self.isFromMix = isFromMix 49 | } 50 | 51 | override func viewDidLoad() { 52 | super.viewDidLoad() 53 | view.backgroundColor = UIColor.white 54 | automaticallyAdjustsScrollViewInsets = false 55 | view.addSubview(pageView) 56 | pageView.didSelectIndexBlock = {(_, index) in 57 | print("pageView.didSelectIndexBlock", index) 58 | } 59 | // DispatchQueue.main.asyncAfter(deadline: .now() + 3, execute: DispatchWorkItem(block: { 60 | // self.pageView.reloadLayout(titles: ["可以2", "改变", "标题", "LTPageView具体使用"]) 61 | // })) 62 | } 63 | 64 | required init?(coder: NSCoder) { 65 | fatalError("init(coder:) has not been implemented") 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoStateFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoStateFooter() 12 | { 13 | /** 显示刷新状态的label */ 14 | __unsafe_unretained UILabel *_stateLabel; 15 | } 16 | /** 所有状态对应的文字 */ 17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles; 18 | @end 19 | 20 | @implementation MJRefreshAutoStateFooter 21 | #pragma mark - 懒加载 22 | - (NSMutableDictionary *)stateTitles 23 | { 24 | if (!_stateTitles) { 25 | self.stateTitles = [NSMutableDictionary dictionary]; 26 | } 27 | return _stateTitles; 28 | } 29 | 30 | - (UILabel *)stateLabel 31 | { 32 | if (!_stateLabel) { 33 | [self addSubview:_stateLabel = [UILabel mj_label]]; 34 | } 35 | return _stateLabel; 36 | } 37 | 38 | #pragma mark - 公共方法 39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state 40 | { 41 | if (title == nil) return; 42 | self.stateTitles[@(state)] = title; 43 | self.stateLabel.text = self.stateTitles[@(self.state)]; 44 | } 45 | 46 | #pragma mark - 私有方法 47 | - (void)stateLabelClick 48 | { 49 | if (self.state == MJRefreshStateIdle) { 50 | [self beginRefreshing]; 51 | } 52 | } 53 | 54 | #pragma mark - 重写父类的方法 55 | - (void)prepare 56 | { 57 | [super prepare]; 58 | 59 | // 初始化间距 60 | self.labelLeftInset = MJRefreshLabelLeftInset; 61 | 62 | // 初始化文字 63 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterIdleText] forState:MJRefreshStateIdle]; 64 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterRefreshingText] forState:MJRefreshStateRefreshing]; 65 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; 66 | 67 | // 监听label 68 | self.stateLabel.userInteractionEnabled = YES; 69 | [self.stateLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(stateLabelClick)]]; 70 | } 71 | 72 | - (void)placeSubviews 73 | { 74 | [super placeSubviews]; 75 | 76 | if (self.stateLabel.constraints.count) return; 77 | 78 | // 状态标签 79 | self.stateLabel.frame = self.bounds; 80 | } 81 | 82 | - (void)setState:(MJRefreshState)state 83 | { 84 | MJRefreshCheckState 85 | 86 | if (self.isRefreshingTitleHidden && state == MJRefreshStateRefreshing) { 87 | self.stateLabel.text = nil; 88 | } else { 89 | self.stateLabel.text = self.stateTitles[@(state)]; 90 | } 91 | } 92 | @end -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJRefreshAutoStateFooter.m 3 | // MJRefreshExample 4 | // 5 | // Created by MJ Lee on 15/6/13. 6 | // Copyright © 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJRefreshAutoStateFooter.h" 10 | 11 | @interface MJRefreshAutoStateFooter() 12 | { 13 | /** 显示刷新状态的label */ 14 | __unsafe_unretained UILabel *_stateLabel; 15 | } 16 | /** 所有状态对应的文字 */ 17 | @property (strong, nonatomic) NSMutableDictionary *stateTitles; 18 | @end 19 | 20 | @implementation MJRefreshAutoStateFooter 21 | #pragma mark - 懒加载 22 | - (NSMutableDictionary *)stateTitles 23 | { 24 | if (!_stateTitles) { 25 | self.stateTitles = [NSMutableDictionary dictionary]; 26 | } 27 | return _stateTitles; 28 | } 29 | 30 | - (UILabel *)stateLabel 31 | { 32 | if (!_stateLabel) { 33 | [self addSubview:_stateLabel = [UILabel mj_label]]; 34 | } 35 | return _stateLabel; 36 | } 37 | 38 | #pragma mark - 公共方法 39 | - (void)setTitle:(NSString *)title forState:(MJRefreshState)state 40 | { 41 | if (title == nil) return; 42 | self.stateTitles[@(state)] = title; 43 | self.stateLabel.text = self.stateTitles[@(self.state)]; 44 | } 45 | 46 | #pragma mark - 私有方法 47 | - (void)stateLabelClick 48 | { 49 | if (self.state == MJRefreshStateIdle) { 50 | [self beginRefreshing]; 51 | } 52 | } 53 | 54 | #pragma mark - 重写父类的方法 55 | - (void)prepare 56 | { 57 | [super prepare]; 58 | 59 | // 初始化间距 60 | self.labelLeftInset = MJRefreshLabelLeftInset; 61 | 62 | // 初始化文字 63 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterIdleText] forState:MJRefreshStateIdle]; 64 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterRefreshingText] forState:MJRefreshStateRefreshing]; 65 | [self setTitle:[NSBundle mj_localizedStringForKey:MJRefreshAutoFooterNoMoreDataText] forState:MJRefreshStateNoMoreData]; 66 | 67 | // 监听label 68 | self.stateLabel.userInteractionEnabled = YES; 69 | [self.stateLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(stateLabelClick)]]; 70 | } 71 | 72 | - (void)placeSubviews 73 | { 74 | [super placeSubviews]; 75 | 76 | if (self.stateLabel.constraints.count) return; 77 | 78 | // 状态标签 79 | self.stateLabel.frame = self.bounds; 80 | } 81 | 82 | - (void)setState:(MJRefreshState)state 83 | { 84 | MJRefreshCheckState 85 | 86 | if (self.isRefreshingTitleHidden && state == MJRefreshStateRefreshing) { 87 | self.stateLabel.text = nil; 88 | } else { 89 | self.stateLabel.text = self.stateTitles[@(state)]; 90 | } 91 | } 92 | @end -------------------------------------------------------------------------------- /OCExample/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MJRefresh.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTPersonalMainPage/Controller/LTPersonalMainPageTestVC.swift: -------------------------------------------------------------------------------- 1 | // LTSimpleTestOneVC.swift 2 | // LTScrollView 3 | // 4 | // Created by 高刘通 on 2017/11/27. 5 | // Copyright © 2017年 LT. All rights reserved. 6 | // 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | import UIKit 18 | import MJRefresh 19 | 20 | class LTPersonalMainPageTestVC: UIViewController, LTTableViewProtocal { 21 | 22 | private lazy var tableView: UITableView = { 23 | //这个44为导航高度 24 | let Y: CGFloat = GLT_NAVCHEIGHT 25 | //这个44为切换条的高度 26 | let H: CGFloat = glt_iphoneX ? (view.bounds.height - Y - 44 - 34) : view.bounds.height - Y - 44 27 | let tableView = tableViewConfig(CGRect(x: 0, y: 44, width: view.bounds.width, height: H), self, self, nil) 28 | return tableView 29 | }() 30 | 31 | override func viewDidLoad() { 32 | super.viewDidLoad() 33 | view.backgroundColor = UIColor.white 34 | view.addSubview(tableView) 35 | glt_scrollView = tableView 36 | reftreshData() 37 | if #available(iOS 11.0, *) { 38 | glt_scrollView?.contentInsetAdjustmentBehavior = .never 39 | } else { 40 | self.automaticallyAdjustsScrollViewInsets = false 41 | } 42 | } 43 | } 44 | 45 | extension LTPersonalMainPageTestVC { 46 | fileprivate func reftreshData() { 47 | self.tableView.mj_footer = MJRefreshBackNormalFooter {[weak self] in 48 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: { 49 | print("上拉加载更多数据") 50 | self?.tableView.mj_footer.endRefreshing() 51 | }) 52 | } 53 | } 54 | } 55 | 56 | 57 | extension LTPersonalMainPageTestVC: UITableViewDelegate, UITableViewDataSource { 58 | 59 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 60 | return 30 61 | } 62 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 63 | let cell = cellWithTableView(tableView) 64 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 65 | return cell 66 | } 67 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 68 | tableView.deselectRow(at: indexPath, animated: true) 69 | print("点击了第\(indexPath.row + 1)行") 70 | } 71 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 72 | return 100.0 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /Example/Pods/MJRefresh/MJRefresh/MJRefreshConst.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | #import 4 | #import 5 | 6 | // 弱引用 7 | #define MJWeakSelf __weak typeof(self) weakSelf = self; 8 | 9 | // 日志输出 10 | #ifdef DEBUG 11 | #define MJRefreshLog(...) NSLog(__VA_ARGS__) 12 | #else 13 | #define MJRefreshLog(...) 14 | #endif 15 | 16 | // 过期提醒 17 | #define MJRefreshDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead) 18 | 19 | // 运行时objc_msgSend 20 | #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) 21 | #define MJRefreshMsgTarget(target) (__bridge void *)(target) 22 | 23 | // RGB颜色 24 | #define MJRefreshColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] 25 | 26 | // 文字颜色 27 | #define MJRefreshLabelTextColor MJRefreshColor(90, 90, 90) 28 | 29 | // 字体大小 30 | #define MJRefreshLabelFont [UIFont boldSystemFontOfSize:14] 31 | 32 | // 常量 33 | UIKIT_EXTERN const CGFloat MJRefreshLabelLeftInset; 34 | UIKIT_EXTERN const CGFloat MJRefreshHeaderHeight; 35 | UIKIT_EXTERN const CGFloat MJRefreshFooterHeight; 36 | UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration; 37 | UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration; 38 | 39 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentOffset; 40 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentSize; 41 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentInset; 42 | UIKIT_EXTERN NSString *const MJRefreshKeyPathPanState; 43 | 44 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastUpdatedTimeKey; 45 | 46 | UIKIT_EXTERN NSString *const MJRefreshHeaderIdleText; 47 | UIKIT_EXTERN NSString *const MJRefreshHeaderPullingText; 48 | UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshingText; 49 | 50 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterIdleText; 51 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterRefreshingText; 52 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterNoMoreDataText; 53 | 54 | UIKIT_EXTERN NSString *const MJRefreshBackFooterIdleText; 55 | UIKIT_EXTERN NSString *const MJRefreshBackFooterPullingText; 56 | UIKIT_EXTERN NSString *const MJRefreshBackFooterRefreshingText; 57 | UIKIT_EXTERN NSString *const MJRefreshBackFooterNoMoreDataText; 58 | 59 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastTimeText; 60 | UIKIT_EXTERN NSString *const MJRefreshHeaderDateTodayText; 61 | UIKIT_EXTERN NSString *const MJRefreshHeaderNoneLastDateText; 62 | 63 | // 状态检查 64 | #define MJRefreshCheckState \ 65 | MJRefreshState oldState = self.state; \ 66 | if (state == oldState) return; \ 67 | [super setState:state]; 68 | -------------------------------------------------------------------------------- /OCExample/Pods/MJRefresh/MJRefresh/MJRefreshConst.h: -------------------------------------------------------------------------------- 1 | // 代码地址: https://github.com/CoderMJLee/MJRefresh 2 | // 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 3 | #import 4 | #import 5 | 6 | // 弱引用 7 | #define MJWeakSelf __weak typeof(self) weakSelf = self; 8 | 9 | // 日志输出 10 | #ifdef DEBUG 11 | #define MJRefreshLog(...) NSLog(__VA_ARGS__) 12 | #else 13 | #define MJRefreshLog(...) 14 | #endif 15 | 16 | // 过期提醒 17 | #define MJRefreshDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead) 18 | 19 | // 运行时objc_msgSend 20 | #define MJRefreshMsgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) 21 | #define MJRefreshMsgTarget(target) (__bridge void *)(target) 22 | 23 | // RGB颜色 24 | #define MJRefreshColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] 25 | 26 | // 文字颜色 27 | #define MJRefreshLabelTextColor MJRefreshColor(90, 90, 90) 28 | 29 | // 字体大小 30 | #define MJRefreshLabelFont [UIFont boldSystemFontOfSize:14] 31 | 32 | // 常量 33 | UIKIT_EXTERN const CGFloat MJRefreshLabelLeftInset; 34 | UIKIT_EXTERN const CGFloat MJRefreshHeaderHeight; 35 | UIKIT_EXTERN const CGFloat MJRefreshFooterHeight; 36 | UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration; 37 | UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration; 38 | 39 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentOffset; 40 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentSize; 41 | UIKIT_EXTERN NSString *const MJRefreshKeyPathContentInset; 42 | UIKIT_EXTERN NSString *const MJRefreshKeyPathPanState; 43 | 44 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastUpdatedTimeKey; 45 | 46 | UIKIT_EXTERN NSString *const MJRefreshHeaderIdleText; 47 | UIKIT_EXTERN NSString *const MJRefreshHeaderPullingText; 48 | UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshingText; 49 | 50 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterIdleText; 51 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterRefreshingText; 52 | UIKIT_EXTERN NSString *const MJRefreshAutoFooterNoMoreDataText; 53 | 54 | UIKIT_EXTERN NSString *const MJRefreshBackFooterIdleText; 55 | UIKIT_EXTERN NSString *const MJRefreshBackFooterPullingText; 56 | UIKIT_EXTERN NSString *const MJRefreshBackFooterRefreshingText; 57 | UIKIT_EXTERN NSString *const MJRefreshBackFooterNoMoreDataText; 58 | 59 | UIKIT_EXTERN NSString *const MJRefreshHeaderLastTimeText; 60 | UIKIT_EXTERN NSString *const MJRefreshHeaderDateTodayText; 61 | UIKIT_EXTERN NSString *const MJRefreshHeaderNoneLastDateText; 62 | 63 | // 状态检查 64 | #define MJRefreshCheckState \ 65 | MJRefreshState oldState = self.state; \ 66 | if (state == oldState) return; \ 67 | [super setState:state]; 68 | -------------------------------------------------------------------------------- /OCExample/Pods/Pods.xcodeproj/xcshareddata/xcschemes/LTScrollView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /OCExample/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-OCExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /Example/LTScrollView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // LTScrollView 4 | // 5 | // Created by 1282990794@qq.com on 02/03/2018. 6 | // Copyright (c) 2018 1282990794@qq.com. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | import UIKit 18 | 19 | @UIApplicationMain 20 | class AppDelegate: UIResponder, UIApplicationDelegate { 21 | 22 | var window: UIWindow? 23 | 24 | 25 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 26 | // Override point for customization after application launch. 27 | window?.rootViewController = UINavigationController(rootViewController: ViewController()) 28 | return true 29 | } 30 | 31 | func applicationWillResignActive(_ application: UIApplication) { 32 | // 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. 33 | // 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. 34 | } 35 | 36 | func applicationDidEnterBackground(_ application: UIApplication) { 37 | // 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. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | func applicationWillEnterForeground(_ application: UIApplication) { 42 | // 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. 43 | } 44 | 45 | func applicationDidBecomeActive(_ application: UIApplication) { 46 | // 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. 47 | } 48 | 49 | func applicationWillTerminate(_ application: UIApplication) { 50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 | } 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTFollowMoveView/LTFollowMoveTestView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTFollowMoveTestView.m 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "LTFollowMoveTestView.h" 18 | #import "TestTableViewCell.h" 19 | #import "LTScrollView-Swift.h" 20 | 21 | @interface LTFollowMoveTestView () 22 | @property(strong, nonatomic) UITableView *tableView; 23 | @property(strong, nonatomic) UILabel *titleLabel; 24 | @end 25 | 26 | @implementation LTFollowMoveTestView 27 | 28 | - (instancetype)initWithFrame:(CGRect)frame { 29 | if (self = [super initWithFrame:frame]) { 30 | self.backgroundColor = [UIColor whiteColor]; 31 | [self glt_configSubViews]; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)glt_configSubViews { 37 | self.backgroundColor = [UIColor whiteColor]; 38 | if (@available(iOS 11.0, *)) { 39 | self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 40 | } 41 | [self addSubview:self.titleLabel]; 42 | [self addSubview:self.tableView]; 43 | } 44 | 45 | 46 | - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 47 | return 20; 48 | } 49 | 50 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 51 | TestTableViewCell *cell = [TestTableViewCell cellWithTableView:tableView]; 52 | cell.textLabel.text = [NSString stringWithFormat:@"第 %ld 行", indexPath.row + 1]; 53 | return cell; 54 | } 55 | 56 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 57 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 58 | NSLog(@"第 %ld 行", indexPath.row + 1); 59 | } 60 | 61 | - (UITableView *)tableView { 62 | if (!_tableView) { 63 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, self.frame.size.width, kReturnHeight - 44) style:UITableViewStylePlain]; 64 | _tableView.delegate = self; 65 | _tableView.dataSource = self; 66 | } 67 | return _tableView; 68 | } 69 | 70 | - (UILabel *)titleLabel { 71 | if (!_titleLabel) { 72 | _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 44)]; 73 | _titleLabel.text = @"评论-下拉拖动"; 74 | _titleLabel.textAlignment = NSTextAlignmentCenter; 75 | _titleLabel.backgroundColor = [UIColor greenColor]; 76 | } 77 | return _titleLabel; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTMixPageView/Controller/LTMixPageSimpleChildViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageSimpleChildViewController.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MJRefresh 11 | 12 | class LTMixPageSimpleChildViewController: UIViewController, LTTableViewProtocal { 13 | 14 | private lazy var tableView: UITableView = { 15 | // 如果设置了layout.isHovered = false不悬停 此处Y的值应该从0开始 高度再加上sliderHeight 即: 16 | // let H: CGFloat = glt_iphoneX ? (view.bounds.height - 64 - 24 - 34) : view.bounds.height - 64 17 | // let tableView = tableViewConfig(CGRect(x: 0, y:0, width: view.bounds.width, height: H), self, self, nil) 18 | let H: CGFloat = view.bounds.height - GLT_NAVCHEIGHT - 44 - 44 - GLT_BOTTOMSPACE 19 | let tableView = tableViewConfig(CGRect(x: 0, y:44, width: view.bounds.width, height: H), self, self, nil) 20 | return tableView 21 | }() 22 | 23 | override func viewDidLoad() { 24 | super.viewDidLoad() 25 | view.backgroundColor = UIColor.white 26 | view.addSubview(tableView) 27 | glt_scrollView = tableView 28 | reftreshData() 29 | if #available(iOS 11.0, *) { 30 | glt_scrollView?.contentInsetAdjustmentBehavior = .never 31 | } else { 32 | self.automaticallyAdjustsScrollViewInsets = false 33 | } 34 | } 35 | 36 | deinit { 37 | print("释放了") 38 | } 39 | } 40 | 41 | extension LTMixPageSimpleChildViewController { 42 | fileprivate func reftreshData() { 43 | self.tableView.mj_footer = MJRefreshBackNormalFooter {[weak self] in 44 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: { 45 | print("上拉加载更多数据") 46 | self?.tableView.mj_footer.endRefreshing() 47 | }) 48 | } 49 | } 50 | } 51 | 52 | 53 | extension LTMixPageSimpleChildViewController: UITableViewDelegate, UITableViewDataSource { 54 | 55 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 56 | return 30 57 | } 58 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 59 | let cell = cellWithTableView(tableView) 60 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 61 | return cell 62 | } 63 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 64 | tableView.deselectRow(at: indexPath, animated: true) 65 | print("点击了第\(indexPath.row + 1)行") 66 | } 67 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 68 | return 100.0 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTLivePlayLoopsDemo/LTLivePlayLoopsListDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTLivePlayLoopsListDemo.swift 3 | // LTScrollView_Example 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LTLivePlayLoopsListDemo: UIViewController { 12 | 13 | private lazy var playListView: LTLivePlayLoopsListView = { 14 | let playListView = LTLivePlayLoopsListView(frame: CGRect(x: 0, y: GLT_NAVCHEIGHT, width: GLT_MAINWIDTH, height: GLT_MAINWHEIGHT - GLT_NAVCHEIGHT), content: UILabel.self) 15 | playListView.delegate = self 16 | playListView.dataSource = self 17 | /** 是否开启支持无限轮播 */ 18 | playListView.isCanLoops = true 19 | return playListView 20 | }() 21 | 22 | private lazy var contentView: UIButton = { 23 | let contentView = UIButton(type: .custom) 24 | contentView.frame = CGRect(x: 0, y: 0, width: playListView.glt_width, height: playListView.glt_height) 25 | contentView.setBackgroundImage(UIImage(named: "test"), for: .normal) 26 | contentView.contentMode = .scaleAspectFill 27 | contentView.setTitle("播放器播放视频流...", for: .normal) 28 | contentView.titleLabel?.font = .systemFont(ofSize: 20) 29 | return contentView 30 | }() 31 | 32 | private lazy var dataSource: [String] = { 33 | return ["1", "2", "3", "4", "5"] 34 | }() 35 | 36 | override func viewDidLoad() { 37 | super.viewDidLoad() 38 | view.backgroundColor = .white 39 | view.addSubview(playListView) 40 | 41 | playListView.currentIndex = 2 42 | playListView.reloadData() 43 | 44 | /** 45 | loopsList.currentIndex = 2 46 | loopsList.reloadData() 47 | 等价 48 | loopsList.reloadData() 49 | loopsList.scrollTo(index: 2) 50 | */ 51 | } 52 | } 53 | 54 | extension LTLivePlayLoopsListDemo: LTLivePlayLoopsListDelegate, LTLivePlayLoopsListDataSource { 55 | 56 | func didSelect(livePlayView: LTLivePlayLoopsListView, inView: UIView, index: Int) { 57 | print("当前加载 - \(dataSource[index])") 58 | inView.addSubview(contentView) 59 | } 60 | 61 | func prefetch(livePlayView: LTLivePlayLoopsListView, inView: UIView, index: Int) { 62 | print("预加载 - \(dataSource[index])") 63 | let contentLabel = inView as! UILabel 64 | contentLabel.text = "第\(dataSource[index])个item(此处可放置预览视图)" 65 | contentLabel.backgroundColor = .green 66 | contentLabel.font = .systemFont(ofSize: 24) 67 | contentLabel.textAlignment = .center 68 | } 69 | 70 | func numberofItems(livePlayView: LTLivePlayLoopsListView) -> Int { 71 | return dataSource.count 72 | } 73 | 74 | func checkCanScroll() -> Bool { 75 | return true 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTSimple/Controller/LTSimpleTestOneVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTSimpleTestOneVC.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2017/11/27. 6 | // Copyright © 2017年 LT. All rights reserved. 7 | // 8 | // 9 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 10 | // 11 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 12 | // 13 | // github地址: https://github.com/gltwy/LTScrollView 14 | // 15 | // clone地址: https://github.com/gltwy/LTScrollView.git 16 | // 17 | 18 | import UIKit 19 | import MJRefresh 20 | 21 | class LTSimpleTestOneVC: UIViewController, LTTableViewProtocal { 22 | 23 | private lazy var tableView: UITableView = { 24 | // 如果设置了layout.isHovered = false不悬停 此处Y的值应该从0开始 高度再加上sliderHeight 即: 25 | // let H: CGFloat = glt_iphoneX ? (view.bounds.height - 64 - 24 - 34) : view.bounds.height - 64 26 | // let tableView = tableViewConfig(CGRect(x: 0, y:0, width: view.bounds.width, height: H), self, self, nil) 27 | let H: CGFloat = view.bounds.height - GLT_NAVCHEIGHT - 44 28 | let tableView = tableViewConfig(CGRect(x: 0, y:44, width: view.bounds.width, height: H), self, self, nil) 29 | return tableView 30 | }() 31 | 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | view.backgroundColor = UIColor.white 35 | view.addSubview(tableView) 36 | glt_scrollView = tableView 37 | reftreshData() 38 | if #available(iOS 11.0, *) { 39 | glt_scrollView?.contentInsetAdjustmentBehavior = .never 40 | } else { 41 | self.automaticallyAdjustsScrollViewInsets = false 42 | } 43 | } 44 | 45 | deinit { 46 | print("释放了") 47 | } 48 | } 49 | 50 | extension LTSimpleTestOneVC { 51 | fileprivate func reftreshData() { 52 | self.tableView.mj_footer = MJRefreshBackNormalFooter {[weak self] in 53 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: { 54 | print("上拉加载更多数据") 55 | self?.tableView.mj_footer.endRefreshing() 56 | }) 57 | } 58 | } 59 | } 60 | 61 | 62 | extension LTSimpleTestOneVC: UITableViewDelegate, UITableViewDataSource { 63 | 64 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 65 | return 20 66 | } 67 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 68 | let cell = cellWithTableView(tableView) 69 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 70 | return cell 71 | } 72 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 73 | tableView.deselectRow(at: indexPath, animated: true) 74 | print("点击了第\(indexPath.row + 1)行") 75 | } 76 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 77 | return 100.0 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTSimple/LTSimpleTestOneVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTSimpleTestOneVC.m 3 | // OCExample 4 | // 5 | // Created by 高刘通 on 2018/4/18. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "LTSimpleTestOneVC.h" 18 | #import "TestTableViewCell.h" 19 | #import "MJRefresh.h" 20 | #import "LTScrollView-Swift.h" 21 | 22 | #define kIPhoneX ([UIScreen mainScreen].bounds.size.height >= 812.0) 23 | 24 | @interface LTSimpleTestOneVC () 25 | 26 | @property(strong, nonatomic) UITableView *tableView; 27 | 28 | @end 29 | 30 | @implementation LTSimpleTestOneVC 31 | 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | // Do any additional setup after loading the view, typically from a nib. 35 | self.view.backgroundColor = [UIColor whiteColor]; 36 | if (@available(iOS 11.0, *)) { 37 | self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 38 | } else { 39 | self.automaticallyAdjustsScrollViewInsets = NO; 40 | } 41 | [self.view addSubview:self.tableView]; 42 | 43 | #warning 重要 必须赋值 44 | self.glt_scrollView = self.tableView; 45 | 46 | __weak typeof(self) weakSelf = self; 47 | self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ 48 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 49 | [weakSelf.tableView.mj_footer endRefreshing]; 50 | }); 51 | }]; 52 | 53 | } 54 | 55 | 56 | - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 57 | return 20; 58 | } 59 | 60 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 61 | TestTableViewCell *cell = [TestTableViewCell cellWithTableView:tableView]; 62 | cell.textLabel.text = [NSString stringWithFormat:@"第 %ld 行", indexPath.row + 1]; 63 | return cell; 64 | } 65 | 66 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 67 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 68 | NSLog(@"第 %ld 行", indexPath.row + 1); 69 | } 70 | 71 | - (UITableView *)tableView { 72 | if (!_tableView) { 73 | CGFloat H = kIPhoneX ? (self.view.bounds.size.height - 44 - 64 - 24 - 34) : self.view.bounds.size.height - 44 - 64; 74 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, [UIScreen mainScreen].bounds.size.width, H) style:UITableViewStylePlain]; 75 | _tableView.delegate = self; 76 | _tableView.dataSource = self; 77 | } 78 | return _tableView; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTPageView/Controller/LTPageViewTestOneVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTPageViewTestOneVC.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | import UIKit 18 | import MJRefresh 19 | 20 | class LTPageViewTestOneVC: UIViewController, LTTableViewProtocal { 21 | 22 | private lazy var tableView: UITableView = {//80为两个titleview的高 23 | let tableView = tableViewConfig(CGRect(x: 0, y: 0, width: GLT_MAINWIDTH, height: GLT_MAINWHEIGHT - 80 - GLT_NAVCHEIGHT - GLT_BOTTOMSPACE), self, self, nil) 24 | return tableView 25 | }() 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | view.backgroundColor = UIColor.white 30 | view.addSubview(tableView) 31 | glt_scrollView = tableView 32 | reftreshData() 33 | if #available(iOS 11.0, *) { 34 | tableView.contentInsetAdjustmentBehavior = .never 35 | } else { 36 | automaticallyAdjustsScrollViewInsets = false 37 | } 38 | } 39 | 40 | deinit { 41 | print("LTPageViewTestOneVC释放了") 42 | } 43 | } 44 | 45 | extension LTPageViewTestOneVC { 46 | 47 | fileprivate func reftreshData() { 48 | 49 | tableView.mj_footer = MJRefreshBackNormalFooter {[weak self] in 50 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { 51 | print("上拉加载更多数据") 52 | self?.tableView.mj_footer.endRefreshing() 53 | }) 54 | } 55 | tableView.mj_header = MJRefreshNormalHeader {[weak self] in 56 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { 57 | print("下拉刷新 --- 1") 58 | self?.tableView.mj_header.endRefreshing() 59 | }) 60 | } 61 | 62 | } 63 | } 64 | 65 | 66 | extension LTPageViewTestOneVC: UITableViewDelegate, UITableViewDataSource { 67 | 68 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 69 | return 50 70 | } 71 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 72 | let cell = cellWithTableView(tableView) 73 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 74 | return cell 75 | } 76 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 77 | tableView.deselectRow(at: indexPath, animated: true) 78 | print("点击了第\(indexPath.row + 1)行") 79 | } 80 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 81 | return 100.0 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTMixPageView/LTMixPageSimpleChildViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTMixPageSimpleChildViewController.m 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/5. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | #import "LTMixPageSimpleChildViewController.h" 18 | #import "TestTableViewCell.h" 19 | #import "MJRefresh.h" 20 | #import "LTScrollView-Swift.h" 21 | 22 | #define kIPhoneX ([UIScreen mainScreen].bounds.size.height >= 812.0) 23 | 24 | @interface LTMixPageSimpleChildViewController () 25 | 26 | @property(strong, nonatomic) UITableView *tableView; 27 | 28 | @end 29 | 30 | @implementation LTMixPageSimpleChildViewController 31 | 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | // Do any additional setup after loading the view, typically from a nib. 35 | self.view.backgroundColor = [UIColor whiteColor]; 36 | if (@available(iOS 11.0, *)) { 37 | self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; 38 | } else { 39 | self.automaticallyAdjustsScrollViewInsets = NO; 40 | } 41 | [self.view addSubview:self.tableView]; 42 | 43 | #warning 重要 必须赋值 44 | self.glt_scrollView = self.tableView; 45 | 46 | __weak typeof(self) weakSelf = self; 47 | self.tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{ 48 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 49 | [weakSelf.tableView.mj_footer endRefreshing]; 50 | }); 51 | }]; 52 | 53 | } 54 | 55 | 56 | - (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 57 | return 20; 58 | } 59 | 60 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 61 | TestTableViewCell *cell = [TestTableViewCell cellWithTableView:tableView]; 62 | cell.textLabel.text = [NSString stringWithFormat:@"第 %ld 行", indexPath.row + 1]; 63 | return cell; 64 | } 65 | 66 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 67 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 68 | NSLog(@"第 %ld 行", indexPath.row + 1); 69 | } 70 | 71 | - (UITableView *)tableView { 72 | if (!_tableView) { 73 | CGFloat H = kIPhoneX ? (self.view.bounds.size.height - 44 - 64 - 24 - 34) : self.view.bounds.size.height - 44 - 64; 74 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, [UIScreen mainScreen].bounds.size.width, H - 44) style:UITableViewStylePlain]; 75 | _tableView.delegate = self; 76 | _tableView.dataSource = self; 77 | } 78 | return _tableView; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Example/LTScrollView/Demo/LTAdvanced/Controller/LTAdvancedTestOneVC.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTAdvancedTestOneVC.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 CocoaPods. All rights reserved. 7 | // 8 | // 如有疑问,请搜索并关注微信公众号"技术大咖社"并留言即可 9 | // 10 | // ScrollView嵌套ScrolloView解决方案(初级、进阶), 支持OC/Swift 11 | // 12 | // github地址: https://github.com/gltwy/LTScrollView 13 | // 14 | // clone地址: https://github.com/gltwy/LTScrollView.git 15 | // 16 | 17 | import UIKit 18 | import MJRefresh 19 | 20 | class LTAdvancedTestOneVC: UIViewController, LTTableViewProtocal { 21 | 22 | var count = 20 23 | 24 | private lazy var tableView: UITableView = { 25 | let H: CGFloat = glt_iphoneX ? (view.bounds.height - GLT_NAVCHEIGHT - 34) : view.bounds.height - 64 26 | let tableView = tableViewConfig(CGRect(x: 0, y: 0, width: view.bounds.width, height: H), self, self, nil) 27 | return tableView 28 | }() 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | view.backgroundColor = UIColor.white 33 | view.addSubview(tableView) 34 | glt_scrollView = tableView 35 | reftreshData() 36 | if #available(iOS 11.0, *) { 37 | tableView.contentInsetAdjustmentBehavior = .never 38 | } else { 39 | automaticallyAdjustsScrollViewInsets = false 40 | } 41 | } 42 | 43 | deinit { 44 | print("LTAdvancedTestOneVC - deinit") 45 | } 46 | } 47 | 48 | extension LTAdvancedTestOneVC { 49 | 50 | fileprivate func reftreshData() { 51 | 52 | tableView.mj_footer = MJRefreshBackNormalFooter {[weak self] in 53 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { 54 | print("上拉加载更多数据") 55 | self?.tableView.mj_footer.endRefreshing() 56 | }) 57 | } 58 | tableView.mj_header = MJRefreshNormalHeader {[weak self] in 59 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { 60 | print("下拉刷新 --- 1") 61 | self?.tableView.mj_header.endRefreshing() 62 | }) 63 | } 64 | 65 | } 66 | } 67 | 68 | 69 | extension LTAdvancedTestOneVC: UITableViewDelegate, UITableViewDataSource { 70 | 71 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 72 | return count 73 | } 74 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 75 | let cell = cellWithTableView(tableView) 76 | cell.textLabel?.text = "第 \(indexPath.row + 1) 行" 77 | return cell 78 | } 79 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 80 | tableView.deselectRow(at: indexPath, animated: true) 81 | print("点击了第\(indexPath.row + 1)行") 82 | } 83 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 84 | return 60.0 85 | } 86 | } 87 | 88 | -------------------------------------------------------------------------------- /Example/LTScrollView/Lib/Main/LTExtension/LTScrollExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LTScrollExtension.swift 3 | // LTScrollView 4 | // 5 | // Created by 高刘通 on 2018/2/3. 6 | // Copyright © 2018年 LT. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIScrollView { 13 | 14 | public typealias LTScrollHandle = (UIScrollView) -> Void 15 | 16 | private struct LTHandleKey { 17 | static var key = "glt_handle" 18 | static var tKey = "glt_isTableViewPlain" 19 | } 20 | 21 | public var scrollHandle: LTScrollHandle? { 22 | get { return objc_getAssociatedObject(self, <HandleKey.key) as? LTScrollHandle } 23 | set { objc_setAssociatedObject(self, <HandleKey.key, newValue, .OBJC_ASSOCIATION_COPY_NONATOMIC) } 24 | } 25 | 26 | @objc public var isTableViewPlain: Bool { 27 | get { return (objc_getAssociatedObject(self, <HandleKey.tKey) as? Bool) ?? false} 28 | set { objc_setAssociatedObject(self, <HandleKey.tKey, newValue, .OBJC_ASSOCIATION_ASSIGN) } 29 | } 30 | } 31 | 32 | extension String { 33 | func glt_base64Decoding() -> String { 34 | let decodeData = NSData.init(base64Encoded: self, options: NSData.Base64DecodingOptions.init(rawValue: 0)) 35 | if decodeData == nil || decodeData?.length == 0 { 36 | return ""; 37 | } 38 | let decodeString = NSString(data: decodeData! as Data, encoding: String.Encoding.utf8.rawValue) 39 | return decodeString! as String 40 | } 41 | } 42 | 43 | extension UIScrollView { 44 | 45 | public class func initializeOnce() { 46 | DispatchQueue.once(token: UIDevice.current.identifierForVendor?.uuidString ?? "LTScrollView") { 47 | let didScroll = "X25vdGlmeURpZFNjcm9sbA==".glt_base64Decoding() 48 | let originSelector = Selector((didScroll)) 49 | let swizzleSelector = #selector(glt_scrollViewDidScroll) 50 | glt_swizzleMethod(self, originSelector, swizzleSelector) 51 | } 52 | } 53 | 54 | @objc dynamic func glt_scrollViewDidScroll() { 55 | self.glt_scrollViewDidScroll() 56 | guard let scrollHandle = scrollHandle else { return } 57 | scrollHandle(self) 58 | } 59 | } 60 | 61 | extension NSObject { 62 | 63 | static func glt_swizzleMethod(_ cls: AnyClass?, _ originSelector: Selector, _ swizzleSelector: Selector) { 64 | let originMethod = class_getInstanceMethod(cls, originSelector) 65 | let swizzleMethod = class_getInstanceMethod(cls, swizzleSelector) 66 | guard let swMethod = swizzleMethod, let oMethod = originMethod else { return } 67 | let didAddSuccess: Bool = class_addMethod(cls, originSelector, method_getImplementation(swMethod), method_getTypeEncoding(swMethod)) 68 | if didAddSuccess { 69 | class_replaceMethod(cls, swizzleSelector, method_getImplementation(oMethod), method_getTypeEncoding(oMethod)) 70 | } else { 71 | method_exchangeImplementations(oMethod, swMethod) 72 | } 73 | } 74 | } 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /OCExample/OCExample/LTPageView/Controller/LTCustomTitleItemView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LTCustomTitleItemView.m 3 | // OCExample 4 | // 5 | // Created by gaoliutong on 2022/3/11. 6 | // Copyright © 2022 LT. All rights reserved. 7 | // 8 | 9 | #import "LTCustomTitleItemView.h" 10 | #import "LTScrollView-Swift.h" 11 | 12 | /** 13 | 实现步骤: 14 | 1. 指定itemViewClass: 15 | LTPageView *pageView = [[LTPageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, H) currentViewController:self viewControllers:viewControllers titles:titles layout:layout itemViewClass:[LTCustomTitleItemView class]]; 16 | 17 | 2. 指定的itemViewClass需要遵守LTPageTitleItemType协议 18 | 19 | 3. 实现指定的协议方法即可 20 | */ 21 | 22 | @interface LTCustomTitleItemView() 23 | @property(strong, nonatomic) UIImageView *backgroundImageView; 24 | @property(strong, nonatomic) UIView *badgeView; 25 | @end 26 | 27 | @implementation LTCustomTitleItemView 28 | @synthesize glt_index = _glt_index; 29 | 30 | - (instancetype)initWithFrame:(CGRect)frame { 31 | if (self = [super initWithFrame:frame]) { 32 | [self insertSubview:self.backgroundImageView atIndex:0]; 33 | [self addSubview:self.badgeView]; 34 | } 35 | return self; 36 | } 37 | 38 | - (void)glt_setSelected:(BOOL)isSelected { 39 | 40 | /// 修改背景颜色使用示例 41 | if (_glt_index % 2 == 0) { 42 | self.backgroundColor = isSelected ? [UIColor orangeColor] : [UIColor blueColor]; 43 | }else { 44 | self.backgroundColor = isSelected ? [UIColor greenColor] : [UIColor yellowColor]; 45 | } 46 | 47 | /// 设置背景图使用示例 48 | _backgroundImageView.hidden = _glt_index != 0; 49 | 50 | ///选中1的时候隐藏使用示例 51 | _badgeView.hidden = _glt_index != 1 || isSelected; 52 | 53 | /// 设置富文本使用示例 54 | if (_glt_index == 2) { 55 | NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:self.titleLabel.text]; 56 | [attr setAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18], NSForegroundColorAttributeName:[UIColor redColor]} range:NSMakeRange(0, 1)]; 57 | [attr setAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10], NSForegroundColorAttributeName:[UIColor blueColor]} range:NSMakeRange(1, 1)]; 58 | self.titleLabel.attributedText = attr; 59 | } 60 | 61 | ///设置标题偏移使用示例 62 | if (_glt_index == 3) { 63 | self.titleEdgeInsets = UIEdgeInsetsMake(0, 0, -10, 0); 64 | } 65 | } 66 | 67 | - (void)glt_layoutSubviews { 68 | self.backgroundImageView.frame = self.bounds; 69 | self.badgeView.frame = CGRectMake(self.frame.size.width - 15, 5, 10, 10); 70 | } 71 | 72 | - (UIImageView *)backgroundImageView { 73 | if (!_backgroundImageView) { 74 | _backgroundImageView = [UIImageView new]; 75 | _backgroundImageView.image = [UIImage imageNamed:@"test"]; 76 | } 77 | return _backgroundImageView; 78 | } 79 | 80 | - (UIView *)badgeView { 81 | if (!_badgeView) { 82 | _badgeView = [UIView new]; 83 | _badgeView.backgroundColor = [UIColor redColor]; 84 | } 85 | return _badgeView; 86 | } 87 | 88 | - (void)dealloc { 89 | NSLog(@"LTCustomTitleItemView - dealloc"); 90 | } 91 | 92 | @end 93 | --------------------------------------------------------------------------------