From f33dcfa5177a8fdb559c1e242c6570eac4c9f32e Mon Sep 17 00:00:00 2001
From: BearXR <648070256@qq.com>
Date: Thu, 11 Jun 2020 21:50:13 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0xib/storyboard=E6=94=AF?=
=?UTF-8?q?=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
PodCode/Classes/CRBoxInputView.m | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/PodCode/Classes/CRBoxInputView.m b/PodCode/Classes/CRBoxInputView.m
index 183a8cb..03747be 100755
--- a/PodCode/Classes/CRBoxInputView.m
+++ b/PodCode/Classes/CRBoxInputView.m
@@ -43,6 +43,17 @@ - (instancetype)initWithFrame:(CGRect)frame
return self;
}
+- (instancetype)initWithCoder:(NSCoder *)coder
+{
+ self = [super initWithCoder:coder];
+ if (self) {
+ [self initDefaultValue];
+ [self addNotificationObserver];
+ }
+
+ return self;
+}
+
- (instancetype)init
{
self = [super init];
From 3cb1a388757ef62709ff47533129a1a60c42fb8a Mon Sep 17 00:00:00 2001
From: BearXR <648070256@qq.com>
Date: Thu, 11 Jun 2020 21:54:17 +0800
Subject: [PATCH 2/8] =?UTF-8?q?readme=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 19 +++++++++----------
README_en.md | 22 ++++++++++++----------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/README.md b/README.md
index 0030a35..5f343c1 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
- 支持`Masonry`
- 支持密文显示
- 支持自定义密文图片/view
-- 支持iOS8及以上操作系统
+- 支持动态修改codeLength
> 该组件适用于短信验证码,密码输入框,手机号码输入框这些场景。
希望你可以喜欢!
@@ -44,11 +44,11 @@ pod 'CRBoxInputView', '1.2.0'
| [Base](#Anchor_Base) |  |
| [Placeholder](#Anchor_Placeholder) |  |
| [CustomBox](#Anchor_CustomBox) |  |
-| [ResetCodeLength](#Anchor_ResetCodeLength) |  |
| [Line](#Anchor_Line) |  |
| [SecretSymbol](#Anchor_SecretSymbol) |  |
| [SecretImage](#Anchor_SecretImage) |  |
| [SecretView](#Anchor_SecretView) |  |
+| [ResetCodeLength](#Anchor_ResetCodeLength) |  |
## 使用说明
@@ -128,14 +128,6 @@ boxInputView.customCellProperty = cellProperty;
[boxInputView loadAndPrepareViewWithBeginEdit:YES];
```
-
-
-
-### ResetCodeLength
-``` objc
-[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
-```
-
@@ -249,6 +241,13 @@ boxInputView.customCellProperty = cellProperty;
[boxInputView loadAndPrepareViewWithBeginEdit:YES];
```
+
+
+
+### ResetCodeLength
+``` objc
+[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
+```
diff --git a/README_en.md b/README_en.md
index 87a3fe7..c4b6adc 100644
--- a/README_en.md
+++ b/README_en.md
@@ -7,13 +7,15 @@
### [中文文档](https://github.com/CRAnimation/CRBoxInputView#Header_Start) [/ English Document](https://github.com/CRAnimation/CRBoxInputView/blob/master/README_en.md#Header_Start)
+## Tip
+- If you fell good. Could you please give me a star? Thank you.
## Feature
- Support verify code auto fill in iOS12
- Support `Masonry`
- Support security type
- Support custom security image / view
-- Support iOS8 and over
+- Support change code length dynamically
> You can use this widget for verify code, password input or phone number input.
I hope you can like this!
@@ -40,11 +42,11 @@ To run the example project, clone the repo, and run `pod install` from the Examp
| [Base](#Anchor_Base) |  |
| [Placeholder](#Anchor_Placeholder) |  |
| [CustomBox](#Anchor_CustomBox) |  |
-| [ResetCodeLength](#Anchor_ResetCodeLength) |  |
| [Line](#Anchor_Line) |  |
| [SecretSymbol](#Anchor_SecretSymbol) |  |
| [SecretImage](#Anchor_SecretImage) |  |
| [SecretView](#Anchor_SecretView) |  |
+| [ResetCodeLength](#Anchor_ResetCodeLength) |  |
## Usage
@@ -123,14 +125,6 @@ boxInputView.customCellProperty = cellProperty;
[boxInputView loadAndPrepareViewWithBeginEdit:YES];
```
-
-
-
-### ResetCodeLength
-``` objc
-[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
-```
-
@@ -243,6 +237,14 @@ boxInputView.customCellProperty = cellProperty;
[boxInputView loadAndPrepareViewWithBeginEdit:YES];
```
+
+
+
+### ResetCodeLength
+``` objc
+[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
+```
+
From 3d081239f470f5a7e103efd772554cf0678d3acc Mon Sep 17 00:00:00 2001
From: BearXR <648070256@qq.com>
Date: Thu, 11 Jun 2020 21:54:59 +0800
Subject: [PATCH 3/8] v1.2.1
---
CRBoxInputView.podspec | 2 +-
.../CRBoxInputView/CRBoxInputView-Info.plist | 2 +-
README.md | 2 +-
README_en.md | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CRBoxInputView.podspec b/CRBoxInputView.podspec
index e38963b..c51864c 100644
--- a/CRBoxInputView.podspec
+++ b/CRBoxInputView.podspec
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'CRBoxInputView'
- s.version = '1.2.0'
+ s.version = '1.2.1'
s.summary = 'You can use this widget for verify code, password input or phone number input.'
# This description is used to generate tags and improve search results.
diff --git a/Example/Pods/Target Support Files/CRBoxInputView/CRBoxInputView-Info.plist b/Example/Pods/Target Support Files/CRBoxInputView/CRBoxInputView-Info.plist
index 955b733..d602046 100644
--- a/Example/Pods/Target Support Files/CRBoxInputView/CRBoxInputView-Info.plist
+++ b/Example/Pods/Target Support Files/CRBoxInputView/CRBoxInputView-Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.2.0
+ 1.2.1
CFBundleSignature
????
CFBundleVersion
diff --git a/README.md b/README.md
index 5f343c1..b8acfa1 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@
CRBoxInputView 可以通过 [CocoaPods](https://cocoapods.org). 来安装, 只需简单的在你的 Podfile 中添加如下代码:
```ruby
-pod 'CRBoxInputView', '1.2.0'
+pod 'CRBoxInputView', '1.2.1'
```
diff --git a/README_en.md b/README_en.md
index c4b6adc..e752fcc 100644
--- a/README_en.md
+++ b/README_en.md
@@ -26,7 +26,7 @@ CRBoxInputView is available through [CocoaPods](https://cocoapods.org). To insta
it, simply add the following line to your Podfile:
```ruby
-pod 'CRBoxInputView', '1.2.0'
+pod 'CRBoxInputView', '1.2.1'
```
From f2d694aa55bc575faf15887dae6c6830be2bcf33 Mon Sep 17 00:00:00 2001
From: BearXR <648070256@qq.com>
Date: Thu, 11 Jun 2020 22:03:44 +0800
Subject: [PATCH 4/8] =?UTF-8?q?readme=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 1 +
README_en.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/README.md b/README.md
index b8acfa1..a825153 100644
--- a/README.md
+++ b/README.md
@@ -245,6 +245,7 @@ boxInputView.customCellProperty = cellProperty;
### ResetCodeLength
+
``` objc
[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
```
diff --git a/README_en.md b/README_en.md
index e752fcc..d4da595 100644
--- a/README_en.md
+++ b/README_en.md
@@ -241,6 +241,7 @@ boxInputView.customCellProperty = cellProperty;
### ResetCodeLength
+
``` objc
[boxInputView resetCodeLength:_boxInputView.codeLength+1 beginEdit:YES];
```
From ba9e8abb22c4015456bbe2cab7c2afcad82ca3d4 Mon Sep 17 00:00:00 2001
From: Bear <648070256@qq.com>
Date: Fri, 27 Aug 2021 15:22:25 +0800
Subject: [PATCH 5/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
PodCode/Classes/CRBoxInputView.h | 3 +++
PodCode/Classes/CRBoxInputView.m | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/PodCode/Classes/CRBoxInputView.h b/PodCode/Classes/CRBoxInputView.h
index ec420d2..9e0a2c7 100755
--- a/PodCode/Classes/CRBoxInputView.h
+++ b/PodCode/Classes/CRBoxInputView.h
@@ -29,6 +29,7 @@ typedef NS_ENUM(NSInteger, CRInputType) {
typedef void(^TextDidChangeblock)(NSString * _Nullable text, BOOL isFinished);
typedef void(^TextEditStatusChangeblock)(CRTextEditStatus editStatus);
+typedef NSString *(^TextCustomProcessblock)(NSString * _Nullable text);
@interface CRBoxInputView : UIView
@@ -110,6 +111,8 @@ default: @""
@property (copy, nonatomic) TextDidChangeblock _Nullable textDidChangeblock;
@property (copy, nonatomic) TextEditStatusChangeblock _Nullable textEditStatusChangeblock;
+/// 文本自定义处理
+@property (copy, nonatomic) TextCustomProcessblock _Nullable textCustomProcessblock;
@property (strong, nonatomic) CRBoxFlowLayout * _Nullable boxFlowLayout;
@property (strong, nonatomic) CRBoxInputCellProperty * _Nullable customCellProperty;
@property (strong, nonatomic, readonly) NSString * _Nullable textValue;
diff --git a/PodCode/Classes/CRBoxInputView.m b/PodCode/Classes/CRBoxInputView.m
index 03747be..3e83eba 100755
--- a/PodCode/Classes/CRBoxInputView.m
+++ b/PodCode/Classes/CRBoxInputView.m
@@ -301,6 +301,11 @@ - (void)baseTextDidChange:(UITextField *)textField manualInvoke:(BOOL)manualInvo
verStr = [verStr stringByReplacingOccurrencesOfString:@" " withString:@""];
verStr = [self filterInputContent:verStr];
+ //自定义处理
+ if (self.textCustomProcessblock) {
+ verStr = self.textCustomProcessblock(verStr);
+ }
+
if (verStr.length >= _codeLength) {
verStr = [verStr substringToIndex:_codeLength];
[self endEdit];
From b53850a00fb3f76b78fd3e2359b9aa66e683b76a Mon Sep 17 00:00:00 2001
From: Bear <648070256@qq.com>
Date: Fri, 27 Aug 2021 15:24:26 +0800
Subject: [PATCH 6/8] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E5=8D=87?=
=?UTF-8?q?=E7=BA=A71.2.2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CRBoxInputView.podspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CRBoxInputView.podspec b/CRBoxInputView.podspec
index c51864c..d352e27 100644
--- a/CRBoxInputView.podspec
+++ b/CRBoxInputView.podspec
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'CRBoxInputView'
- s.version = '1.2.1'
+ s.version = '1.2.2'
s.summary = 'You can use this widget for verify code, password input or phone number input.'
# This description is used to generate tags and improve search results.
From 5e45530ed234ceffd4f7b2b1b2c5a2b08b2a7ed8 Mon Sep 17 00:00:00 2001
From: Bear <648070256@qq.com>
Date: Fri, 27 Aug 2021 15:34:21 +0800
Subject: [PATCH 7/8] [Update] CRBoxInputView (1.2.2)
---
CRBoxInputView/1.2.2/CRBoxInputView.podspec | 43 +++++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 CRBoxInputView/1.2.2/CRBoxInputView.podspec
diff --git a/CRBoxInputView/1.2.2/CRBoxInputView.podspec b/CRBoxInputView/1.2.2/CRBoxInputView.podspec
new file mode 100644
index 0000000..d352e27
--- /dev/null
+++ b/CRBoxInputView/1.2.2/CRBoxInputView.podspec
@@ -0,0 +1,43 @@
+#
+# Be sure to run `pod lib lint CRBoxInputView.podspec' to ensure this is a
+# valid spec before submitting.
+#
+# Any lines starting with a # are optional, but their use is encouraged
+# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
+#
+
+Pod::Spec.new do |s|
+ s.name = 'CRBoxInputView'
+ s.version = '1.2.2'
+ s.summary = 'You can use this widget for verify code, password input or phone number input.'
+
+# This description is used to generate tags and improve search results.
+# * Think: What does it do? Why did you write it? What is the focus?
+# * Try to keep it short, snappy and to the point.
+# * Write the description between the DESC delimiters below.
+# * Finally, don't worry about the indent, CocoaPods strips it!
+
+ s.description = <<-DESC
+TODO: You can use this widget for verify code, password input or phone number input.
+ DESC
+
+ s.homepage = 'https://github.com/CRAnimation/CRBoxInputView'
+ # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
+ s.license = { :type => 'MIT', :file => 'LICENSE' }
+ s.author = { 'BearRan' => '648070256@qq.com' }
+ s.source = { :git => 'https://github.com/CRAnimation/CRBoxInputView.git', :tag => s.version.to_s }
+ # s.social_media_url = 'https://twitter.com/'
+
+ s.ios.deployment_target = '8.0'
+
+ s.source_files = 'PodCode/Classes/**/*'
+
+ # s.resource_bundles = {
+ # 'CRBoxInputView' => ['CRBoxInputView/Assets/*.png']
+ # }
+
+ # s.public_header_files = 'Pod/Classes/**/*.h'
+ # s.frameworks = 'UIKit', 'MapKit'
+ # s.dependency 'AFNetworking', '~> 2.3'
+ s.dependency 'Masonry'
+end
From a2a388eb064a2c887f2c0a5786102340d188bf1a Mon Sep 17 00:00:00 2001
From: Alpha Yu
Date: Mon, 13 Mar 2023 17:01:30 +0800
Subject: [PATCH 8/8] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E9=94=99=E8=AF=AF=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
PodCode/Classes/CRBoxInputCellProperty.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PodCode/Classes/CRBoxInputCellProperty.h b/PodCode/Classes/CRBoxInputCellProperty.h
index 30be9be..1273291 100644
--- a/PodCode/Classes/CRBoxInputCellProperty.h
+++ b/PodCode/Classes/CRBoxInputCellProperty.h
@@ -45,8 +45,8 @@ typedef void(^ConfigCellShadowBlock)(CALayer *layer);
/**
cell边框颜色
- 状态:无填充文字,未选中状态时
- 默认:与cellBorderColorFilled相同
+ 状态:填充文字后,未选中状态时
+ 默认:nil
*/
@property (copy, nonatomic) UIColor *__nullable cellBorderColorFilled;