3 Star 0 Fork 1

Gitee 极速下载 / ltscrollview

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/gltwy/LTScrollView
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

LTScrollView

实现原理: http://blog.csdn.net/glt_code/article/details/78576628

CI Status Version License Platform

image

Demo文件路径以及说明

  • LTScrollView / Example : 为 Swift 使用示例.
  • LTScrollView / OCExample : 为 OC 使用示例.
  • 支持的子View为UIScrollView、UICollectionView、UITableView.
  • 无限轮播 + 拖动移动

CocoaPods安装

安装CocoaPods 使用以下命令:

$ gem install cocoapods

Podfile

在你的 Podfile中添加LTScrollView

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

target 'TargetName' do
# 注意此处需要添加use_frameworks!
use_frameworks!

# 当前最新版本 - 2023-09-01
pod 'LTScrollView', '~> 0.4.5'

# 无限轮播框架 + 预加载子组件
#pod 'LTScrollView/LTLoopsPlay'

# 跟随拖动移动子组件
#pod 'LTScrollView/LTFollowMove'

end

然后,使用以下命令安装

$ pod install

提示错误 [!] Unable to find a specification for LTScrollView 解决办法:

$ pod repo remove master
$ pod setup

Swift使用说明

Swift.LTSimple使用说明

  1. 创建LTSimpleManager实例对象
@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout)
  1. 设置headerView
@objc public func configHeaderView(_ handle: (() -> UIView?)?)
  1. 子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableViewself.scrollView / self.collectionView
  1. 更多使用说明请参考Demo(LTScrollView / Example)

Swift.LTAdvanced使用说明

  1. 创建LTAdvancedManager实例对象、并设置headerView
@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout, headerViewHandle handle: () -> UIView)
  1. 子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableViewself.scrollView / self.collectionView
  1. 更多使用说明请参考Demo(LTScrollView / Example)

OC使用说明

OC.LTSimple使用说明

  1. 创建LTSimpleManager实例对象
[[LTSimpleManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles currentViewController:self layout:self.layout]
  1. 设置headerView
[self.managerView configHeaderView:^UIView * _Nullable{ }]
  1. 子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableViewself.scrollView / self.collectionView
  1. 更多使用说明请参考Demo(LTScrollView / OCExample)

OC.LTAdvanced使用说明

  1. 创建LTAdvancedManager实例对象、并设置headerView
 [[LTAdvancedManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles currentViewController:self layout:self.layout headerViewHandle:^UIView * _Nonnull{}]
  1. 子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableViewself.scrollView / self.collectionView
  1. 更多使用说明请参考Demo(LTScrollView / OCExample)

LTLayout属性说明

详情查看LTLayout.swift

更新说明

2022.09.01 - 0.4.5

1. 标题刷新
2. 修复已知Bug

2022.03.13 - 0.4.4

1. 自定义标题模块修改
2. 修复进阶版部分机型小数导致无法悬停问题

2022.03.05 - 0.4.3

1. 新增嵌套混合视图的切换(支持悬停+左右切换)
2. 新增无限轮播+预加载视图框架
3. 新增跟随拖动隐藏视图框架

建议所有用户都升级~

2021.11.20 - 0.4.2

1. 完美适配iOS15
2. 修复OC不能自定义标题的Bug
3. 修复进阶版无法滚动到指定位置的Bug
4. 完善OC Demo的使用示例
5. 修复部分开发者使用中反馈的问题

建议所有用户都升级~

2020.08.22 - 0.3.0

1. 兼容Swift5
2. 新增自定义标题功能, 任意样式随你设置
3. 修复子控制器不释放Bug
4. 优化内部实现、修复已知问题、性能更佳

目前仅优化了除LTAdvancedManager以外的其他功能,LTAdvancedManager近期优化!

2018.09.16 - 0.2.0

新增自定义选项卡

2018.09.02 - 0.1.9

1. 修修复LTAdvancedManager子控制为CollectionView时的Bug
2. 解决issue中的部分问题

2018.07.29 - 0.1.8

1. 新增LTLayout中关闭左右滑动的属性isScrollEnabled
2. 修复LTAdvancedManager数据较少时切换Bug
3. 解决issue中的部分问题

2018.06.30 - 0.1.7

1. 修复LTAdvancedManager数据较少时,其他子控制器自动下落Bug
2. 解决issue中的部分问题
3. 优化内部实现

Author

License

LTScrollView is available under the MIT license. See the LICENSE file for more info.

Copyright (c) 2017 1282990794@qq.com <1282990794@qq.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

ScrollView 嵌套 ScrolloView(UITableView 、UICollectionView)解决方案, 支持OC / Swift 展开 收起
Swift 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Swift
1
https://gitee.com/mirrors/ltscrollview.git
git@gitee.com:mirrors/ltscrollview.git
mirrors
ltscrollview
ltscrollview
master

搜索帮助