Commit c1c64c092d26404f5b8a125015572c91c08585e2
1 parent
0e7e3e71
提交更改
Showing
11 changed files
with
408 additions
and
119 deletions
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_must@2x.png
0 → 100644
689 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_must@3x.png
0 → 100644
1.31 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_tip@2x.png
0 → 100644
20.4 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_tip@3x.png
0 → 100644
39.8 KB
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementCommitFinishController.m
| ... | ... | @@ -6,9 +6,31 @@ |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | 8 | #import "CNLiveBAgreementCommitFinishController.h" |
| 9 | +#import <Masonry/Masonry.h> | |
| 10 | +#import "UIImage+OrganizationValidation.h" | |
| 11 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 12 | +#import "CNLiveBOrganizationTextField.h" | |
| 13 | + | |
| 14 | + | |
| 9 | 15 | |
| 10 | 16 | @interface CNLiveBAgreementCommitFinishController () |
| 11 | 17 | |
| 18 | +@property (strong, nonatomic) UIImageView *imageVeiw; | |
| 19 | + | |
| 20 | +@property (strong, nonatomic) UILabel *contentL; | |
| 21 | + | |
| 22 | +@property (strong, nonatomic) UIView *leftTipV; | |
| 23 | + | |
| 24 | +@property (strong, nonatomic) UILabel *tipL; | |
| 25 | + | |
| 26 | +@property (strong, nonatomic) UIView *rightTipV; | |
| 27 | + | |
| 28 | +@property (strong, nonatomic) UILabel *tipContentL; | |
| 29 | + | |
| 30 | +@property (strong, nonatomic) UIButton *returnBtn; | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 12 | 34 | @end |
| 13 | 35 | |
| 14 | 36 | @implementation CNLiveBAgreementCommitFinishController |
| ... | ... | @@ -16,16 +38,188 @@ |
| 16 | 38 | - (void)viewDidLoad { |
| 17 | 39 | [super viewDidLoad]; |
| 18 | 40 | // Do any additional setup after loading the view. |
| 41 | + [self setupUI]; | |
| 42 | + [self layoutUI]; | |
| 19 | 43 | } |
| 20 | 44 | |
| 21 | -/* | |
| 22 | -#pragma mark - Navigation | |
| 45 | +#pragma mark - | |
| 46 | +#pragma mark - *** setupUI *** | |
| 47 | + | |
| 48 | +- (void)setupUI { | |
| 49 | + | |
| 50 | + [self.view setBackgroundColor:[UIColor whiteColor]]; | |
| 51 | + [self.view addSubview:self.imageVeiw]; | |
| 52 | + [self.view addSubview:self.contentL]; | |
| 53 | + [self.view addSubview:self.leftTipV]; | |
| 54 | + [self.view addSubview:self.tipL]; | |
| 55 | + [self.view addSubview:self.rightTipV]; | |
| 56 | + [self.view addSubview:self.tipContentL]; | |
| 57 | + [self.view addSubview:self.returnBtn]; | |
| 58 | + | |
| 59 | + [_returnBtn addTarget:self action:@selector(returnBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | |
| 60 | + | |
| 61 | + [self.imageVeiw setBackgroundColor:[UIColor yellowColor]]; | |
| 62 | + [self.contentL setBackgroundColor:[UIColor yellowColor]]; | |
| 23 | 63 | |
| 24 | -// In a storyboard-based application, you will often want to do a little preparation before navigation | |
| 25 | -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
| 26 | - // Get the new view controller using [segue destinationViewController]. | |
| 27 | - // Pass the selected object to the new view controller. | |
| 64 | + | |
| 28 | 65 | } |
| 29 | -*/ | |
| 66 | + | |
| 67 | +#pragma mark - | |
| 68 | +#pragma mark - *** layoutUI *** | |
| 69 | +- (void)layoutUI { | |
| 70 | + __weak typeof(self) weakSelf = self; | |
| 71 | + [self.imageVeiw mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 72 | + make.top.equalTo(weakSelf.view.mas_top).offset(107.5); | |
| 73 | + make.centerX.equalTo(weakSelf.view.mas_centerX); | |
| 74 | + make.width.mas_equalTo(182); | |
| 75 | + make.height.mas_equalTo(116.5); | |
| 76 | + }]; | |
| 77 | + | |
| 78 | + [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 79 | + make.top.equalTo(weakSelf.imageVeiw.mas_bottom).offset(27); | |
| 80 | + make.centerX.equalTo(weakSelf.view.mas_centerX); | |
| 81 | + make.width.mas_equalTo(375); | |
| 82 | + make.height.mas_equalTo(130); | |
| 83 | + }]; | |
| 84 | + | |
| 85 | + [self.leftTipV mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 86 | + make.bottom.equalTo(weakSelf.view.mas_bottom).offset(-189); | |
| 87 | + make.left.equalTo(weakSelf.view.mas_left).offset(67); | |
| 88 | + make.width.mas_equalTo(78); | |
| 89 | + make.height.mas_equalTo(0.5); | |
| 90 | + }]; | |
| 91 | + | |
| 92 | + [self.rightTipV mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 93 | + make.bottom.equalTo(weakSelf.view.mas_bottom).offset(-189); | |
| 94 | + make.right.equalTo(weakSelf.view.mas_right).offset(-67); | |
| 95 | + make.width.mas_equalTo(78); | |
| 96 | + make.height.mas_equalTo(0.5); | |
| 97 | + }]; | |
| 98 | + | |
| 99 | + [self.tipL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 100 | + make.centerY.equalTo(weakSelf.rightTipV.mas_centerY).offset(0); | |
| 101 | + make.left.equalTo(weakSelf.leftTipV.mas_right).offset(10); | |
| 102 | + make.right.equalTo(weakSelf.rightTipV.mas_left).offset(-10); | |
| 103 | + make.height.mas_equalTo(12); | |
| 104 | + }]; | |
| 105 | + | |
| 106 | + [self.tipContentL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 107 | + make.top.equalTo(weakSelf.tipL.mas_bottom).offset(15); | |
| 108 | + make.left.equalTo(weakSelf.view.mas_left).offset(10); | |
| 109 | + make.right.equalTo(weakSelf.view.mas_right).offset(-10); | |
| 110 | + make.height.mas_equalTo(51); | |
| 111 | + }]; | |
| 112 | + | |
| 113 | + [self.returnBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 114 | + make.bottom.equalTo(weakSelf.view.mas_bottom).offset(-64.5); | |
| 115 | + make.left.equalTo(weakSelf.view.mas_left).offset(23); | |
| 116 | + make.right.equalTo(weakSelf.view.mas_right).offset(-23); | |
| 117 | + make.height.mas_equalTo(45); | |
| 118 | + }]; | |
| 119 | + | |
| 120 | + | |
| 121 | +} | |
| 122 | + | |
| 123 | + | |
| 124 | +#pragma mark - | |
| 125 | +#pragma mark - *** delegate *** | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | +#pragma mark - TODO: | |
| 130 | +#pragma mark - *** 事件实现 *** | |
| 131 | +- (void)returnBtnAction:(UIButton *)button { | |
| 132 | + | |
| 133 | + | |
| 134 | + [self.navigationController popViewControllerAnimated:YES]; | |
| 135 | +} | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | +#pragma mark - | |
| 140 | +#pragma mark - *** 接口 *** | |
| 141 | + | |
| 142 | +#pragma mark - | |
| 143 | +#pragma mark - *** 属性 *** | |
| 144 | + | |
| 145 | +- (UIImageView *)imageVeiw { | |
| 146 | + if (!_imageVeiw) { | |
| 147 | + _imageVeiw = [[UIImageView alloc] initWithFrame:CGRectZero]; | |
| 148 | + _imageVeiw.image = [UIImage imageNamedFromOrganization:@"organization_tip"]; | |
| 149 | + } | |
| 150 | + return _imageVeiw;; | |
| 151 | +} | |
| 152 | + | |
| 153 | + | |
| 154 | +- (UILabel *)contentL { | |
| 155 | + if (!_contentL) { | |
| 156 | + _contentL = [[UILabel alloc]initWithFrame:CGRectZero]; | |
| 157 | + _contentL.textColor = RGBOF(0x999999); | |
| 158 | + _contentL.text = @"您提交资料已完成,查询审核状态需登录PC端操作\n\n请复制链接:http://open.cnlive.com\n\n到电脑浏览器打开查询"; | |
| 159 | + _contentL.font = [UIFont systemFontOfSize:14]; | |
| 160 | + _contentL.numberOfLines = 0; | |
| 161 | + _contentL.textAlignment = NSTextAlignmentCenter; | |
| 162 | + | |
| 163 | + } | |
| 164 | + return _contentL; | |
| 165 | +} | |
| 166 | + | |
| 167 | + | |
| 168 | +- (UIView *)leftTipV { | |
| 169 | + if (!_leftTipV) { | |
| 170 | + _leftTipV = [[UIView alloc]initWithFrame:CGRectZero]; | |
| 171 | + [_leftTipV setBackgroundColor:RGBOF(0xF56950)]; | |
| 172 | + } | |
| 173 | + return _leftTipV; | |
| 174 | +} | |
| 175 | + | |
| 176 | +- (UILabel *)tipL { | |
| 177 | + if (!_tipL) { | |
| 178 | + _tipL = [[UILabel alloc] initWithFrame:CGRectZero]; | |
| 179 | + _tipL.text = @"查询须知:"; | |
| 180 | + _tipL.textColor = RGBOF(0xF56950); | |
| 181 | + _tipL.font = [UIFont systemFontOfSize:11.5]; | |
| 182 | + _tipL.numberOfLines = 1; | |
| 183 | + _tipL.textAlignment = NSTextAlignmentCenter; | |
| 184 | + } | |
| 185 | + return _tipL; | |
| 186 | +} | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | +- (UIView *)rightTipV { | |
| 191 | + if (!_rightTipV) { | |
| 192 | + _rightTipV = [[UIView alloc]initWithFrame:CGRectZero]; | |
| 193 | + [_rightTipV setBackgroundColor:RGBOF(0xF56950)]; | |
| 194 | + } | |
| 195 | + return _rightTipV; | |
| 196 | +} | |
| 197 | + | |
| 198 | +- (UILabel *)tipContentL { | |
| 199 | + if (!_tipContentL) { | |
| 200 | + _tipContentL = [[UILabel alloc]initWithFrame:CGRectZero]; | |
| 201 | + _tipContentL.text = @"若您在PC端从未注册登录,注册时填写的手机号与\n网家家企业端的手机号保持一致,否则无法查询"; | |
| 202 | + _tipContentL.numberOfLines = 0; | |
| 203 | + _tipContentL.font = [UIFont systemFontOfSize:11.5]; | |
| 204 | + _tipContentL.textColor = RGBOF(0xF56950); | |
| 205 | + _tipContentL.textAlignment = NSTextAlignmentCenter; | |
| 206 | + } | |
| 207 | + return _tipContentL; | |
| 208 | +} | |
| 209 | + | |
| 210 | +- (UIButton *)returnBtn { | |
| 211 | + if (!_returnBtn) { | |
| 212 | + _returnBtn = [UIButton buttonWithType:UIButtonTypeSystem]; | |
| 213 | + [_returnBtn setTitle:@"返回" forState:UIControlStateNormal]; | |
| 214 | + _returnBtn.titleLabel.textColor = [UIColor whiteColor]; | |
| 215 | + [_returnBtn setBackgroundColor:RGBOF(0x4CAAFC)]; | |
| 216 | + [_returnBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | |
| 217 | + _returnBtn.layer.masksToBounds = YES; | |
| 218 | + _returnBtn.layer.cornerRadius = 22.5; | |
| 219 | + } | |
| 220 | + return _returnBtn;; | |
| 221 | +} | |
| 222 | + | |
| 223 | + | |
| 30 | 224 | |
| 31 | 225 | @end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.m
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | #import "CNLiveBOrganizationValidattionController.h" |
| 11 | 11 | #import "CNLiveBOrganizationValidationHeaderView.h" |
| 12 | 12 | #import "CNLiveBOrganizationContentCell.h" |
| 13 | +#import "CNLiveBAgreementCommitFinishController.h" | |
| 13 | 14 | |
| 14 | 15 | @interface CNLiveBOrganizationValidattionController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,UITextViewDelegate>{ |
| 15 | 16 | CGPoint contentoffset; |
| ... | ... | @@ -75,6 +76,11 @@ |
| 75 | 76 | self.tableView.tableHeaderView = self.headerView; |
| 76 | 77 | self.tableView.tableFooterView = self.footerView; |
| 77 | 78 | |
| 79 | + __weak typeof(self) weakSelf = self; | |
| 80 | + self.footerView.clickCommitButtonBlock = ^(CNLiveBOrganizationTVFooteriew * _Nonnull footerView, UIButton * _Nonnull commitBtn) { | |
| 81 | + [weakSelf jumpCommitVC]; | |
| 82 | + }; | |
| 83 | + | |
| 78 | 84 | } |
| 79 | 85 | |
| 80 | 86 | #pragma mark - |
| ... | ... | @@ -167,11 +173,12 @@ |
| 167 | 173 | |
| 168 | 174 | }else if (indexPath.row == 6) { |
| 169 | 175 | CNLiveBOrganizationSelectedCell *selectedCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationSelectedCell forIndexPath:indexPath]; |
| 170 | - | |
| 176 | + [selectedCell editUIWithIndexPath:indexPath]; | |
| 171 | 177 | return selectedCell; |
| 172 | 178 | |
| 173 | 179 | }else if (indexPath.row == 1 || indexPath.row == 12) { |
| 174 | 180 | CNLiveBOrganizationImageVSelectedCell *imageVCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationImageVSelectedCell forIndexPath:indexPath]; |
| 181 | + [imageVCell editUIWithIndexPath:indexPath]; | |
| 175 | 182 | return imageVCell; |
| 176 | 183 | }else { |
| 177 | 184 | CNLiveBOrganizationTFCell *tfCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationTFCell forIndexPath:indexPath]; |
| ... | ... | @@ -264,6 +271,11 @@ |
| 264 | 271 | #pragma mark - TODO: |
| 265 | 272 | #pragma mark - *** 事件实现 *** |
| 266 | 273 | |
| 274 | +- (void)jumpCommitVC { | |
| 275 | + CNLiveBAgreementCommitFinishController *commitVC = [[CNLiveBAgreementCommitFinishController alloc]init]; | |
| 276 | + [self.navigationController pushViewController:commitVC animated:YES]; | |
| 277 | +} | |
| 278 | + | |
| 267 | 279 | |
| 268 | 280 | |
| 269 | 281 | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.h
| ... | ... | @@ -57,6 +57,9 @@ NS_ASSUME_NONNULL_BEGIN |
| 57 | 57 | |
| 58 | 58 | @interface CNLiveBOrganizationSelectedCell : UITableViewCell |
| 59 | 59 | |
| 60 | +/** 点击item实现*/ | |
| 61 | +@property (nonatomic, copy) void(^clickSelectedCellBlock)(CNLiveBOrganizationSelectedCell *selectedCell, UIButton *selectedBtn); | |
| 62 | + | |
| 60 | 63 | @property (strong, nonatomic) NSIndexPath *indexPath; |
| 61 | 64 | |
| 62 | 65 | - (void)editUIWithIndexPath:(NSIndexPath *)indexPath; |
| ... | ... | @@ -73,6 +76,10 @@ NS_ASSUME_NONNULL_BEGIN |
| 73 | 76 | |
| 74 | 77 | @interface CNLiveBOrganizationImageVSelectedCell : UITableViewCell |
| 75 | 78 | |
| 79 | +@property (strong, nonatomic) NSIndexPath *indexPath; | |
| 80 | + | |
| 81 | +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath; | |
| 82 | + | |
| 76 | 83 | @end |
| 77 | 84 | |
| 78 | 85 | NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.m
| ... | ... | @@ -15,7 +15,8 @@ |
| 15 | 15 | #pragma mark - UITextField 类型 |
| 16 | 16 | |
| 17 | 17 | @interface CNLiveBOrganizationTFCell() |
| 18 | - | |
| 18 | +/** 必须标记*/ | |
| 19 | +@property (nonatomic, strong) UIImageView *tipImageV; | |
| 19 | 20 | /** 头部*/ |
| 20 | 21 | @property (nonatomic, strong) UILabel *titleL; |
| 21 | 22 | /** 内容*/ |
| ... | ... | @@ -52,41 +53,26 @@ |
| 52 | 53 | - (void)setupUI { |
| 53 | 54 | |
| 54 | 55 | [self setBackgroundColor:[UIColor whiteColor]]; |
| 56 | + [self addSubview:self.tipImageV]; | |
| 55 | 57 | [self addSubview:self.contentTF]; |
| 56 | 58 | [self addSubview:self.titleL]; |
| 57 | 59 | [self addSubview:self.contentL]; |
| 58 | 60 | |
| 59 | 61 | [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFieldTextChange:) name:UITextFieldTextDidChangeNotification object:nil]; |
| 60 | 62 | |
| 63 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 64 | + self.tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 65 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 66 | + self.contentTF.frame = CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5 , 28); | |
| 67 | + self.contentTF.centerY = self.titleL.centerY; | |
| 68 | + self.contentL.frame = CGRectMake(104.5, self.contentTF.bottom + 6, KScreenWidth - 104.5 - 30.5, 10.5); | |
| 69 | + | |
| 61 | 70 | } |
| 62 | 71 | |
| 63 | 72 | #pragma mark - ***layoutUI*** |
| 64 | 73 | - (void)layoutUI { |
| 65 | 74 | |
| 66 | - __weak typeof(self) weakSelf = self; | |
| 67 | - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 68 | - make.left.equalTo(weakSelf.mas_left).offset(10); | |
| 69 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 70 | - make.width.mas_equalTo(72); | |
| 71 | - make.height.mas_equalTo(28); | |
| 72 | - }]; | |
| 73 | - | |
| 74 | - [self.contentTF mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 75 | - make.left.equalTo(weakSelf.titleL.mas_right).offset(15); | |
| 76 | - make.centerY.equalTo(weakSelf.titleL.mas_centerY); | |
| 77 | - make.right.equalTo(weakSelf.mas_right).offset(-30.5); | |
| 78 | - make.height.mas_equalTo(28); | |
| 79 | - }]; | |
| 80 | - | |
| 81 | - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 82 | - make.left.equalTo(weakSelf.contentTF.mas_left); | |
| 83 | - make.top.equalTo(weakSelf.contentTF.mas_bottom).offset(6); | |
| 84 | - make.width.mas_equalTo(weakSelf.contentTF.mas_width); | |
| 85 | - make.height.mas_equalTo(11); | |
| 86 | - }]; | |
| 87 | - | |
| 88 | - | |
| 89 | - | |
| 75 | + | |
| 90 | 76 | } |
| 91 | 77 | |
| 92 | 78 | #pragma mark - editUI |
| ... | ... | @@ -102,11 +88,8 @@ |
| 102 | 88 | if (indexPath.section == 0) { |
| 103 | 89 | if (indexPath.row == 0) { |
| 104 | 90 | |
| 105 | - NSString *titleStr = @"* 公司全称"; | |
| 106 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 107 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 108 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 109 | - self.titleL.attributedText = string; | |
| 91 | + [self contentType:CNLiveBOrganizationTFCellTypeAll]; | |
| 92 | + self.titleL.text = @"公司全称"; | |
| 110 | 93 | self.contentL.text = @"公司注册全称与营业执照一致"; |
| 111 | 94 | self.contentTF.placeholder = @"请输入公司全称"; |
| 112 | 95 | self.contentTF.tfIndexPath = indexPath; |
| ... | ... | @@ -114,80 +97,62 @@ |
| 114 | 97 | |
| 115 | 98 | }else if (indexPath.row == 2) { |
| 116 | 99 | |
| 117 | - NSString *titleStr = @"* 企业简称"; | |
| 118 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 119 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 120 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 121 | - self.titleL.attributedText = string; | |
| 100 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 101 | + self.titleL.text = @"企业简称"; | |
| 122 | 102 | self.contentL.text = @""; |
| 123 | 103 | self.contentTF.placeholder = @"请输入企业简称"; |
| 124 | 104 | self.contentTF.tfIndexPath = indexPath; |
| 125 | 105 | |
| 126 | 106 | }else if (indexPath.row == 3) { |
| 127 | 107 | |
| 128 | - NSString *titleStr = @"* 企业代码"; | |
| 129 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 130 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 131 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 132 | - self.titleL.attributedText = string; | |
| 108 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 109 | + self.titleL.text = @"企业代码"; | |
| 133 | 110 | self.contentL.text = @""; |
| 134 | 111 | self.contentTF.placeholder = @"请输入企业代码"; |
| 135 | 112 | self.contentTF.tfIndexPath = indexPath; |
| 136 | 113 | |
| 137 | 114 | }else if (indexPath.row == 5) { |
| 138 | 115 | |
| 139 | - NSString *titleStr = @"企业地址"; | |
| 140 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 141 | - self.titleL.attributedText = string; | |
| 116 | + [self contentType:CNLiveBOrganizationTFCellTypeNormal]; | |
| 117 | + self.titleL.text = @"企业地址"; | |
| 142 | 118 | self.contentL.text = @""; |
| 143 | 119 | self.contentTF.placeholder = @"请输入企业地址"; |
| 144 | 120 | self.contentTF.tfIndexPath = indexPath; |
| 145 | 121 | |
| 146 | 122 | }else if (indexPath.row == 7) { |
| 147 | 123 | |
| 148 | - NSString *titleStr = @"* 网站"; | |
| 149 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 150 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 151 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 152 | - self.titleL.attributedText = string; | |
| 124 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 125 | + self.titleL.text = @"网站"; | |
| 153 | 126 | self.contentL.text = @""; |
| 154 | 127 | self.contentTF.placeholder = @"请输入企业网站访问链接"; |
| 155 | 128 | self.contentTF.tfIndexPath = indexPath; |
| 156 | 129 | |
| 157 | 130 | }else if (indexPath.row == 8) { |
| 158 | - NSString *titleStr = @"* 企业法人"; | |
| 159 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 160 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 161 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 162 | - self.titleL.attributedText = string; | |
| 131 | + | |
| 132 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 133 | + self.titleL.text = @"企业法人"; | |
| 163 | 134 | self.contentL.text = @""; |
| 164 | 135 | self.contentTF.placeholder = @"请输入企业法人姓名"; |
| 165 | 136 | self.contentTF.tfIndexPath = indexPath; |
| 166 | 137 | |
| 167 | 138 | }else if (indexPath.row == 9) { |
| 168 | - NSString *titleStr = @"* 联系人"; | |
| 169 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 170 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 171 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 172 | - self.titleL.attributedText = string; | |
| 139 | + | |
| 140 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 141 | + self.titleL.text = @"联系人"; | |
| 173 | 142 | self.contentL.text = @""; |
| 174 | 143 | self.contentTF.placeholder = @"请输入企业联系人姓名"; |
| 175 | 144 | self.contentTF.tfIndexPath = indexPath; |
| 176 | 145 | |
| 177 | 146 | }else if (indexPath.row == 10) { |
| 178 | - NSString *titleStr = @"合同编号"; | |
| 179 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 180 | - self.titleL.attributedText = string; | |
| 147 | + [self contentType:CNLiveBOrganizationTFCellTypeNormal]; | |
| 148 | + self.titleL.text = @"合同编号"; | |
| 181 | 149 | self.contentL.text = @""; |
| 182 | 150 | self.contentTF.placeholder = @"请输入合同编号"; |
| 183 | 151 | self.contentTF.tfIndexPath = indexPath; |
| 184 | 152 | |
| 185 | 153 | }else if (indexPath.row == 11) { |
| 186 | - NSString *titleStr = @"* 营业执照号"; | |
| 187 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 188 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 189 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 190 | - self.titleL.attributedText = string; | |
| 154 | + [self contentType:CNLiveBOrganizationTFCellTypeMust]; | |
| 155 | + self.titleL.text = @"营业执照号"; | |
| 191 | 156 | self.contentL.text = @""; |
| 192 | 157 | self.contentTF.placeholder = @"请输入营业执照号"; |
| 193 | 158 | self.contentTF.tfIndexPath = indexPath; |
| ... | ... | @@ -227,8 +192,37 @@ |
| 227 | 192 | } |
| 228 | 193 | |
| 229 | 194 | #pragma mark - ***私有方法*** |
| 195 | +- (void)contentType:(CNLiveBOrganizationTFCellType) type{ | |
| 196 | + | |
| 197 | + if (type == CNLiveBOrganizationTFCellTypeMust) { | |
| 198 | + self.tipImageV.hidden = NO; | |
| 199 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 200 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 201 | + self.contentL.hidden = YES; | |
| 202 | + }else if (type == CNLiveBOrganizationTFCellTypeNormal) { | |
| 203 | + self.tipImageV.hidden = YES; | |
| 204 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 205 | + self.titleL.frame = CGRectMake(10, 16, 72, 12); | |
| 206 | + self.contentL.hidden = YES; | |
| 207 | + | |
| 208 | + }else { | |
| 209 | + self.tipImageV.hidden = NO; | |
| 210 | + self.tipImageV.frame = CGRectMake(10, 18, 7, 8); | |
| 211 | + self.titleL.frame = CGRectMake(21.5,16, 72, 12); | |
| 212 | + self.contentL.hidden = NO; | |
| 213 | + } | |
| 214 | + | |
| 215 | +} | |
| 216 | + | |
| 230 | 217 | #pragma mark - ***懒加载*** |
| 231 | 218 | |
| 219 | +- (UIImageView *)tipImageV { | |
| 220 | + if (!_tipImageV) { | |
| 221 | + _tipImageV = [[UIImageView alloc]init]; | |
| 222 | + } | |
| 223 | + return _tipImageV; | |
| 224 | +} | |
| 225 | + | |
| 232 | 226 | /*** 头部 ***/ |
| 233 | 227 | - (UILabel *)titleL { |
| 234 | 228 | |
| ... | ... | @@ -285,6 +279,8 @@ |
| 285 | 279 | |
| 286 | 280 | @interface CNLiveBOrganizationTViewCell() |
| 287 | 281 | |
| 282 | +/** 必须标记*/ | |
| 283 | +@property (nonatomic, strong) UIImageView *tipImageV; | |
| 288 | 284 | /** 头部*/ |
| 289 | 285 | @property (nonatomic, strong) UILabel *titleL; |
| 290 | 286 | |
| ... | ... | @@ -322,6 +318,11 @@ |
| 322 | 318 | [self setBackgroundColor:[UIColor whiteColor]]; |
| 323 | 319 | [self addSubview:self.contentTV]; |
| 324 | 320 | [self addSubview:self.titleL]; |
| 321 | + [self addSubview:self.tipImageV]; | |
| 322 | + | |
| 323 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 324 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 325 | + self.contentTV.frame = CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 78); | |
| 325 | 326 | |
| 326 | 327 | [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textViewTextChange:) name:UITextViewTextDidChangeNotification object:nil]; |
| 327 | 328 | |
| ... | ... | @@ -329,16 +330,7 @@ |
| 329 | 330 | |
| 330 | 331 | #pragma mark - ***layoutUI*** |
| 331 | 332 | - (void)layoutUI { |
| 332 | - | |
| 333 | - __weak typeof(self) weakSelf = self; | |
| 334 | - | |
| 335 | - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 336 | - make.left.equalTo(weakSelf.mas_left).offset(10); | |
| 337 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 338 | - make.width.mas_equalTo(72); | |
| 339 | - make.height.mas_equalTo(28); | |
| 340 | - }]; | |
| 341 | - | |
| 333 | + | |
| 342 | 334 | |
| 343 | 335 | |
| 344 | 336 | } |
| ... | ... | @@ -355,11 +347,7 @@ |
| 355 | 347 | |
| 356 | 348 | if (indexPath.section == 0) { |
| 357 | 349 | if (indexPath.row == 4) { |
| 358 | - NSString *titleStr = @"* 企业简介"; | |
| 359 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 360 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 361 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 362 | - self.titleL.attributedText = string; | |
| 350 | + self.titleL.text = @"企业简介"; | |
| 363 | 351 | self.contentTV.placeholder = @"请输入企业简介(400字以内)"; |
| 364 | 352 | self.contentTV.placeholderFont = [UIFont systemFontOfSize:12]; |
| 365 | 353 | self.contentTV.placeholderColor = RGBOF(0xB9B9B9); |
| ... | ... | @@ -394,6 +382,15 @@ |
| 394 | 382 | |
| 395 | 383 | #pragma mark - ***私有方法*** |
| 396 | 384 | #pragma mark - ***懒加载*** |
| 385 | +- (UIImageView *)tipImageV { | |
| 386 | + if (!_tipImageV) { | |
| 387 | + _tipImageV = [[UIImageView alloc]init]; | |
| 388 | + _tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 389 | + } | |
| 390 | + return _tipImageV; | |
| 391 | +} | |
| 392 | + | |
| 393 | + | |
| 397 | 394 | /*** 头部 ***/ |
| 398 | 395 | - (UILabel *)titleL { |
| 399 | 396 | |
| ... | ... | @@ -435,11 +432,16 @@ |
| 435 | 432 | #pragma mark - CNLiveBOrganizationSelectedCell 类型 |
| 436 | 433 | |
| 437 | 434 | @interface CNLiveBOrganizationSelectedCell() |
| 435 | + | |
| 436 | + | |
| 437 | +/** 必须标记*/ | |
| 438 | +@property (nonatomic, strong) UIImageView *tipImageV; | |
| 438 | 439 | /** 头部*/ |
| 439 | 440 | @property (nonatomic, strong) UILabel *titleL; |
| 440 | 441 | /** 认证*/ |
| 441 | 442 | @property (nonatomic, strong) UIButton *selectedBtn; |
| 442 | 443 | |
| 444 | + | |
| 443 | 445 | @end |
| 444 | 446 | |
| 445 | 447 | @implementation CNLiveBOrganizationSelectedCell |
| ... | ... | @@ -473,32 +475,22 @@ |
| 473 | 475 | [self setBackgroundColor:[UIColor whiteColor]]; |
| 474 | 476 | [self addSubview:self.titleL]; |
| 475 | 477 | [self addSubview:self.selectedBtn]; |
| 478 | + [self addSubview:self.tipImageV]; | |
| 479 | + | |
| 480 | + | |
| 481 | + self.tipImageV.frame = CGRectMake(10, 18, 7, 8); | |
| 482 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 483 | + self.selectedBtn.frame = CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 28); | |
| 476 | 484 | |
| 477 | - self.titleL.text = @"* 企业类型"; | |
| 478 | - [self.selectedBtn setBackgroundColor:[UIColor yellowColor]]; | |
| 485 | + self.titleL.text = @"企业类型"; | |
| 486 | + | |
| 487 | + [self.selectedBtn addTarget:self action:@selector(selectedBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | |
| 479 | 488 | |
| 480 | 489 | } |
| 481 | 490 | |
| 482 | 491 | #pragma mark - ***layoutUI*** |
| 483 | 492 | - (void)layoutUI { |
| 484 | - | |
| 485 | - __weak typeof(self) weakSelf = self; | |
| 486 | - | |
| 487 | - [self.selectedBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 488 | - make.left.equalTo(weakSelf.titleL.mas_right).offset(16); | |
| 489 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 490 | - make.right.equalTo(weakSelf.mas_right).offset(-30.5); | |
| 491 | - make.height.mas_equalTo(28); | |
| 492 | - }]; | |
| 493 | - | |
| 494 | - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 495 | - make.left.equalTo(weakSelf.mas_left).offset(10); | |
| 496 | - make.centerY.equalTo(weakSelf.selectedBtn.mas_centerY); | |
| 497 | - make.width.mas_equalTo(72); | |
| 498 | - make.height.mas_equalTo(28); | |
| 499 | - }]; | |
| 500 | - | |
| 501 | - | |
| 493 | + | |
| 502 | 494 | |
| 503 | 495 | } |
| 504 | 496 | |
| ... | ... | @@ -513,11 +505,7 @@ |
| 513 | 505 | |
| 514 | 506 | if (indexPath.section == 0) { |
| 515 | 507 | if (indexPath.row == 6) { |
| 516 | - NSString *titleStr = @"* 企业类型"; | |
| 517 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 518 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 519 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 520 | - self.titleL.attributedText = string; | |
| 508 | + self.titleL.text = @"企业类型"; | |
| 521 | 509 | |
| 522 | 510 | }else { |
| 523 | 511 | return; |
| ... | ... | @@ -530,12 +518,29 @@ |
| 530 | 518 | |
| 531 | 519 | |
| 532 | 520 | #pragma mark - ***事件实现*** |
| 533 | - | |
| 521 | +- (void)selectedBtnAction:(UIButton *)button { | |
| 522 | + | |
| 523 | + if (self.clickSelectedCellBlock) { | |
| 524 | + self.clickSelectedCellBlock(self, button); | |
| 525 | + } | |
| 526 | + | |
| 527 | + | |
| 528 | +} | |
| 534 | 529 | |
| 535 | 530 | |
| 536 | 531 | |
| 537 | 532 | #pragma mark - ***私有方法*** |
| 538 | 533 | #pragma mark - ***懒加载*** |
| 534 | + | |
| 535 | +- (UIImageView *)tipImageV { | |
| 536 | + if (!_tipImageV) { | |
| 537 | + _tipImageV = [[UIImageView alloc]init]; | |
| 538 | + _tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 539 | + } | |
| 540 | + return _tipImageV; | |
| 541 | +} | |
| 542 | + | |
| 543 | + | |
| 539 | 544 | /*** 头部 ***/ |
| 540 | 545 | - (UILabel *)titleL { |
| 541 | 546 | |
| ... | ... | @@ -558,6 +563,7 @@ |
| 558 | 563 | _selectedBtn.layer.cornerRadius = 5; |
| 559 | 564 | _selectedBtn.layer.borderColor = RGBOF(0xc1c1c1).CGColor; |
| 560 | 565 | _selectedBtn.layer.borderWidth = 0.5; |
| 566 | + | |
| 561 | 567 | } |
| 562 | 568 | return _selectedBtn; |
| 563 | 569 | } |
| ... | ... | @@ -620,9 +626,8 @@ |
| 620 | 626 | [self addSubview:self.titleL]; |
| 621 | 627 | [self addSubview:self.contentL]; |
| 622 | 628 | |
| 623 | - //测试 | |
| 624 | 629 | self.titleL.text = @"* 企业logo"; |
| 625 | - self.contentL.text = @"请上传LOGO图片(尺寸100*100,图片大小5M以内"; | |
| 630 | + | |
| 626 | 631 | [self.contentImageView setBackgroundColor:[UIColor yellowColor]]; |
| 627 | 632 | } |
| 628 | 633 | |
| ... | ... | @@ -635,7 +640,7 @@ |
| 635 | 640 | make.left.equalTo(weakSelf.mas_left).offset(10); |
| 636 | 641 | make.top.equalTo(weakSelf.mas_top).offset(8); |
| 637 | 642 | make.width.mas_equalTo(72); |
| 638 | - make.height.mas_equalTo(28); | |
| 643 | + make.height.mas_equalTo(12); | |
| 639 | 644 | }]; |
| 640 | 645 | |
| 641 | 646 | [self.contentImageView mas_makeConstraints:^(MASConstraintMaker *make) { |
| ... | ... | @@ -656,6 +661,54 @@ |
| 656 | 661 | } |
| 657 | 662 | |
| 658 | 663 | #pragma mark - editUI |
| 664 | +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath { | |
| 665 | + | |
| 666 | + self.indexPath = indexPath; | |
| 667 | + | |
| 668 | + __weak typeof(self) weakSelf = self; | |
| 669 | + if (indexPath.section == 0) { | |
| 670 | + if (indexPath.row == 1) { | |
| 671 | + NSString *titleStr = @"* 企业logo"; | |
| 672 | + NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 673 | + NSRange range = [titleStr rangeOfString:@"*"]; | |
| 674 | + [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 675 | + self.titleL.attributedText = string; | |
| 676 | + self.contentL.text = @"请上传LOGO图片(尺寸100*100,图片大小5M以内"; | |
| 677 | + | |
| 678 | + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 679 | + make.left.equalTo(weakSelf.titleL.mas_right).offset(23); | |
| 680 | + make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 681 | + make.width.mas_offset(60); | |
| 682 | + make.height.mas_equalTo(60); | |
| 683 | + }]; | |
| 684 | + | |
| 685 | + | |
| 686 | + }else if (indexPath.row == 12){ | |
| 687 | + NSString *titleStr = @"* 营业执照:"; | |
| 688 | + NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 689 | + NSRange range = [titleStr rangeOfString:@"*"]; | |
| 690 | + [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 691 | + self.titleL.attributedText = string; | |
| 692 | + | |
| 693 | + self.contentL.text = @"请上传营业执照图片,格式为JPG,PNG(图片大小不超过5M)"; | |
| 694 | + | |
| 695 | + [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 696 | + make.left.equalTo(weakSelf.titleL.mas_right).offset(23); | |
| 697 | + make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 698 | + make.width.mas_offset(100); | |
| 699 | + make.height.mas_equalTo(137); | |
| 700 | + }]; | |
| 701 | + | |
| 702 | + | |
| 703 | + }else { | |
| 704 | + return; | |
| 705 | + | |
| 706 | + } | |
| 707 | + }else { | |
| 708 | + return; | |
| 709 | + } | |
| 710 | + | |
| 711 | +} | |
| 659 | 712 | |
| 660 | 713 | |
| 661 | 714 | #pragma mark - ***事件实现*** |
| ... | ... | @@ -664,6 +717,16 @@ |
| 664 | 717 | |
| 665 | 718 | |
| 666 | 719 | #pragma mark - ***私有方法*** |
| 720 | +- (NSMutableAttributedString *)returnAllContentWithTitle:(NSString *)title content:(NSString *)content { | |
| 721 | + NSString *titleStr = [NSString stringWithFormat:@"%@",title ? title : @""]; | |
| 722 | + NSString *contentStr = [NSString stringWithFormat:@"%@ %@",title ? title : @"",content ? content : @""]; | |
| 723 | + NSMutableAttributedString *allStr = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName: RGBOF(0xB9B9B9)}]; | |
| 724 | + NSRange rang = [contentStr rangeOfString:titleStr]; | |
| 725 | + [allStr addAttributes:@{NSForegroundColorAttributeName: RGBOF(0x333333)} range:rang]; | |
| 726 | + return allStr; | |
| 727 | + | |
| 728 | +} | |
| 729 | + | |
| 667 | 730 | #pragma mark - ***懒加载*** |
| 668 | 731 | /*** 头部 ***/ |
| 669 | 732 | - (UILabel *)titleL { | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailCell.m
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.h
| ... | ... | @@ -35,6 +35,9 @@ NS_ASSUME_NONNULL_BEGIN |
| 35 | 35 | |
| 36 | 36 | @interface CNLiveBOrganizationTVFooteriew : UIView |
| 37 | 37 | |
| 38 | +/** 点击item实现*/ | |
| 39 | +@property (nonatomic, copy) void(^clickCommitButtonBlock)(CNLiveBOrganizationTVFooteriew *footerView, UIButton *commitBtn); | |
| 40 | + | |
| 38 | 41 | /** 协议按钮*/ |
| 39 | 42 | @property (nonatomic, strong) UIButton *agreementBtn; |
| 40 | 43 | /** 协议文字*/ | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.m
| ... | ... | @@ -318,6 +318,8 @@ |
| 318 | 318 | [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:11], NSForegroundColorAttributeName: [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]} range:range]; |
| 319 | 319 | _agreementL.attributedText = string; |
| 320 | 320 | |
| 321 | + [self.commitBtn addTarget:self action:@selector(commitBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | |
| 322 | + | |
| 321 | 323 | } |
| 322 | 324 | |
| 323 | 325 | #pragma mark - ***layoutUI*** |
| ... | ... | @@ -350,6 +352,14 @@ |
| 350 | 352 | #pragma mark - editUI |
| 351 | 353 | |
| 352 | 354 | #pragma mark - ***事件实现*** |
| 355 | +- (void)commitBtnAction:(UIButton *)btn { | |
| 356 | + | |
| 357 | + if (self.clickCommitButtonBlock) { | |
| 358 | + self.clickCommitButtonBlock(self, btn); | |
| 359 | + } | |
| 360 | + | |
| 361 | + | |
| 362 | +} | |
| 353 | 363 | |
| 354 | 364 | |
| 355 | 365 | #pragma mark - ***私有方法*** | ... | ... |