GithubHelp home page GithubHelp logo

xiaoojun / ltscrollview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gltwy/ltscrollview

0.0 1.0 0.0 11.27 MB

ScrollView嵌套ScrolloView(UITableView 、UICollectionView)解决方案, 支持OC / Swift(持续更新中...)实现原理:http://blog.csdn.net/glt_code/article/details/78576628

License: MIT License

Swift 70.72% Ruby 0.69% Objective-C 28.53% C 0.06%

ltscrollview's Introduction

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, '8.0'

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

pod 'LTScrollView', '~> 0.2.0'
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.tableView(self.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.tableView(self.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.tableView(self.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.tableView(self.scrollView / self.collectionView)
  1. 更多使用说明请参考Demo(LTScrollView / OCExample)

LTLayout属性说明

详情查看LTLayout.swift

更新说明

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.

ltscrollview's People

Contributors

gltwy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.