一款功能十分强大TabBarController,几乎你所能想到的关于TabBar的需求,它都能实现。
##安装方法:
pod 'YPTabBarController'
或者,
直接将YPTabBarController文件夹拖入工程。
##功能介绍:
功能强大的自定义TabBarController,可以自定义:
- 替代系统的UITabBarController,以下属性均可自定义:
a) TabBar:位置、大小、边框、圆角、分割线、内容支持滚动等;
b) TabItem:图像、选中背景、title字体、title颜色等,均包含选中和未选中两种状态;
c) Badge:支持数字badge和小圆点badge,可自定义:位置、大小、背景颜色、背景图像、badge title字体、badge title颜色等; - 替代系统的UISegmentControl,且功能更加强大;
- 仿网易、搜狐等新闻客户端的可滑动的内容视图和TabBar,支持滑动内容视图时,对应TabItem的字体、颜色、选中背景跟随内容视图的滚动进行平滑渐变切换;
- 多个代理方法,可以自由适应各种需求;
- 可以添加一个居中的特殊的YPTabItem按钮,类似于新浪微博中间的“+”号按钮;
##2.2版本功能更新:
- YPTabBarController增加interceptRightSlideGuetureInFirstPage和interceptLeftSlideGuetureInLastPage属性,设置为YES可拦截content scrollView的滑动手势,避免左右侧边栏和右拖返回的手势冲突;
- YPTabBar代理方法完善,支持should、will、did等3个代理方法;
- 修复跳转到其他界面,所有child view controller都调用viewWillAppear等方法的问题;
##效果展示:
##使用方法 使用方法参见Demo