This repository was archived by the owner on Sep 6, 2019. It is now read-only.
Commit 8059672 1 parent 59d2a93 commit 8059672 Copy full SHA for 8059672
File tree 3 files changed +14
-2
lines changed
RKOTools/RKOControl/RKOTextView
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3
3
自己平时写的一个小工具库,上传到GitHub中且支持CocoaPods,方便自己使用。不断更新完善中。
4
4
5
5
<p align =" center " >
6
- <a href =" " ><img src =" https://img.shields.io/badge/pod-v1.3.2 -brightgreen.svg " ></a >
6
+ <a href =" " ><img src =" https://img.shields.io/badge/pod-v1.3.3 -brightgreen.svg " ></a >
7
7
<a href =" " ><img src =" https://img.shields.io/badge/ObjectiveC-compatible-orange.svg " ></a >
8
8
<a href =" " ><img src =" https://img.shields.io/badge/platform-iOS%208.0%2B-ff69b5152950834.svg " ></a >
9
9
<a href =" https://github.com/rakuyoMo/RKOTools/blob/master/LICENSE " ><img src =" https://img.shields.io/badge/license-MIT-green.svg?style=flat " ></a >
Original file line number Diff line number Diff line change 9
9
Pod ::Spec . new do |s |
10
10
11
11
s . name = "RKOTools"
12
- s . version = "1.3.2 "
12
+ s . version = "1.3.3 "
13
13
s . summary = "One of your own tool libraries"
14
14
s . description = <<-DESC
15
15
One of your own tool libraries
Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {
85
85
86
86
- (void )setUp {
87
87
88
+
89
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc ]init];
90
+ paragraphStyle.lineBreakMode = NSLineBreakByCharWrapping;
91
+ NSDictionary *attributes = @{NSParagraphStyleAttributeName :paragraphStyle};
92
+ self.attributedText = [[NSAttributedString alloc ]initWithString:self .text attributes: attributes];
93
+
94
+
88
95
// 设置TextView默认字体大小。修改该大小可以一并修改占位符文字的大小。
89
96
self.font = [UIFont systemFontOfSize: 18 ];
90
97
// 默认为白色背景
@@ -466,6 +473,11 @@ - (void)clearTextViewContent {
466
473
467
474
// 隐藏清除按钮,显示占位符,更新高度。
468
475
[self judgmentSubviewsDisplayed: self ];
476
+
477
+ // 提供代理,供用户监听输入
478
+ if (self.textViewDelegate && [self .textViewDelegate respondsToSelector: @selector (textViewDidChange: )]) {
479
+ [self .textViewDelegate textViewDidChange: self ];
480
+ }
469
481
}
470
482
471
483
- (void )layoutClearButton {
You can’t perform that action at this time.
0 commit comments