{"id":15027616,"url":"https://github.com/glthello/LTScrollView","last_synced_at":"2026-05-10T00:30:14.862Z","repository":{"id":44430884,"uuid":"110937763","full_name":"gltwy/LTScrollView","owner":"gltwy","description":"ScrollView嵌套ScrolloView（UITableView 、UICollectionView）解决方案， 支持OC / Swift（持续更新中...）实现原理：http://blog.csdn.net/glt_code/article/details/78576628","archived":false,"fork":false,"pushed_at":"2023-09-05T10:04:38.000Z","size":11674,"stargazers_count":1043,"open_issues_count":5,"forks_count":204,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-14T11:03:10.696Z","etag":null,"topics":["scrollview","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gltwy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-16T07:23:54.000Z","updated_at":"2024-09-10T13:21:25.000Z","dependencies_parsed_at":"2022-07-29T01:18:19.446Z","dependency_job_id":"65d91f5c-e2a4-4d09-95cc-86b68a795565","html_url":"https://github.com/gltwy/LTScrollView","commit_stats":{"total_commits":124,"total_committers":3,"mean_commits":"41.333333333333336","dds":0.08870967741935487,"last_synced_commit":"adb36fc2c8c20fe426b073b62841bf72f23f4e70"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gltwy%2FLTScrollView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gltwy%2FLTScrollView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gltwy%2FLTScrollView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gltwy%2FLTScrollView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gltwy","download_url":"https://codeload.github.com/gltwy/LTScrollView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219847440,"owners_count":16556385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scrollview","swift"],"created_at":"2024-09-24T20:06:47.311Z","updated_at":"2026-05-10T00:30:14.771Z","avatar_url":"https://github.com/gltwy.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LTScrollView\n\n实现原理： [http://blog.csdn.net/glt_code/article/details/78576628](http://blog.csdn.net/glt_code/article/details/78576628)\n\n[![CI Status](http://img.shields.io/travis/1282990794@qq.com/LTScrollView.svg?style=flat)](https://travis-ci.org/1282990794@qq.com/LTScrollView)\n[![Version](https://img.shields.io/cocoapods/v/LTScrollView.svg?style=flat)](http://cocoapods.org/pods/LTScrollView)\n[![License](https://img.shields.io/cocoapods/l/LTScrollView.svg?style=flat)](http://cocoapods.org/pods/LTScrollView)\n[![Platform](https://img.shields.io/cocoapods/p/LTScrollView.svg?style=flat)](http://cocoapods.org/pods/LTScrollView)\n\n![image](https://github.com/gltwy/LTScrollView/blob/master/demo.gif)\n\n## Demo文件路径以及说明\n\n- LTScrollView / Example : 为 Swift 使用示例.\n- LTScrollView / OCExample : 为 OC 使用示例.\n- 支持的子View为UIScrollView、UICollectionView、UITableView.\n- 无限轮播 + 拖动移动\n\n## CocoaPods安装\n\n安装[CocoaPods](http://cocoapods.org) 使用以下命令：\n\n```bash\n$ gem install cocoapods\n```\n\n### Podfile\n\n在你的 `Podfile`中添加LTScrollView\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '11.0'\n\ntarget 'TargetName' do\n# 注意此处需要添加use_frameworks!\nuse_frameworks!\n\n# 当前最新版本 - 2023-09-01\npod 'LTScrollView', '~\u003e 0.4.5'\n\n# 无限轮播框架 + 预加载子组件\n#pod 'LTScrollView/LTLoopsPlay'\n\n# 跟随拖动移动子组件\n#pod 'LTScrollView/LTFollowMove'\n\nend\n```\n\n然后，使用以下命令安装\n\n```bash\n$ pod install\n```\n\n提示错误 `[!] Unable to find a specification for LTScrollView ` 解决办法：\n\n```\n$ pod repo remove master\n$ pod setup\n```\n\n## Swift使用说明\n\n### Swift.LTSimple使用说明\n\n1. 创建LTSimpleManager实例对象\n```objective-c\n@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout)\n```\n2. 设置headerView\n```objective-c\n@objc public func configHeaderView(_ handle: (() -\u003e UIView?)?)\n```\n3. 子控制器中glt_scrollView进行赋值\n```objective-c\nself.glt_scrollView = self.tableView（self.scrollView / self.collectionView）\n```\n4. 更多使用说明请参考Demo（LTScrollView / Example）\n\n\n### Swift.LTAdvanced使用说明\n\n1. 创建LTAdvancedManager实例对象、并设置headerView\n```objective-c\n@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout, headerViewHandle handle: () -\u003e UIView)\n```\n2. 子控制器中glt_scrollView进行赋值\n```objective-c\nself.glt_scrollView = self.tableView（self.scrollView / self.collectionView）\n```\n3. 更多使用说明请参考Demo（LTScrollView / Example）\n\n## OC使用说明\n\n### OC.LTSimple使用说明\n1. 创建LTSimpleManager实例对象\n```objective-c\n[[LTSimpleManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles currentViewController:self layout:self.layout]\n```\n2. 设置headerView\n```objective-c\n[self.managerView configHeaderView:^UIView * _Nullable{ }]\n```\n3. 子控制器中glt_scrollView进行赋值\n```objective-c\nself.glt_scrollView = self.tableView（self.scrollView / self.collectionView）\n```\n4. 更多使用说明请参考Demo（LTScrollView / OCExample）\n\n### OC.LTAdvanced使用说明\n1. 创建LTAdvancedManager实例对象、并设置headerView\n```objective-c\n [[LTAdvancedManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles currentViewController:self layout:self.layout headerViewHandle:^UIView * _Nonnull{}]\n```\n2. 子控制器中glt_scrollView进行赋值\n```objective-c\nself.glt_scrollView = self.tableView（self.scrollView / self.collectionView）\n```\n3. 更多使用说明请参考Demo（LTScrollView / OCExample）\n\n## LTLayout属性说明\n详情查看[LTLayout.swift](https://github.com/gltwy/LTScrollView/blob/master/Example/LTScrollView/Lib/LTLayout.swift)\n\n## 更新说明\n\n2022.09.01 - 0.4.5\n```objective-c\n1. 标题刷新\n2. 修复已知Bug\n```\n\n2022.03.13 - 0.4.4\n```objective-c\n1. 自定义标题模块修改\n2. 修复进阶版部分机型小数导致无法悬停问题\n```\n\n2022.03.05 - 0.4.3\n```objective-c\n1. 新增嵌套混合视图的切换（支持悬停+左右切换）\n2. 新增无限轮播+预加载视图框架\n3. 新增跟随拖动隐藏视图框架\n\n建议所有用户都升级～\n```\n\n2021.11.20 - 0.4.2\n```objective-c\n1. 完美适配iOS15\n2. 修复OC不能自定义标题的Bug\n3. 修复进阶版无法滚动到指定位置的Bug\n4. 完善OC Demo的使用示例\n5. 修复部分开发者使用中反馈的问题\n\n建议所有用户都升级～\n```\n\n2020.08.22 - 0.3.0\n```objective-c\n1. 兼容Swift5\n2. 新增自定义标题功能, 任意样式随你设置\n3. 修复子控制器不释放Bug\n4. 优化内部实现、修复已知问题、性能更佳\n\n目前仅优化了除LTAdvancedManager以外的其他功能，LTAdvancedManager近期优化！\n```\n\n2018.09.16 - 0.2.0\n```objective-c\n新增自定义选项卡\n```\n\n2018.09.02 - 0.1.9\n```objective-c\n1. 修修复LTAdvancedManager子控制为CollectionView时的Bug\n2. 解决issue中的部分问题\n```\n\n2018.07.29 - 0.1.8\n```objective-c\n1. 新增LTLayout中关闭左右滑动的属性isScrollEnabled\n2. 修复LTAdvancedManager数据较少时切换Bug\n3. 解决issue中的部分问题\n```\n\n2018.06.30 - 0.1.7\n```objective-c\n1. 修复LTAdvancedManager数据较少时，其他子控制器自动下落Bug\n2. 解决issue中的部分问题\n3. 优化内部实现\n```\n\n## Author\n- 微信公众号:  [iOS云笔记](https://mp.weixin.qq.com/mp/profile_ext?action=home\u0026__biz=Mzg4OTYwMTc3NQ==#wechat_redirect)（如有任何疑问、均可在公众号内留言）\n- -Blog:  https://blog.csdn.net/glt_code\n\n## License\n\nLTScrollView is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglthello%2FLTScrollView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglthello%2FLTScrollView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglthello%2FLTScrollView/lists"}