TabPageViewController
描述
TabPageViewController 是分页视图控制器和滚动标签视图。
屏幕截图
无限模式
有限模式
自定义
使用 TabPageOption
- 标签项目字体大小
fontSize: CGFloat
- 当前标签项目颜色
currentColor: UIColor
- 默认标签项目颜色
defaultColor: UIColor
- 标签视图高度
tabHeight: CGFloat
- 标签项目间距
tabMargin: CGFloat
- 标签视图背景颜色
tabBackgroundColor: UIColor
- 当前栏高
currentBarHeight: CGFloat
- 标签页面视图控制器背景颜色
pageBackgoundColor: UIColor
- 标签视图和导航栏透明
isTranslucent: Bool
- 滑动时隐藏标签栏
hidesTabBarOnSwipe: Bool
用法
在文件中引入 import TabPageViewController
以使用 TabPageViewController。
示例
let tabPageViewController = TabPageViewController.create()
let vc1 = UIViewController()
let vc2 = UIViewController()
tabPageViewController.tabItems = [(vc1, "First"), (vc2, "Second")]
TabPageOption.currentColor = UIColor.redColor()
无限模式
let tabPageViewController = TabPageViewController.create()
tabPageViewController.isInfinity = true
要求
iOS13+
安装
使用 CocoaPods
use_frameworks!
pod "TabPageViewController"
使用 Carthage
github "EndouMari/TabPageViewController"
手动方式
将 Pod/Classes
目录中的所有文件复制到您的项目中。
作者
EndouMari
许可
TabPageViewController 可在 MIT 许可下使用。更多信息请参阅 LICENSE 文件。