Copyright (c) 2013-2016 eggswift. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For English
ESTabBarController是一个高度自定义的TabBarController组件,继承自UITabBarController。
为什么要使用?
在开发工作中,我们可能会遇到需要自定义UITabBar的情况。例如:改变文字样式、添加一些动画效果、设置一个比默认更大的样式等等,以上需求如果只通过UITabBarItem往往很难实现。
有了ESTabBarController,你可以轻松地实现这些!
selectedIndex
属性的实现:UITabBarController
过程中,会存在两种比较常见的层级处理方式: 第一种: ├── UITabBarController └──── UINavigationController └────── UIViewController └──────── SubviewControllers 第二种: ├── UINavigationController └──── UITabBarController └────── UIViewController └──────── SubviewControllers 第一种情况在push子视图的时候需要设置hidesBottomBarWhenPushed = true
, 第二种则不需要。 在ESTabBarController中,通过添加Container视图到UITabBar的方式来兼容这两种层级处理方式。支持环境
Demo
下载后运行ESTabBarControllerExample工程,你可以看到一些使用ESTabBarController实现的自定义TabBar的更多例子。
如何安装
CocoaPods
Carthage
手动安装
未完成的事
ESTabBarItemMoreContentView中的”More”图片目前还未设置到framework中,计划将它转化为创建CGBitmap的代码。赞助
您可以通过查看我们的赞助商页面来支持该项目。 只需单击一下即可:
这则广告来自 GitAds
感谢
关于
ESTabBarController是由lihao开发和维护。如果你在使用过程中遇到什么疑问或任何问题,欢迎提交 issue 随时交流。 如果你想为ESTabBarController输出代码,请提交 Pull Request,我会尽可能快的去处理。
许可证
The MIT License (MIT)
Copyright (c) 2013-2016 eggswift. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.