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

Commit

Permalink
修复了点击RKOTextView的清除按钮之后不执行文字textViewDidChange方法的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rakuyoMo committed Sep 3, 2017
1 parent 59d2a93 commit 8059672
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
自己平时写的一个小工具库,上传到GitHub中且支持CocoaPods,方便自己使用。不断更新完善中。

<p align="center">
<a href=""><img src="https://img.shields.io/badge/pod-v1.3.2-brightgreen.svg"></a>
<a href=""><img src="https://img.shields.io/badge/pod-v1.3.3-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%208.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
2 changes: 1 addition & 1 deletion RKOTools.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = "RKOTools"
s.version = "1.3.2"
s.version = "1.3.3"
s.summary = "One of your own tool libraries"
s.description = <<-DESC
One of your own tool libraries
Expand Down
12 changes: 12 additions & 0 deletions RKOTools/RKOControl/RKOTextView/RKOTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {

- (void)setUp {


NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init];
paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
NSDictionary *attributes = @{NSParagraphStyleAttributeName:paragraphStyle};
self.attributedText = [[NSAttributedString alloc]initWithString:self.text attributes:attributes];


// 设置TextView默认字体大小。修改该大小可以一并修改占位符文字的大小。
self.font = [UIFont systemFontOfSize:18];
// 默认为白色背景
Expand Down Expand Up @@ -466,6 +473,11 @@ - (void)clearTextViewContent {

// 隐藏清除按钮,显示占位符,更新高度。
[self judgmentSubviewsDisplayed:self];

// 提供代理,供用户监听输入
if (self.textViewDelegate && [self.textViewDelegate respondsToSelector:@selector(textViewDidChange:)]) {
[self.textViewDelegate textViewDidChange:self];
}
}

- (void)layoutClearButton {
Expand Down

0 comments on commit 8059672

Please sign in to comment.