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

Commit

Permalink
整理RKOTextView代码
Browse files Browse the repository at this point in the history
  • Loading branch information
rakuyoMo committed Sep 3, 2017
1 parent 3ade7f6 commit 59d2a93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 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.1-brightgreen.svg"></a>
<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/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.1"
s.version = "1.3.2"
s.summary = "One of your own tool libraries"
s.description = <<-DESC
One of your own tool libraries
Expand Down
20 changes: 3 additions & 17 deletions RKOTools/RKOControl/RKOTextView/RKOTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ - (void)setUp {
self.enablesReturnKeyAutomatically = YES;
}

#pragma mark 懒加载控件


// 懒加载清除按钮
//- (UIButton *)clearBtn {
//
// if (!_clearBtn && _clearBtnMode != RKOTextFieldViewModeNever) {
// // 初始化清除按钮。
// NSLog(@"2");
//
// }
// return _clearBtn;
//}

#pragma mark - 系统方法
// 绘制TextView边框
- (void)drawRect:(CGRect)rect {
Expand Down Expand Up @@ -451,12 +437,12 @@ - (void)createClearButton {

// 图片路径
// 为通过copy文件夹方式获取图片路径的宏
#define kZLPhotoBrowserSrcName(file) [@"ClearBtnImg.bundle" stringByAppendingPathComponent:file]
#define RKOTextViewSrcName(file) [@"ClearBtnImg.bundle" stringByAppendingPathComponent:file]
// 为通过cocoapods下载安装获取图片路径的宏
#define kZLPhotoBrowserFrameworkSrcName(file) [@"Frameworks/RKOTools.framework/ClearBtnImg.bundle" stringByAppendingPathComponent:file]
#define RKOTextViewFrameworkSrcName(file) [@"Frameworks/RKOTools.framework/ClearBtnImg.bundle" stringByAppendingPathComponent:file]

// 设置图片
UIImage *img = [UIImage imageNamed:kZLPhotoBrowserSrcName(@"clear_btn_RKOTextView.png")]?:[UIImage imageNamed:kZLPhotoBrowserFrameworkSrcName(@"clear_btn_RKOTextView.png")];
UIImage *img = [UIImage imageNamed:RKOTextViewSrcName(@"clear_btn_RKOTextView.png")]?:[UIImage imageNamed:RKOTextViewFrameworkSrcName(@"clear_btn_RKOTextView.png")];
self.imgSize = img.size;
[self.clearBtn setImage:img forState:UIControlStateNormal];

Expand Down

0 comments on commit 59d2a93

Please sign in to comment.