a1_651858
注册时间:2022-03-30 08:38:23
Ta的资源
LT滚动视图
作者gltwy,代码LTScrollView-master,LTScrollView-master能够无限滚动,可以设定视图出现的数量,总数量,实现无限滚动。通过协议方法和数据源定制自己的滚动视图。
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.1.7'
end
然后,使用以下命令安装
$ pod install
提示错误 [!] Unable to find a specification for LTScrollView 解决办法:
$ pod repo remove master
$ pod setup
Swift使用说明
Swift.LTSimple使用说明
创建LTSimpleManager实例对象
@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout)
设置headerView
@objc public func configHeaderView(_ handle: (() -> UIView?)?)
子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableView(self.scrollView / self.collectionView)
更多使用说明请参考Demo(LTScrollView / Example)
Swift.LTAdvanced使用说明
创建LTAdvancedManager实例对象、并设置headerView
@objc public init(frame: CGRect, viewControllers: [UIViewController], titles: [String], currentViewController:UIViewController, layout: LTLayout, headerViewHandle handle: () -> UIView)
子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableView(self.scrollView / self.collectionView)
更多使用说明请参考Demo(LTScrollView / Example)
OC使用说明
OC.LTSimple使用说明
创建LTSimpleManager实例对象
[[LTSimpleManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles currentViewController:self layout:self.layout]
设置headerView
[self.managerView configHeaderView:^UIView * _Nullable{ }]
子控制器中glt_scrollView进行赋值
self.glt_scrollView = self.tableView(self.scrollView / self.collectionView)
更多使用说明请参考Demo(LTScrollView / OCExample)
OC.LTAdvanced使用说明
创建LTAdvancedManager实例对象、并设置headerView
[[LTAdvancedManager alloc] initWithFrame:frame viewControllers:self.viewControllers titles:self.titles
开发工具:
大小:1.6MB
2022-06-14 01:22:26上传