Skip to content

Commit cf7931b

Browse files
committed
1.17.4 fix mutli-tabbar bug
1 parent 5c9e996 commit cf7931b

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CYLTabBarController.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CYLTabBarController"
3-
s.version = "1.17.3"
3+
s.version = "1.17.4"
44
s.summary = "Highly customizable tabBar and tabBarController for iOS"
55
s.description = "CYLTabBarController is iPad and iPhone compatible. Supports landscape and portrait orientations and can be used inside UINavigationController."
66
s.homepage = "https://github.com/ChenYilong/CYLTabBarController"

CYLTabBarController/CYLTabBarController.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ - (void)dealloc {
9292
plusButton.selected = NO;
9393
[plusButton removeFromSuperview];
9494
}
95-
if (CYLPlusChildViewController.cyl_plusViewControllerEverAdded == YES) {
95+
BOOL isAdded = [self isPlusViewControllerAdded:_viewControllers];
96+
BOOL hasPlusChildViewController = [self hasPlusChildViewController] && isAdded;
97+
if (isAdded && hasPlusChildViewController && CYLPlusChildViewController.cyl_plusViewControllerEverAdded == YES) {
9698
[CYLPlusChildViewController cyl_setPlusViewControllerEverAdded:NO];
9799
}
98100
// KVO反注册

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
<p align="center">
6-
<a href=""><img src="https://img.shields.io/badge/pod-v1.17.0-brightgreen.svg"></a>
6+
<a href=""><img src="https://img.shields.io/badge/pod-v1.17.4-brightgreen.svg"></a>
77
<a href=""><img src="https://img.shields.io/badge/Swift-compatible-orange.svg"></a>
88
<a href=""><img src="https://img.shields.io/badge/platform-iOS%207.0%2B-ff69b5152950834.svg"></a>
99
<a href="https://github.com/ChenYilong/CYLTabBarController/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat"></a>
@@ -170,7 +170,7 @@
170170
  在文件 `Podfile` 中加入以下内容:
171171

172172
```
173-
    pod 'CYLTabBarController', '~> 1.17.0'
173+
    pod 'CYLTabBarController', '~> 1.17.4'
174174
```
175175

176176
  然后在终端中运行以下命令:
@@ -188,7 +188,7 @@
188188

189189
  如果提示找不到库,则可去掉 `--no-repo-update`
190190

191-
  完成后1.17.0,CocoaPods 会在您的工程根目录下生成一个 `.xcworkspace` 文件。您需要通过此文件打开您的工程,而不是之前的 `.xcodeproj`
191+
  完成后1.17.4,CocoaPods 会在您的工程根目录下生成一个 `.xcworkspace` 文件。您需要通过此文件打开您的工程,而不是之前的 `.xcodeproj`
192192

193193
**CocoaPods 使用说明**
194194

@@ -199,11 +199,11 @@ CocoaPods 中,有几种设置 CYLTabBarController 版本的方法。如:
199199
`>= 1.16.X` 会根据您本地的 CocoaPods 源列表,导入不低于 `1.18.X` 版本的 CYLTabBarController。
200200

201201
`~> 1.16.X` 会根据您本地的 CocoaPods 源列表,介于 1.16.X~1.18.0 之前版本的 CYLTabBarController。
202-
我们建议您锁定版本,便于团队开发。如,指定 1.17.0 版本。
202+
我们建议您锁定版本,便于团队开发。如,指定 1.17.4 版本。
203203

204204

205205
```
206-
    pod 'CYLTabBarController', '~> 1.17.0'
206+
    pod 'CYLTabBarController', '~> 1.17.4'
207207
```
208208

209209
- 升级本地 CocoaPods 源
@@ -412,7 +412,7 @@ Airbnb-app效果:
412412
```
413413

414414
效果如下,
415-
1.17.0
415+
1.17.4
416416
![enter image description here](http://i64.tinypic.com/vx16r5.jpg)
417417

418418
同时你也可以顺便测试下 `CYLTabBarController` 的这一个特性:
@@ -745,6 +745,8 @@ Demo 演示的效果图:
745745

746746
### 多TabBar嵌套,并指定PlusButton位置
747747

748+
该功能的版本需要 >= v1.17.4。
749+
748750
效果图:
749751

750752
![enter image description here](https://ws4.sinaimg.cn/large/006tNc79ly1fmn3005isfg308r0iltl6.gif)

0 commit comments

Comments
 (0)