今天介绍一个IOS的轮播控件FSPagerView。
FSPagerView是一个优雅的轮播控件,它可以十分轻松有效地制作轮播视图、产品展示、欢迎/指南页面。
先上地址——Swift: https://github.com/WenchaoD/FSPagerView
OC: https://github.com/WenchaoD/FSPagerView/blob/master/README-OBJECTIVE-C.md
Cocoapods集成方式—— pod 'FSPagerView'
下载完成后导入FSPagerView:
import FSPagerView
初次导入时XCode会报错找不到项目,只要Build一下即可消除错误
使用方法—— 1.懒加载获取FSPagerView和FSPageControl的实例,在闭包中设置各个属性
FSPagerView是轮播视图类,FSPageControl是下标指示器类
lazy var viewPager: FSPagerView = {
let viewPager = FSPagerView()
viewPager.frame = frame1