Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
RKOTopAlert 1.0.5 修复无 icon 图标时的显示问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
rakuyoMo committed Nov 4, 2017
1 parent 15fed13 commit bb5720a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ textViewWithCode.needBorder = YES;
#### 集成:
```shell
pod 'RKOTopAlert', '~> 1.0.4'
pod 'RKOTopAlert', '~> 1.0.5'
```

#### 使用:
Expand Down Expand Up @@ -122,7 +122,7 @@ RKOTopAlert *topAlert = [RKOTopAlert alertViewWithText:@"提示文字" textColor
### 集成:
```shell
pod 'RKOTools', '~> 1.4.2'
pod 'RKOTools', '~> 1.4.4'
```

---------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions RKOTopAlertManager/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RKOTopAlert

<p align="center">
<a href=""><img src="https://img.shields.io/badge/pod-v1.0.4-brightgreen.svg"></a>
<a href=""><img src="https://img.shields.io/badge/pod-v1.0.5-brightgreen.svg"></a>
<a href=""><img src="https://img.shields.io/badge/ObjectiveC-compatible-orange.svg"></a>
<a href=""><img src="https://img.shields.io/badge/platform-iOS%207.0%2B-ff69b5152950834.svg"></a>
<a href="https://github.com/rakuyoMo/RKOTools/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat"></a>
Expand Down Expand Up @@ -32,7 +32,7 @@
## 集成

```shell
pod 'RKOTopAlert', '~> 1.0.4'
pod 'RKOTopAlert', '~> 1.0.5'
```

## 使用
Expand Down
4 changes: 2 additions & 2 deletions RKOTopAlertManager/RKOTopAlert.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = "RKOTopAlert"
s.version = "1.0.4"
s.version = "1.0.5"
s.summary = "Appears at the top of the notification view"
s.description = <<-DESC
Appears at the top of the notification view
Expand All @@ -23,7 +23,7 @@ Pod::Spec.new do |s|

s.ios.deployment_target = "7.0"

s.source = { :git => "https://github.com/rakuyoMo/RKOControls.git", :tag => "1.0.9" } # #{s.version}
s.source = { :git => "https://github.com/rakuyoMo/RKOControls.git", :tag => "1.0.10" } # #{s.version}

s.requires_arc = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ - (instancetype)alertViewWithText:(NSString *)text textColor:(UIColor *)textColo
return self;
}

// 是否设置了 icon
BOOL hasIcon = !iconImageName || iconImageName.length <= 0 || [iconImageName isEqualToString:@" "];
// 是否设置了 icon / 文件名包含空格按照未设置 icon 处理
BOOL hasSpace = ([iconImageName rangeOfString:@" "].location && [iconImageName rangeOfString:@" "].location != NSNotFound);
BOOL hasIcon = iconImageName && (iconImageName.length > 0 || hasSpace);

// 设置背景颜色。
self.backgroundColor = backgroundColor;
Expand All @@ -102,7 +103,6 @@ - (instancetype)alertViewWithText:(NSString *)text textColor:(UIColor *)textColo

// 基础样式
if (!hasIcon) {

self.contentLable.frame = CGRectMake(0, topHight.statusbarH, self.frame.size.width, topHight.navigationH);

return self;
Expand Down

0 comments on commit bb5720a

Please sign in to comment.