Skip to content

Commit

Permalink
🕰2019-04-12 22:38:01🕰 修复正则匹配错误验证,代理方法调整,细节修改
Browse files Browse the repository at this point in the history
  • Loading branch information
shenguanjiejie committed Apr 12, 2019
1 parent a91d7d6 commit 16e1b06
Show file tree
Hide file tree
Showing 34 changed files with 300 additions and 216 deletions.
7 changes: 4 additions & 3 deletions RJTableViewAgent.podspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Pod::Spec.new do |s|

s.name = "RJTableViewAgent"
s.version = "1.0.6.2"
s.summary = "将常用的一些Cell封装了到了RJTableViewAgent中,使得使用UITableView的时候可以快速开发"
s.version = "1.0.7.0"
s.summary = "将常用的一些Cell封装了到了RJTableViewAgent中,使得使用UITableView的时候可以快速开发,尤其是表单页面,可节省大量时间."
s.homepage = "https://github.com/shenguanjiejie/RJTableViewAgent"
s.license = { :type => 'MIT'}
s.author = { "shenguanjiejie" => "835166018@qq.com" }
Expand All @@ -25,7 +25,8 @@ s.dependency 'MBProgressHUD'

s.subspec 'Resource' do |ss|
ss.requires_arc = false
ss.source_files = "RJTableViewAgent/RJTableViewAgent/Resource/*.png"
#ss.source_files = "RJTableViewAgent/RJTableViewAgent/Resource/*.png"
spec.resource = "RJTableViewAgent/RJTableViewAgent/Resource/RJTableViewAgent.bundle"
end

s.subspec 'Utils' do |ss|
Expand Down
44 changes: 8 additions & 36 deletions RJTableViewAgent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,8 @@
9F4D580D21D9142D004DB1C8 /* RJCollectionCellInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4D57FA21D9142D004DB1C8 /* RJCollectionCellInfo.m */; };
9F4D580E21D9142D004DB1C8 /* RJHTwoLabelCellInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4D57FB21D9142D004DB1C8 /* RJHTwoLabelCellInfo.m */; };
9F4D582421DA084F004DB1C8 /* RJImageCCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F4D582321DA084E004DB1C8 /* RJImageCCell.m */; };
9F4D585A21DBCA0A004DB1C8 /* rj_warning.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D585321DBCA09004DB1C8 /* rj_warning.png */; };
9F4D585C21DBCA0A004DB1C8 /* rj_check.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D585521DBCA09004DB1C8 /* rj_check.png */; };
9F4D585D21DBCA0A004DB1C8 /* rj_close.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D585621DBCA0A004DB1C8 /* rj_close.png */; };
9F4D585F21DBCA0A004DB1C8 /* rj_rightArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D585821DBCA0A004DB1C8 /* rj_rightArrow.png */; };
9F4D586421DC7543004DB1C8 /* rj_placeholderImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D586121DC7543004DB1C8 /* rj_placeholderImage.png */; };
9F4D586521DC7543004DB1C8 /* rj_github.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D586221DC7543004DB1C8 /* rj_github.png */; };
9F4D586621DC7543004DB1C8 /* rj_github2.png in Resources */ = {isa = PBXBuildFile; fileRef = 9F4D586321DC7543004DB1C8 /* rj_github2.png */; };
9F7331632260D16B00F03C64 /* RJTableViewAgent.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9F7331622260D16A00F03C64 /* RJTableViewAgent.bundle */; };
9F7331662260D91700F03C64 /* RJTableViewAgent.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 9F7331652260D91700F03C64 /* RJTableViewAgent.podspec */; };
9FFA6F1121EDDEF0007F8A7A /* UITableView+RJCellInit.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FFA6F0021EDDEEE007F8A7A /* UITableView+RJCellInit.m */; };
9FFA6F1221EDDEF0007F8A7A /* RJTextLimit.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FFA6F0221EDDEEF007F8A7A /* RJTextLimit.m */; };
9FFA6F1321EDDEF0007F8A7A /* RJTableViewAgentConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FFA6F0321EDDEEF007F8A7A /* RJTableViewAgentConfig.m */; };
Expand Down Expand Up @@ -182,13 +177,8 @@
9F4D57FB21D9142D004DB1C8 /* RJHTwoLabelCellInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RJHTwoLabelCellInfo.m; sourceTree = "<group>"; };
9F4D582221DA084E004DB1C8 /* RJImageCCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RJImageCCell.h; sourceTree = "<group>"; };
9F4D582321DA084E004DB1C8 /* RJImageCCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RJImageCCell.m; sourceTree = "<group>"; };
9F4D585321DBCA09004DB1C8 /* rj_warning.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_warning.png; sourceTree = "<group>"; };
9F4D585521DBCA09004DB1C8 /* rj_check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_check.png; sourceTree = "<group>"; };
9F4D585621DBCA0A004DB1C8 /* rj_close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_close.png; sourceTree = "<group>"; };
9F4D585821DBCA0A004DB1C8 /* rj_rightArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_rightArrow.png; sourceTree = "<group>"; };
9F4D586121DC7543004DB1C8 /* rj_placeholderImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_placeholderImage.png; sourceTree = "<group>"; };
9F4D586221DC7543004DB1C8 /* rj_github.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_github.png; sourceTree = "<group>"; };
9F4D586321DC7543004DB1C8 /* rj_github2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rj_github2.png; sourceTree = "<group>"; };
9F7331622260D16A00F03C64 /* RJTableViewAgent.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = RJTableViewAgent.bundle; sourceTree = "<group>"; };
9F7331652260D91700F03C64 /* RJTableViewAgent.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RJTableViewAgent.podspec; sourceTree = SOURCE_ROOT; };
9FFA6EFE21EDDEED007F8A7A /* UITextView+RJPlaceholder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+RJPlaceholder.h"; sourceTree = "<group>"; };
9FFA6EFF21EDDEEE007F8A7A /* RJImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RJImage.h; sourceTree = "<group>"; };
9FFA6F0021EDDEEE007F8A7A /* UITableView+RJCellInit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+RJCellInit.m"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -270,7 +260,6 @@
isa = PBXGroup;
children = (
9F4D573421D913F6004DB1C8 /* RJTableViewAgent */,
9F4D586021DC7543004DB1C8 /* Images */,
9F4D56BF21D91394004DB1C8 /* AppDelegate.h */,
9F4D56BD21D91394004DB1C8 /* AppDelegate.m */,
9F4D56BE21D91394004DB1C8 /* ViewController.h */,
Expand All @@ -280,6 +269,7 @@
9F4D564221D912C8004DB1C8 /* LaunchScreen.storyboard */,
9F4D564521D912C8004DB1C8 /* Info.plist */,
9F4D564621D912C8004DB1C8 /* main.m */,
9F7331652260D91700F03C64 /* RJTableViewAgent.podspec */,
);
path = RJTableViewAgent;
sourceTree = "<group>";
Expand Down Expand Up @@ -404,24 +394,11 @@
9F4D584321DBC9C2004DB1C8 /* Resource */ = {
isa = PBXGroup;
children = (
9F4D585521DBCA09004DB1C8 /* rj_check.png */,
9F4D585621DBCA0A004DB1C8 /* rj_close.png */,
9F4D585821DBCA0A004DB1C8 /* rj_rightArrow.png */,
9F4D585321DBCA09004DB1C8 /* rj_warning.png */,
9F7331622260D16A00F03C64 /* RJTableViewAgent.bundle */,
);
path = Resource;
sourceTree = "<group>";
};
9F4D586021DC7543004DB1C8 /* Images */ = {
isa = PBXGroup;
children = (
9F4D586121DC7543004DB1C8 /* rj_placeholderImage.png */,
9F4D586221DC7543004DB1C8 /* rj_github.png */,
9F4D586321DC7543004DB1C8 /* rj_github2.png */,
);
path = Images;
sourceTree = "<group>";
};
9FFA6EE121EDDED2007F8A7A /* Utils */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -562,16 +539,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9F7331662260D91700F03C64 /* RJTableViewAgent.podspec in Resources */,
9F4D564421D912C8004DB1C8 /* LaunchScreen.storyboard in Resources */,
9F4D586521DC7543004DB1C8 /* rj_github.png in Resources */,
9F4D585C21DBCA0A004DB1C8 /* rj_check.png in Resources */,
9F4D564121D912C8004DB1C8 /* Assets.xcassets in Resources */,
9F4D586621DC7543004DB1C8 /* rj_github2.png in Resources */,
9F4D585D21DBCA0A004DB1C8 /* rj_close.png in Resources */,
9F4D563F21D912C7004DB1C8 /* Main.storyboard in Resources */,
9F4D585F21DBCA0A004DB1C8 /* rj_rightArrow.png in Resources */,
9F4D586421DC7543004DB1C8 /* rj_placeholderImage.png in Resources */,
9F4D585A21DBCA0A004DB1C8 /* rj_warning.png in Resources */,
9F7331632260D16B00F03C64 /* RJTableViewAgent.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion RJTableViewAgent/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[RJTableViewAgentConfig sharedConfig].separateColor = kRJSeparateColor;
[RJTableViewAgentConfig sharedConfig].placeholderColor = kRJSeparateColor;
[RJTableViewAgentConfig sharedConfig].placeholderImage = [UIImage imageNamed:@"rj_placeholderImage"];
[RJTableViewAgentConfig sharedConfig].rightArrow = [UIImage imageNamed:@"rj_rightArrow"];
[RJTableViewAgentConfig sharedConfig].rightArrow = [UIImage imageNamed:@"rj_right_arrow"];

IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
manager.enable = YES;
Expand Down
21 changes: 21 additions & 0 deletions RJTableViewAgent/Assets.xcassets/rj_github.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "rj_github.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
File renamed without changes
21 changes: 21 additions & 0 deletions RJTableViewAgent/Assets.xcassets/rj_github2.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "rj_github2.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
File renamed without changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "rj_placeholderImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "rj_right_arrow.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
2 changes: 1 addition & 1 deletion RJTableViewAgent/RJTableViewAgent/Infos/RJBaseCellInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (instancetype)initWithCellType:(CellType)cellType indexPath:(NSIndexPath *)ind
_rightMargin = 15;
_lineHeight = 0.5;
_lineColor = [RJTableViewAgentConfig sharedConfig].separateColor;
_backgroundColor = [UIColor clearColor];
_backgroundColor = [UIColor whiteColor];
_bindingStringMinLength = 0;
_bindingStringMaxLength = NSNotFound;
_cellVariety = RJCellVarietyAll;
Expand Down
4 changes: 3 additions & 1 deletion RJTableViewAgent/RJTableViewAgent/Infos/RJButtonCellInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ typedef void (^RJDidTapButtonBlock)(UIButton *button,__kindof RJButtonCellInfo *

@property (nonatomic, strong) UIImage *buttonImage;

@property (nonatomic, strong) NSString *buttonImageUrl;
@property (nonatomic, strong) NSURL *buttonImageUrl;

@property (nonatomic, strong) UIImage *buttonSelectedImage;

Expand All @@ -40,6 +40,8 @@ typedef void (^RJDidTapButtonBlock)(UIButton *button,__kindof RJButtonCellInfo *

@property (nonatomic, strong) UIImage *buttonPlaceholderImage;

@property (nonatomic, assign) BOOL buttonUserinterfaceEnable;

@property (nonatomic, copy) RJDidTapButtonBlock didTapButtonBlock;

- (instancetype)initWithIndexPath:(NSIndexPath *)indexPath backgroundColor:(UIColor *)backgroundColor;
Expand Down
1 change: 1 addition & 0 deletions RJTableViewAgent/RJTableViewAgent/Infos/RJButtonCellInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ - (instancetype)initWithIndexPath:(NSIndexPath *)indexPath backgroundColor:(UICo
self.buttonFont = kRJFontSize(14);
self.imageSize = CGSizeMake(40, 40);
self.buttonPlaceholderImage = [RJTableViewAgentConfig sharedConfig].placeholderImage;
self.buttonUserinterfaceEnable = YES;
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion RJTableViewAgent/RJTableViewAgent/Infos/RJImageCellInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@interface RJImageCellInfo : RJBaseCellInfo

@property (nonatomic, copy) NSString *imageUrl;
@property (nonatomic, copy) NSURL *imageUrl;

@property (nonatomic, strong) UIImage *image;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@interface RJImageLabelButtonCellInfo : RJLabelButtonCellInfo

@property (nonatomic, copy) NSString *imageUrl;
@property (nonatomic, copy) NSURL *imageUrl;

@property (nonatomic, strong) UIImage *image;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
@interface RJImageLabelCellInfo : RJLabelCellInfo


@property (nonatomic, copy) NSString *imageUrl;
@property (nonatomic, copy) NSURL *imageUrl;

@property (nonatomic, strong) id image;
@property (nonatomic, strong) UIImage *image;

@property (nonatomic, assign) UIViewContentMode imageContentMode;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ typedef BOOL(^RJTextFieldShouldChangeCharactersBlock)(UITextField *textField,__k

/**RJ 2019-01-17 14:56:56
只添加了常用代理方法的监听,如果需要监听其他代理方法,可以在infoCellInitBlock中将该textField的代理改为自定义对象.
不过届时textLimit和subRegex属性将失效
*/
@property (nonatomic, copy) RJTextFieldDidEndEditingBlock textFieldDidEndEditingBlock;
@property (nonatomic, copy) RJTextFieldShouldChangeCharactersBlock textFieldShouldChangeCharactersBlock;
Expand Down
5 changes: 2 additions & 3 deletions RJTableViewAgent/RJTableViewAgent/Infos/RJTextViewCellInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ typedef void(^RJTextViewDidChangeBlock)(UITextView *textView,__kindof RJTextView
typedef BOOL(^RJTextViewShouldChangeTextBlock)(UITextView *textView,__kindof RJTextViewCellInfo *info,NSRange range,NSString *replacementText);

typedef NS_ENUM(NSUInteger, RJTextViewCellType) {
RJTextViewCellType_UnderLine,
RJTextViewCellType_Border
RJTextViewCellTypeUnderLine,
RJTextViewCellTypeBorder
};

@interface RJTextViewCellInfo : RJBaseCellInfo
Expand Down Expand Up @@ -62,7 +62,6 @@ typedef NS_ENUM(NSUInteger, RJTextViewCellType) {

/**RJ 2019-01-17 15:00:43
只添加了常用代理方法的监听,如果需要监听其他代理方法,可以在infoCellInitBlock中将该textView的代理改为自定义对象.
不过届时textLimit和subRegex属性将失效,另外RJTextViewCellInfo也不能够再根据文本自适应高度,一切由你来自行处理.
*/
@property (nonatomic, copy) RJTextViewDidChangeBlock textViewDidChangeBlock;
@property (nonatomic, copy) RJTextViewShouldChangeTextBlock textViewShouldChangeTextBlock;
Expand Down
5 changes: 3 additions & 2 deletions RJTableViewAgent/RJTableViewAgent/Infos/RJTextViewCellInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ - (instancetype)initWithIndexPath:(NSIndexPath *)indexPath placeholder:(NSString
self.textViewCellCurrentHeight = NSNotFound;
self.textViewScrollEnable = NO;
self.textViewMaxHeight = NSNotFound;
self.textViewCellType = RJTextViewCellTypeUnderLine;
}

return self;
Expand All @@ -46,9 +47,9 @@ - (void)setTextViewCellType:(RJTextViewCellType)textViewCellType{
return;
}
_textViewCellType = textViewCellType;
if (textViewCellType == RJTextViewCellType_Border) {
if (textViewCellType == RJTextViewCellTypeBorder) {
self.lineHidden = YES;
}else if (textViewCellType == RJTextViewCellType_UnderLine){
}else if (textViewCellType == RJTextViewCellTypeUnderLine){
self.lineHidden = NO;
self.textViewMaxHeight = 120;
}
Expand Down
Loading

0 comments on commit 16e1b06

Please sign in to comment.