diff --git a/README.md b/README.md index dac6757..a5eedec 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ textViewWithCode.needBorder = YES; #### 集成: ```shell - pod 'RKOTopAlert', '~> 1.0.4' + pod 'RKOTopAlert', '~> 1.0.5' ``` #### 使用: @@ -122,7 +122,7 @@ RKOTopAlert *topAlert = [RKOTopAlert alertViewWithText:@"提示文字" textColor ### 集成: ```shell - pod 'RKOTools', '~> 1.4.2' + pod 'RKOTools', '~> 1.4.4' ``` --------------------------------------------------------------------- diff --git a/RKOTopAlertManager/README.md b/RKOTopAlertManager/README.md index bc4dee1..3093aa5 100644 --- a/RKOTopAlertManager/README.md +++ b/RKOTopAlertManager/README.md @@ -1,7 +1,7 @@ # RKOTopAlert

- + @@ -32,7 +32,7 @@ ## 集成 ```shell - pod 'RKOTopAlert', '~> 1.0.4' + pod 'RKOTopAlert', '~> 1.0.5' ``` ## 使用 diff --git a/RKOTopAlertManager/RKOTopAlert.podspec b/RKOTopAlertManager/RKOTopAlert.podspec index d868efd..34d954b 100644 --- a/RKOTopAlertManager/RKOTopAlert.podspec +++ b/RKOTopAlertManager/RKOTopAlert.podspec @@ -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 @@ -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 diff --git a/RKOTopAlertManager/RKOTopAlert/RKOTopAlert/RKOTopAlert/RKOTopAlert.m b/RKOTopAlertManager/RKOTopAlert/RKOTopAlert/RKOTopAlert/RKOTopAlert.m index 5081f07..8697dcc 100644 --- a/RKOTopAlertManager/RKOTopAlert/RKOTopAlert/RKOTopAlert/RKOTopAlert.m +++ b/RKOTopAlertManager/RKOTopAlert/RKOTopAlert/RKOTopAlert/RKOTopAlert.m @@ -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; @@ -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;