Commit 0e7e3e71a9ade43df12d889141c9d15568920471

Authored by 梁星国
1 parent 4c53cc7f

提交公司认证详情UI

Showing 24 changed files with 1988 additions and 789 deletions
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_detail_company@2x.png 0 → 100644

1.18 KB

CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_detail_company@3x.png 0 → 100644

2.81 KB

CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOraganizationDetailController.h 0 → 100644
  1 +//
  2 +// CNLiveBOraganizationDetailController.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOraganizationDetailController : UIViewController
  13 +
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOraganizationDetailController.m 0 → 100644
  1 +//
  2 +// CNLiveBOraganizationDetailController.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
  9 +
  10 +#import "CNLiveBOraganizationDetailController.h"
  11 +#import "CNLiveBOrganizationDetailHeaderView.h"
  12 +#import "CNLiveBOrganizationDetailCell.h"
  13 +
  14 +@interface CNLiveBOraganizationDetailController ()
  15 +<UITableViewDataSource,UITableViewDelegate>
  16 +
  17 +/** 头部*/
  18 +@property (nonatomic , strong) CNLiveBOrganizationDetailHeaderView *headerView;
  19 +///** 脚部*/
  20 +//@property (nonatomic , strong) CNLiveBOrganizationTVFooteriew *footerView;
  21 +
  22 +/** 列表 */
  23 +@property (nonatomic , strong) UITableView *tableView;
  24 +
  25 +
  26 +
  27 +@end
  28 +
  29 +@implementation CNLiveBOraganizationDetailController
  30 +
  31 +#pragma mark -
  32 +#pragma mark - *** 生命周期 ***
  33 +
  34 +- (instancetype)init
  35 +{
  36 + self = [super init];
  37 + if (self) {
  38 +
  39 + }
  40 + return self;
  41 +}
  42 +
  43 +- (void)dealloc
  44 +{
  45 +
  46 +}
  47 +
  48 +- (void)viewWillAppear:(BOOL)animated {
  49 + [super viewWillAppear:animated];
  50 +}
  51 +
  52 +- (void)viewDidLoad {
  53 + [super viewDidLoad];
  54 +
  55 + [self editUI];
  56 +}
  57 +
  58 +- (void)viewDidAppear:(BOOL)animated {
  59 + [super viewDidAppear:animated];
  60 +}
  61 +
  62 +- (void)viewDidDisappear:(BOOL)animated {
  63 + [super viewDidDisappear:animated];
  64 +}
  65 +
  66 +#pragma mark -
  67 +#pragma mark - *** editUI ***
  68 +
  69 +- (void)editUI {
  70 +
  71 + [self.view setBackgroundColor:[UIColor whiteColor]];
  72 +
  73 + [self.view addSubview:self.tableView];
  74 + self.tableView.tableHeaderView = self.headerView;
  75 +
  76 +// self.tableView.tableFooterView = self.footerView;
  77 +
  78 +}
  79 +
  80 +#pragma mark -
  81 +#pragma mark - *** layoutUI ***
  82 +
  83 +
  84 +#pragma mark -
  85 +#pragma mark - *** delegate ***
  86 +
  87 +
  88 +
  89 +#pragma mark - <UITableViewDelegate, UITableViewDataSource>
  90 +
  91 +//设置显示个数
  92 +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  93 +
  94 + return 1;
  95 +}
  96 +
  97 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  98 +
  99 + if (section == 0) {
  100 + return 13;
  101 + }else {
  102 + return 0;
  103 + }
  104 +
  105 +}
  106 +
  107 +//设置UI
  108 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  109 +
  110 + if (indexPath.section == 0) {
  111 + if (indexPath.row == 1 || indexPath.row == 12) {
  112 + CNLiveBOrganizationImageVDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationImageVDetailCell forIndexPath:indexPath];
  113 + [cell editUIWithIndexPath:indexPath];
  114 + return cell;
  115 +
  116 +
  117 + }else {
  118 + CNLiveBOrganizationDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationDetailCell forIndexPath:indexPath];
  119 + [cell editUIWithIndexPath:indexPath];
  120 + return cell;
  121 + }
  122 +
  123 +
  124 + }else {
  125 + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
  126 + [cell setBackgroundColor:[UIColor yellowColor]];
  127 + return cell;
  128 +
  129 +
  130 + }
  131 +
  132 +}
  133 +
  134 +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  135 +
  136 + return [UIView new];
  137 +
  138 +}
  139 +
  140 +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
  141 +
  142 + if (section == 0) {
  143 + return [UIView new];
  144 +
  145 + }else {
  146 + return [UIView new];
  147 + }
  148 +}
  149 +
  150 +//设置高度
  151 +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  152 +
  153 + if (indexPath.section == 0) {
  154 + if (indexPath.row == 1){
  155 + return 80;
  156 + }else if (indexPath.row == 12){
  157 + return 200;
  158 + }else {
  159 + return 32;
  160 + }
  161 +
  162 + }else {
  163 + return 0.01;
  164 + }
  165 +
  166 +}
  167 +
  168 +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  169 +
  170 + return 0.01;
  171 +
  172 +}
  173 +
  174 +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  175 +
  176 + return 0.01;
  177 +
  178 +}
  179 +
  180 +/** 点击cell实现 */
  181 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  182 +
  183 +
  184 +
  185 +}
  186 +
  187 +
  188 +#pragma mark - TODO:
  189 +#pragma mark - *** 事件实现 ***
  190 +
  191 +
  192 +
  193 +
  194 +#pragma mark -
  195 +#pragma mark - *** 接口 ***
  196 +
  197 +#pragma mark -
  198 +#pragma mark - *** 私有属性 ***
  199 +
  200 +- (UITableView *)tableView {
  201 + if (_tableView == nil) {
  202 + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStyleGrouped];
  203 + _tableView.backgroundColor = [UIColor whiteColor];
  204 + [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
  205 + [_tableView registerClass:[CNLiveBOrganizationImageVDetailCell class] forCellReuseIdentifier:kCNLiveBOrganizationImageVDetailCell];
  206 + [_tableView registerClass:[CNLiveBOrganizationDetailCell class] forCellReuseIdentifier:kCNLiveBOrganizationDetailCell];
  207 + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  208 + _tableView.dataSource = self;
  209 + _tableView.delegate = self;
  210 +
  211 + }
  212 + return _tableView;
  213 +}
  214 +
  215 +- (UIView *)headerView {
  216 + if (!_headerView) {
  217 + _headerView = [[CNLiveBOrganizationDetailHeaderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 52)];
  218 + }
  219 + return _headerView;;
  220 +}
  221 +//
  222 +//
  223 +//- (UIView *)footerView {
  224 +// if (!_footerView) {
  225 +// _footerView = [[CNLiveBOrganizationTVFooteriew alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 106)];
  226 +// }
  227 +// return _footerView;
  228 +//}
  229 +
  230 +
  231 +/*
  232 + #pragma mark - Navigation
  233 +
  234 + // In a storyboard-based application, you will often want to do a little preparation before navigation
  235 + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  236 + // Get the new view controller using [segue destinationViewController].
  237 + // Pass the selected object to the new view controller.
  238 + }
  239 + */
  240 +
  241 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.m
@@ -9,11 +9,16 @@ @@ -9,11 +9,16 @@
9 9
10 #import "CNLiveBOrganizationValidattionController.h" 10 #import "CNLiveBOrganizationValidattionController.h"
11 #import "CNLiveBOrganizationValidationHeaderView.h" 11 #import "CNLiveBOrganizationValidationHeaderView.h"
  12 +#import "CNLiveBOrganizationContentCell.h"
12 13
13 -@interface CNLiveBOrganizationValidattionController ()<UITableViewDataSource,UITableViewDelegate> 14 +@interface CNLiveBOrganizationValidattionController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,UITextViewDelegate>{
  15 + CGPoint contentoffset;
  16 +}
14 17
15 /** 头部*/ 18 /** 头部*/
16 @property (nonatomic , strong) CNLiveBOrganizationValidationHeaderView *headerView; 19 @property (nonatomic , strong) CNLiveBOrganizationValidationHeaderView *headerView;
  20 +/** 脚部*/
  21 +@property (nonatomic , strong) CNLiveBOrganizationTVFooteriew *footerView;
17 22
18 /** 列表 */ 23 /** 列表 */
19 @property (nonatomic , strong) UITableView *tableView; 24 @property (nonatomic , strong) UITableView *tableView;
@@ -68,6 +73,7 @@ @@ -68,6 +73,7 @@
68 [self.view addSubview:self.tableView]; 73 [self.view addSubview:self.tableView];
69 74
70 self.tableView.tableHeaderView = self.headerView; 75 self.tableView.tableHeaderView = self.headerView;
  76 + self.tableView.tableFooterView = self.footerView;
71 77
72 } 78 }
73 79
@@ -78,6 +84,59 @@ @@ -78,6 +84,59 @@
78 #pragma mark - 84 #pragma mark -
79 #pragma mark - *** delegate *** 85 #pragma mark - *** delegate ***
80 86
  87 +#pragma mark textfield delegate
  88 +
  89 +-(void)textFieldDidBeginEditing:(UITextField *)textField
  90 +{
  91 + if (!textField.superview || !textField) {
  92 + return;
  93 + }
  94 + CNLiveBOrganizationTextField *TF = (CNLiveBOrganizationTextField *)textField;
  95 + if ([TF.superview isKindOfClass:[CNLiveBOrganizationTFCell class]]) {
  96 + NSIndexPath *indexpath = [self.tableView indexPathForCell:((CNLiveBOrganizationTFCell *)textField.superview)];
  97 + //获取当前cell在tableview中的位置
  98 + CGRect rectInTableview = [self.tableView rectForRowAtIndexPath:indexpath];
  99 + //获取当前cell在屏幕中的位置
  100 +// CGRect rectInSuperview = [self.tableView convertRect:rectInTableview fromView:self.tableView.superview];
  101 + contentoffset.x = self.tableView.contentOffset.x;
  102 + contentoffset.y = self.tableView.contentOffset.y;
  103 + if ((rectInTableview.origin.y+50-self.tableView.contentOffset.y)>200) {
  104 + [self.tableView setContentOffset:CGPointMake(self.tableView.contentOffset.x,((rectInTableview.origin.y-self.tableView.contentOffset.y)-150)+self.tableView.contentOffset.y) animated:YES];
  105 +
  106 + }
  107 +
  108 + }
  109 +
  110 +}
  111 +
  112 +#pragma mark textView delegate
  113 +
  114 +-(void)textViewDidBeginEditing:(UITextView *)textView
  115 +{
  116 + if (!textView.superview || !textView) {
  117 + return;
  118 + }
  119 + CNLiveBOrganizationTextView *TV = (CNLiveBOrganizationTextView *)textView;
  120 + if ([TV.superview isKindOfClass:[CNLiveBOrganizationTViewCell class]]) {
  121 + NSIndexPath *indexpath = [self.tableView indexPathForCell:((CNLiveBOrganizationTViewCell *)textView.superview)];
  122 + //获取当前cell在tableview中的位置
  123 + CGRect rectInTableview = [self.tableView rectForRowAtIndexPath:indexpath];
  124 + //获取当前cell在屏幕中的位置
  125 +// CGRect rectInSuperview = [self.tableView convertRect:rectInTableview fromView:self.tableView.superview];
  126 + contentoffset.x = self.tableView.contentOffset.x;
  127 + contentoffset.y = self.tableView.contentOffset.y;
  128 + if ((rectInTableview.origin.y+50-self.tableView.contentOffset.y)>200) {
  129 + [self.tableView setContentOffset:CGPointMake(self.tableView.contentOffset.x,((rectInTableview.origin.y-self.tableView.contentOffset.y)-150)+self.tableView.contentOffset.y) animated:YES];
  130 +
  131 + }
  132 +
  133 + }
  134 +
  135 +}
  136 +
  137 +
  138 +
  139 +
81 #pragma mark - <UITableViewDelegate, UITableViewDataSource> 140 #pragma mark - <UITableViewDelegate, UITableViewDataSource>
82 141
83 //设置显示个数 142 //设置显示个数
@@ -98,9 +157,34 @@ @@ -98,9 +157,34 @@
98 157
99 //设置UI 158 //设置UI
100 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 159 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
101 - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];  
102 - [cell setBackgroundColor:[UIColor yellowColor]];  
103 - return cell; 160 +
  161 + if (indexPath.section == 0) {
  162 + if (indexPath.row == 4) {
  163 + CNLiveBOrganizationTViewCell *tvCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationTViewCell forIndexPath:indexPath];
  164 + [tvCell editUIWithIndexPath:indexPath];
  165 + tvCell.contentTV.delegate = self;
  166 + return tvCell;
  167 +
  168 + }else if (indexPath.row == 6) {
  169 + CNLiveBOrganizationSelectedCell *selectedCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationSelectedCell forIndexPath:indexPath];
  170 +
  171 + return selectedCell;
  172 +
  173 + }else if (indexPath.row == 1 || indexPath.row == 12) {
  174 + CNLiveBOrganizationImageVSelectedCell *imageVCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationImageVSelectedCell forIndexPath:indexPath];
  175 + return imageVCell;
  176 + }else {
  177 + CNLiveBOrganizationTFCell *tfCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationTFCell forIndexPath:indexPath];
  178 + [tfCell editUIWithIndexPath:indexPath];
  179 + tfCell.contentTF.delegate = self;
  180 + return tfCell;
  181 + }
  182 +
  183 + }else {
  184 + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
  185 + [cell setBackgroundColor:[UIColor yellowColor]];
  186 + return cell;
  187 + }
104 188
105 } 189 }
106 190
@@ -120,8 +204,7 @@ @@ -120,8 +204,7 @@
120 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { 204 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
121 205
122 if (section == 0) { 206 if (section == 0) {
123 - CNLiveBOrganizationTVFooteriew *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:kCNLiveBOrganizationTVFooteriew];  
124 - return footerView; 207 + return [UIView new];
125 208
126 }else { 209 }else {
127 return [UIView new]; 210 return [UIView new];
@@ -131,15 +214,29 @@ @@ -131,15 +214,29 @@
131 //设置高度 214 //设置高度
132 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 215 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
133 216
134 - return 80;  
135 - 217 + if (indexPath.section == 0) {
  218 + if (indexPath.row == 0) {
  219 + return 60.5;
  220 + }else if (indexPath.row == 1){
  221 + return 120;
  222 + }else if (indexPath.row == 4){
  223 + return 100;
  224 + }else if (indexPath.row == 12){
  225 + return 200;
  226 + }else {
  227 + return 44;
  228 + }
  229 +
  230 + }else {
  231 + return 80;
  232 + }
136 233
137 } 234 }
138 235
139 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 236 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
140 237
141 if (section == 0) { 238 if (section == 0) {
142 - return 42;; 239 + return 42;
143 }else { 240 }else {
144 return 0.01; 241 return 0.01;
145 } 242 }
@@ -149,7 +246,7 @@ @@ -149,7 +246,7 @@
149 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { 246 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
150 247
151 if (section == 0) { 248 if (section == 0) {
152 - return 106; 249 + return 0.01;
153 }else { 250 }else {
154 return 0.01; 251 return 0.01;
155 } 252 }
@@ -181,12 +278,12 @@ @@ -181,12 +278,12 @@
181 _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStyleGrouped]; 278 _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStyleGrouped];
182 _tableView.backgroundColor = [UIColor whiteColor]; 279 _tableView.backgroundColor = [UIColor whiteColor];
183 [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"]; 280 [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
184 -// [_tableView registerClass:[CNLiveBServiceCertificationCell class] forCellReuseIdentifier:kCNLiveBServiceCertificationCell];  
185 -// [_tableView registerClass:[CNLiveBServiceHelpLearnCell class] forCellReuseIdentifier:kCNLiveBServiceHelpLearnCell];  
186 -// [_tableView registerClass:[CNLiveBServiceWorkCell class] forCellReuseIdentifier:kCNLiveBServiceWorkCell];  
187 -// 281 + [_tableView registerClass:[CNLiveBOrganizationTFCell class] forCellReuseIdentifier:kCNLiveBOrganizationTFCell];
  282 + [_tableView registerClass:[CNLiveBOrganizationTViewCell class] forCellReuseIdentifier:kCNLiveBOrganizationTViewCell];
  283 + [_tableView registerClass:[CNLiveBOrganizationSelectedCell class] forCellReuseIdentifier:kCNLiveBOrganizationSelectedCell];
  284 + [_tableView registerClass:[CNLiveBOrganizationImageVSelectedCell class] forCellReuseIdentifier:kCNLiveBOrganizationImageVSelectedCell];
  285 +
188 [_tableView registerClass:[CNLiveBOrganizationTVHeaderView class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVHeaderView]; 286 [_tableView registerClass:[CNLiveBOrganizationTVHeaderView class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVHeaderView];
189 - [_tableView registerClass:[CNLiveBOrganizationTVFooteriew class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVFooteriew];  
190 _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 287 _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
191 _tableView.dataSource = self; 288 _tableView.dataSource = self;
192 _tableView.delegate = self; 289 _tableView.delegate = self;
@@ -203,6 +300,13 @@ @@ -203,6 +300,13 @@
203 } 300 }
204 301
205 302
  303 +- (UIView *)footerView {
  304 + if (!_footerView) {
  305 + _footerView = [[CNLiveBOrganizationTVFooteriew alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 106)];
  306 + }
  307 + return _footerView;
  308 +}
  309 +
206 310
207 /* 311 /*
208 #pragma mark - Navigation 312 #pragma mark - Navigation
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationButton.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationButton.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOrganizationButton : UIButton
  13 +
  14 +@property (nonatomic, strong) UILabel *textL;
  15 +
  16 +@property (nonatomic, strong) UIImageView *tipImageV;
  17 +
  18 +@end
  19 +
  20 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationButton.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationButton.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationButton.h"
  9 +
  10 +@implementation CNLiveBOrganizationButton
  11 +
  12 +
  13 +//通过代码创建
  14 +- (instancetype)initWithFrame:(CGRect)frame
  15 +{
  16 + self = [super initWithFrame:frame];
  17 + if (self) {
  18 +
  19 + [self setUpUI];
  20 + }
  21 + return self;
  22 +}
  23 +//通过xib创建
  24 +-(void)awakeFromNib
  25 +{
  26 + [super awakeFromNib];
  27 + [self setUpUI];
  28 +}
  29 +
  30 +
  31 +
  32 +- (void)setUpUI
  33 +{
  34 +
  35 +
  36 +}
  37 +
  38 +
  39 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationImageView.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationImageView.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOrganizationImageView : UIImageView
  13 +
  14 +@property (strong, nonatomic) UILabel *tipLabel;
  15 +
  16 +@end
  17 +
  18 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationImageView.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationImageView.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationImageView.h"
  9 +
  10 +@implementation CNLiveBOrganizationImageView
  11 +
  12 +- (instancetype)initWithFrame:(CGRect)frame
  13 +{
  14 + self = [super initWithFrame:frame];
  15 + if (self) {
  16 + [self setUpUI];
  17 + }
  18 + return self;
  19 +}
  20 +
  21 +
  22 +//通过xib创建
  23 +-(void)awakeFromNib
  24 +{
  25 + [super awakeFromNib];
  26 + [self setUpUI];
  27 +}
  28 +
  29 +
  30 +
  31 +- (void)setUpUI
  32 +{
  33 +
  34 +
  35 +}
  36 +
  37 +
  38 +
  39 +
  40 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationTextField.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationTextField.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOrganizationTextField : UITextField
  13 +
  14 +@property (strong, nonatomic) NSIndexPath *tfIndexPath;
  15 +
  16 +@property (assign, nonatomic) NSInteger contentLengthMax;
  17 +
  18 +@end
  19 +
  20 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationTextField.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationTextField.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationTextField.h"
  9 +
  10 +@implementation CNLiveBOrganizationTextField
  11 +
  12 +
  13 +//通过代码创建
  14 +- (instancetype)initWithFrame:(CGRect)frame
  15 +{
  16 + self = [super initWithFrame:frame];
  17 + if (self) {
  18 + self.contentLengthMax = 100;
  19 + [self setUpUI];
  20 + }
  21 + return self;
  22 +}
  23 +//通过xib创建
  24 +-(void)awakeFromNib
  25 +{
  26 + [super awakeFromNib];
  27 + [self setUpUI];
  28 +}
  29 +
  30 +
  31 +
  32 +- (void)setUpUI
  33 +{
  34 +
  35 +
  36 +}
  37 +
  38 +
  39 +//控制placeHolder的位置
  40 +-(CGRect)placeholderRectForBounds:(CGRect)bounds
  41 +{
  42 + CGRect inset = CGRectMake(bounds.origin.x+5, bounds.origin.y, bounds.size.width -5, bounds.size.height);
  43 + return inset;
  44 +}
  45 +
  46 +//控制显示文本的位置
  47 +-(CGRect)textRectForBounds:(CGRect)bounds
  48 +{
  49 + CGRect inset = CGRectMake(bounds.origin.x+5, bounds.origin.y, bounds.size.width -5, bounds.size.height);
  50 + return inset;
  51 +}
  52 +
  53 +//控制编辑文本的位置
  54 +-(CGRect)editingRectForBounds:(CGRect)bounds
  55 +{
  56 + CGRect inset = CGRectMake(bounds.origin.x +5, bounds.origin.y, bounds.size.width -5, bounds.size.height);
  57 + return inset;
  58 +}
  59 +
  60 +
  61 +
  62 +
  63 +
  64 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationTextView.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationTextView.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOrganizationTextView : UITextView<UITextViewDelegate>
  13 +
  14 +/**
  15 + * 提示字label
  16 + */
  17 +@property (nonatomic, strong) UILabel * placeHolderLabel;
  18 +
  19 +/**
  20 + * 提示字
  21 + */
  22 +@property (nonatomic, strong) NSString * placeholder;
  23 +
  24 +/**
  25 + * 提示字颜色
  26 + */
  27 +@property (nonatomic, strong) UIColor * placeholderColor;
  28 +
  29 +/**
  30 + * 提示字字体大小
  31 + */
  32 +@property (nonatomic, strong) UIFont * placeholderFont;
  33 +
  34 +/**
  35 +* 字的最大个数
  36 +*/
  37 +@property (nonatomic, assign) NSInteger contentLengthMax;
  38 +
  39 +
  40 +@end
  41 +
  42 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationTextView.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationTextView.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/12.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationTextView.h"
  9 +
  10 +@implementation CNLiveBOrganizationTextView
  11 +
  12 +-(instancetype)initWithFrame:(CGRect)frame{
  13 +
  14 + if (self = [super initWithFrame:frame]) {
  15 +
  16 + self.editable = YES;
  17 +
  18 + self.contentLengthMax = 400;
  19 +
  20 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:nil]; //注册textView输入内容改变的通知
  21 +
  22 + }
  23 + return self;
  24 +}
  25 +
  26 +
  27 +- (void)setTextViewLayerCornerRadius:(float)radius borderWidth:(float)viewBorderWidth borderColor:(UIColor *)viewBorderColor {
  28 +
  29 +
  30 +}
  31 +
  32 +
  33 +-(void)setPlaceholder:(NSString *)placeholder{
  34 +
  35 + if (_placeholder != placeholder) {
  36 +
  37 + _placeholder = placeholder;
  38 +
  39 + [self.placeHolderLabel removeFromSuperview];
  40 +
  41 + [self setNeedsDisplay];
  42 +
  43 +
  44 + }
  45 +
  46 +}
  47 +
  48 +- (void)textChanged:(NSNotification *)notification{
  49 +
  50 + if ([[self placeholder] length] == 0) {
  51 + return;
  52 + }
  53 +
  54 + if ([[self text] length] == 0) { //输入内容为空
  55 +
  56 + [self viewWithTag:888].hidden = NO; // 提示字显示
  57 + }
  58 +
  59 + else {//输入内容不为空
  60 +
  61 + [self viewWithTag:888].hidden = YES; //提示字隐藏
  62 + }
  63 +
  64 +}
  65 +
  66 +
  67 +
  68 +-(void)drawRect:(CGRect)rect{
  69 +
  70 + [super drawRect:rect];
  71 + if ([[self placeholder] length] > 0) {
  72 + if (_placeHolderLabel == nil) {
  73 + _placeHolderLabel = [[UILabel alloc]initWithFrame:CGRectMake(5, 8, self.bounds.size.width - 16, 0)];
  74 + _placeHolderLabel.lineBreakMode = NSLineBreakByWordWrapping;
  75 + _placeHolderLabel.numberOfLines = 0;
  76 + _placeHolderLabel.font = self.placeholderFont;
  77 + _placeHolderLabel.backgroundColor = [UIColor clearColor];
  78 + _placeHolderLabel.textColor = self.placeholderColor;
  79 + _placeHolderLabel.tag = 888;
  80 + [self addSubview:_placeHolderLabel];
  81 + }
  82 + _placeHolderLabel.text = self.placeholder;
  83 + [_placeHolderLabel sizeToFit];
  84 + [self sendSubviewToBack:_placeHolderLabel];
  85 + }
  86 +
  87 + if ([[self text] length] == 0 && [[self placeholder] length] >0) {
  88 + [self viewWithTag:888].hidden = NO; //设置提示字显示
  89 + }
  90 +
  91 +}
  92 +
  93 +
  94 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationTFCell.h renamed to CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.h
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
6 // 6 //
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
  9 +#import "CNLiveBOrganizationTextField.h"
  10 +#import "CNLiveBOrganizationTextView.h"
9 11
10 ///UITextField 类型 12 ///UITextField 类型
11 #define kCNLiveBOrganizationTFCell @"CNLiveBOrganizationTFCell" 13 #define kCNLiveBOrganizationTFCell @"CNLiveBOrganizationTFCell"
@@ -20,6 +22,13 @@ NS_ASSUME_NONNULL_BEGIN @@ -20,6 +22,13 @@ NS_ASSUME_NONNULL_BEGIN
20 22
21 @interface CNLiveBOrganizationTFCell : UITableViewCell 23 @interface CNLiveBOrganizationTFCell : UITableViewCell
22 24
  25 +/** 文本*/
  26 +@property (nonatomic, strong) CNLiveBOrganizationTextField *contentTF;
  27 +
  28 +@property (strong, nonatomic) NSIndexPath *indexPath;
  29 +
  30 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath;
  31 +
23 @end 32 @end
24 33
25 NS_ASSUME_NONNULL_END 34 NS_ASSUME_NONNULL_END
@@ -31,6 +40,12 @@ NS_ASSUME_NONNULL_BEGIN @@ -31,6 +40,12 @@ NS_ASSUME_NONNULL_BEGIN
31 40
32 @interface CNLiveBOrganizationTViewCell : UITableViewCell 41 @interface CNLiveBOrganizationTViewCell : UITableViewCell
33 42
  43 +/** 文本*/
  44 +@property (nonatomic, strong) CNLiveBOrganizationTextView *contentTV;
  45 +@property (strong, nonatomic) NSIndexPath *indexPath;
  46 +
  47 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath;
  48 +
34 @end 49 @end
35 50
36 NS_ASSUME_NONNULL_END 51 NS_ASSUME_NONNULL_END
@@ -42,6 +57,10 @@ NS_ASSUME_NONNULL_BEGIN @@ -42,6 +57,10 @@ NS_ASSUME_NONNULL_BEGIN
42 57
43 @interface CNLiveBOrganizationSelectedCell : UITableViewCell 58 @interface CNLiveBOrganizationSelectedCell : UITableViewCell
44 59
  60 +@property (strong, nonatomic) NSIndexPath *indexPath;
  61 +
  62 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath;
  63 +
45 @end 64 @end
46 65
47 NS_ASSUME_NONNULL_END 66 NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationTFCell.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/10.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationContentCell.h"
  9 +#import <Masonry/Masonry.h>
  10 +#import "UIImage+OrganizationValidation.h"
  11 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
  12 +#import "CNLiveBOrganizationTextField.h"
  13 +
  14 +#pragma mark -
  15 +#pragma mark - UITextField 类型
  16 +
  17 +@interface CNLiveBOrganizationTFCell()
  18 +
  19 +/** 头部*/
  20 +@property (nonatomic, strong) UILabel *titleL;
  21 +/** 内容*/
  22 +@property (nonatomic, strong) UILabel *contentL;
  23 +
  24 +@end
  25 +
  26 +@implementation CNLiveBOrganizationTFCell
  27 +
  28 +
  29 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  30 +{
  31 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  32 + if (self) {
  33 + [self setupUI];
  34 + }
  35 + return self;
  36 +}
  37 +
  38 +- (void)awakeFromNib {
  39 + [super awakeFromNib];
  40 + [self setupUI];
  41 +
  42 +}
  43 +
  44 +- (void)layoutSubviews {
  45 + [super layoutSubviews];
  46 +
  47 + [self layoutUI];
  48 +}
  49 +
  50 +
  51 +#pragma mark - ***setupUI***
  52 +- (void)setupUI {
  53 +
  54 + [self setBackgroundColor:[UIColor whiteColor]];
  55 + [self addSubview:self.contentTF];
  56 + [self addSubview:self.titleL];
  57 + [self addSubview:self.contentL];
  58 +
  59 + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textFieldTextChange:) name:UITextFieldTextDidChangeNotification object:nil];
  60 +
  61 +}
  62 +
  63 +#pragma mark - ***layoutUI***
  64 +- (void)layoutUI {
  65 +
  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 +
  90 +}
  91 +
  92 +#pragma mark - editUI
  93 +
  94 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath {
  95 +
  96 + if (!indexPath) {
  97 + return;
  98 + }
  99 +
  100 + self.indexPath = indexPath;
  101 +
  102 + if (indexPath.section == 0) {
  103 + if (indexPath.row == 0) {
  104 +
  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;
  110 + self.contentL.text = @"公司注册全称与营业执照一致";
  111 + self.contentTF.placeholder = @"请输入公司全称";
  112 + self.contentTF.tfIndexPath = indexPath;
  113 +
  114 +
  115 + }else if (indexPath.row == 2) {
  116 +
  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;
  122 + self.contentL.text = @"";
  123 + self.contentTF.placeholder = @"请输入企业简称";
  124 + self.contentTF.tfIndexPath = indexPath;
  125 +
  126 + }else if (indexPath.row == 3) {
  127 +
  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;
  133 + self.contentL.text = @"";
  134 + self.contentTF.placeholder = @"请输入企业代码";
  135 + self.contentTF.tfIndexPath = indexPath;
  136 +
  137 + }else if (indexPath.row == 5) {
  138 +
  139 + NSString *titleStr = @"企业地址";
  140 + NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}];
  141 + self.titleL.attributedText = string;
  142 + self.contentL.text = @"";
  143 + self.contentTF.placeholder = @"请输入企业地址";
  144 + self.contentTF.tfIndexPath = indexPath;
  145 +
  146 + }else if (indexPath.row == 7) {
  147 +
  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;
  153 + self.contentL.text = @"";
  154 + self.contentTF.placeholder = @"请输入企业网站访问链接";
  155 + self.contentTF.tfIndexPath = indexPath;
  156 +
  157 + }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;
  163 + self.contentL.text = @"";
  164 + self.contentTF.placeholder = @"请输入企业法人姓名";
  165 + self.contentTF.tfIndexPath = indexPath;
  166 +
  167 + }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;
  173 + self.contentL.text = @"";
  174 + self.contentTF.placeholder = @"请输入企业联系人姓名";
  175 + self.contentTF.tfIndexPath = indexPath;
  176 +
  177 + }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;
  181 + self.contentL.text = @"";
  182 + self.contentTF.placeholder = @"请输入合同编号";
  183 + self.contentTF.tfIndexPath = indexPath;
  184 +
  185 + }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;
  191 + self.contentL.text = @"";
  192 + self.contentTF.placeholder = @"请输入营业执照号";
  193 + self.contentTF.tfIndexPath = indexPath;
  194 +
  195 + }else {
  196 + self.titleL.text = @"";
  197 + self.contentL.text = @"";
  198 + self.contentTF.placeholder = @"";
  199 + self.contentTF.tfIndexPath = indexPath;
  200 + return;
  201 + }
  202 + }else {
  203 + return;
  204 + }
  205 +
  206 +
  207 +}
  208 +
  209 +
  210 +#pragma mark - ***事件实现***
  211 +
  212 +
  213 +
  214 +#pragma mark - ***监听实现***
  215 +- (void)textFieldTextChange:(NSNotification *)notification{
  216 + CNLiveBOrganizationTextField *textField = (CNLiveBOrganizationTextField *)notification.object;
  217 + if (textField) {
  218 + if (textField.contentLengthMax == 0) {
  219 + textField.contentLengthMax = 100;
  220 + }
  221 + if (textField.text.length > textField.contentLengthMax) {
  222 + NSRange range = NSMakeRange(0, textField.contentLengthMax);
  223 + textField.text = [textField.text substringWithRange:range];
  224 + }
  225 + }
  226 +
  227 +}
  228 +
  229 +#pragma mark - ***私有方法***
  230 +#pragma mark - ***懒加载***
  231 +
  232 +/*** 头部 ***/
  233 +- (UILabel *)titleL {
  234 +
  235 + if (!_titleL) {
  236 + _titleL = [[UILabel alloc]init];
  237 + _titleL.font = [UIFont systemFontOfSize:12];
  238 + _titleL.numberOfLines = 1;
  239 + }
  240 + return _titleL;
  241 +
  242 +}
  243 +
  244 +/*** 内容 ***/
  245 +- (CNLiveBOrganizationTextField *)contentTF {
  246 +
  247 + if (!_contentTF) {
  248 + _contentTF = [[CNLiveBOrganizationTextField alloc]init];
  249 + _contentTF.font = [UIFont systemFontOfSize:12];
  250 + _contentTF.layer.masksToBounds = YES;
  251 + _contentTF.layer.cornerRadius = 5;
  252 + _contentTF.layer.borderColor = RGBOF(0xc1c1c1).CGColor;
  253 + _contentTF.layer.borderWidth = 0.5;
  254 + _contentTF.textAlignment = NSTextAlignmentLeft;
  255 + }
  256 + return _contentTF;
  257 +}
  258 +
  259 +/*** 内容 ***/
  260 +- (UILabel *)contentL {
  261 +
  262 + if (!_contentL) {
  263 + _contentL = [[UILabel alloc]init];
  264 + _contentL.font = [UIFont systemFontOfSize:11];
  265 + _contentL.textAlignment = NSTextAlignmentLeft;
  266 + _contentL.textColor = RGBOF(0x999999);
  267 + _contentL.numberOfLines = 1;
  268 + }
  269 + return _contentL;
  270 +}
  271 +
  272 +
  273 +
  274 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  275 + [super setSelected:selected animated:animated];
  276 +
  277 + // Configure the view for the selected state
  278 +}
  279 +
  280 +@end
  281 +
  282 +
  283 +#pragma mark -
  284 +#pragma mark - UITextView 类型
  285 +
  286 +@interface CNLiveBOrganizationTViewCell()
  287 +
  288 +/** 头部*/
  289 +@property (nonatomic, strong) UILabel *titleL;
  290 +
  291 +
  292 +@end
  293 +
  294 +@implementation CNLiveBOrganizationTViewCell
  295 +
  296 +
  297 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  298 +{
  299 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  300 + if (self) {
  301 + [self setupUI];
  302 + }
  303 + return self;
  304 +}
  305 +
  306 +- (void)awakeFromNib {
  307 + [super awakeFromNib];
  308 + [self setupUI];
  309 +
  310 +}
  311 +
  312 +- (void)layoutSubviews {
  313 + [super layoutSubviews];
  314 +
  315 + [self layoutUI];
  316 +}
  317 +
  318 +
  319 +#pragma mark - ***setupUI***
  320 +- (void)setupUI {
  321 +
  322 + [self setBackgroundColor:[UIColor whiteColor]];
  323 + [self addSubview:self.contentTV];
  324 + [self addSubview:self.titleL];
  325 +
  326 + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textViewTextChange:) name:UITextViewTextDidChangeNotification object:nil];
  327 +
  328 +}
  329 +
  330 +#pragma mark - ***layoutUI***
  331 +- (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 +
  342 +
  343 +
  344 +}
  345 +
  346 +#pragma mark - editUI
  347 +
  348 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath {
  349 +
  350 + if (!indexPath) {
  351 + return;
  352 + }
  353 +
  354 + self.indexPath = indexPath;
  355 +
  356 + if (indexPath.section == 0) {
  357 + 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;
  363 + self.contentTV.placeholder = @"请输入企业简介(400字以内)";
  364 + self.contentTV.placeholderFont = [UIFont systemFontOfSize:12];
  365 + self.contentTV.placeholderColor = RGBOF(0xB9B9B9);
  366 + }else {
  367 + return;
  368 + }
  369 + }else {
  370 + return;
  371 + }
  372 +
  373 +}
  374 +
  375 +
  376 +#pragma mark - ***事件实现***
  377 +
  378 +#pragma mark - ***监听实现***
  379 +- (void)textViewTextChange:(NSNotification *)notification{
  380 + CNLiveBOrganizationTextView *textView = (CNLiveBOrganizationTextView *)notification.object;
  381 + if (textView) {
  382 + if (textView.contentLengthMax == 0) {
  383 + textView.contentLengthMax = 400;
  384 + }
  385 + if (textView.text.length > textView.contentLengthMax) {
  386 + NSRange range = NSMakeRange(0, textView.contentLengthMax);
  387 + textView.text = [textView.text substringWithRange:range];
  388 + }
  389 + }
  390 +
  391 +}
  392 +
  393 +
  394 +
  395 +#pragma mark - ***私有方法***
  396 +#pragma mark - ***懒加载***
  397 +/*** 头部 ***/
  398 +- (UILabel *)titleL {
  399 +
  400 + if (!_titleL) {
  401 + _titleL = [[UILabel alloc]init];
  402 + _titleL.font = [UIFont systemFontOfSize:12];
  403 + _titleL.numberOfLines = 1;
  404 + }
  405 + return _titleL;
  406 +
  407 +}
  408 +
  409 +/*** 内容 ***/
  410 +- (UITextView *)contentTV {
  411 +
  412 + if (!_contentTV) {
  413 + _contentTV = [[CNLiveBOrganizationTextView alloc]initWithFrame:CGRectMake(97, 8, KScreenWidth - 97 -29.5, 78)];
  414 + _contentTV.font = [UIFont systemFontOfSize:12];
  415 + _contentTV.layer.masksToBounds = YES;
  416 + _contentTV.layer.cornerRadius = 5;
  417 + _contentTV.layer.borderColor = RGBOF(0xc1c1c1).CGColor;
  418 + _contentTV.layer.borderWidth = 0.5;
  419 + _contentTV.textAlignment = NSTextAlignmentLeft;
  420 + }
  421 + return _contentTV;
  422 +}
  423 +
  424 +
  425 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  426 + [super setSelected:selected animated:animated];
  427 +
  428 + // Configure the view for the selected state
  429 +}
  430 +
  431 +@end
  432 +
  433 +
  434 +#pragma mark -
  435 +#pragma mark - CNLiveBOrganizationSelectedCell 类型
  436 +
  437 +@interface CNLiveBOrganizationSelectedCell()
  438 +/** 头部*/
  439 +@property (nonatomic, strong) UILabel *titleL;
  440 +/** 认证*/
  441 +@property (nonatomic, strong) UIButton *selectedBtn;
  442 +
  443 +@end
  444 +
  445 +@implementation CNLiveBOrganizationSelectedCell
  446 +
  447 +
  448 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  449 +{
  450 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  451 + if (self) {
  452 + [self setupUI];
  453 + }
  454 + return self;
  455 +}
  456 +
  457 +- (void)awakeFromNib {
  458 + [super awakeFromNib];
  459 + [self setupUI];
  460 +
  461 +}
  462 +
  463 +- (void)layoutSubviews {
  464 + [super layoutSubviews];
  465 +
  466 + [self layoutUI];
  467 +}
  468 +
  469 +
  470 +#pragma mark - ***setupUI***
  471 +- (void)setupUI {
  472 +
  473 + [self setBackgroundColor:[UIColor whiteColor]];
  474 + [self addSubview:self.titleL];
  475 + [self addSubview:self.selectedBtn];
  476 +
  477 + self.titleL.text = @"* 企业类型";
  478 + [self.selectedBtn setBackgroundColor:[UIColor yellowColor]];
  479 +
  480 +}
  481 +
  482 +#pragma mark - ***layoutUI***
  483 +- (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 +
  502 +
  503 +}
  504 +
  505 +#pragma mark - editUI
  506 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath {
  507 +
  508 + if (!indexPath) {
  509 + return;
  510 + }
  511 +
  512 + self.indexPath = indexPath;
  513 +
  514 + if (indexPath.section == 0) {
  515 + 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;
  521 +
  522 + }else {
  523 + return;
  524 + }
  525 + }else {
  526 + return;
  527 + }
  528 +
  529 +}
  530 +
  531 +
  532 +#pragma mark - ***事件实现***
  533 +
  534 +
  535 +
  536 +
  537 +#pragma mark - ***私有方法***
  538 +#pragma mark - ***懒加载***
  539 +/*** 头部 ***/
  540 +- (UILabel *)titleL {
  541 +
  542 + if (!_titleL) {
  543 + _titleL = [[UILabel alloc]init];
  544 + _titleL.font = [UIFont systemFontOfSize:12];
  545 + _titleL.numberOfLines = 1;
  546 + }
  547 + return _titleL;
  548 +
  549 +}
  550 +
  551 +/*** 内容 ***/
  552 +- (UIButton *)selectedBtn {
  553 +
  554 + if (!_selectedBtn) {
  555 + _selectedBtn = [[UIButton alloc]init];
  556 + _selectedBtn.titleLabel.font = [UIFont systemFontOfSize:12];
  557 + _selectedBtn.layer.masksToBounds = YES;
  558 + _selectedBtn.layer.cornerRadius = 5;
  559 + _selectedBtn.layer.borderColor = RGBOF(0xc1c1c1).CGColor;
  560 + _selectedBtn.layer.borderWidth = 0.5;
  561 + }
  562 + return _selectedBtn;
  563 +}
  564 +
  565 +
  566 +
  567 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  568 + [super setSelected:selected animated:animated];
  569 +
  570 + // Configure the view for the selected state
  571 +}
  572 +
  573 +@end
  574 +
  575 +
  576 +#pragma mark -
  577 +#pragma mark - CNLiveBOrganizationImageVSelectedCell 图片选择
  578 +
  579 +@interface CNLiveBOrganizationImageVSelectedCell()
  580 +/** 图片*/
  581 +@property (nonatomic, strong) UIImageView *contentImageView;
  582 +/** 头部*/
  583 +@property (nonatomic, strong) UILabel *titleL;
  584 +/** 内容*/
  585 +@property (nonatomic, strong) UILabel *contentL;
  586 +
  587 +@end
  588 +
  589 +@implementation CNLiveBOrganizationImageVSelectedCell
  590 +
  591 +
  592 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  593 +{
  594 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  595 + if (self) {
  596 + [self setupUI];
  597 + }
  598 + return self;
  599 +}
  600 +
  601 +- (void)awakeFromNib {
  602 + [super awakeFromNib];
  603 + [self setupUI];
  604 +
  605 +}
  606 +
  607 +- (void)layoutSubviews {
  608 + [super layoutSubviews];
  609 +
  610 + [self layoutUI];
  611 +}
  612 +
  613 +
  614 +#pragma mark - ***setupUI***
  615 +- (void)setupUI {
  616 +
  617 +
  618 + [self setBackgroundColor:[UIColor whiteColor]];
  619 + [self addSubview:self.contentImageView];
  620 + [self addSubview:self.titleL];
  621 + [self addSubview:self.contentL];
  622 +
  623 + //测试
  624 + self.titleL.text = @"* 企业logo";
  625 + self.contentL.text = @"请上传LOGO图片(尺寸100*100,图片大小5M以内";
  626 + [self.contentImageView setBackgroundColor:[UIColor yellowColor]];
  627 +}
  628 +
  629 +#pragma mark - ***layoutUI***
  630 +- (void)layoutUI {
  631 +
  632 + __weak typeof(self) weakSelf = self;
  633 +
  634 + [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  635 + make.left.equalTo(weakSelf.mas_left).offset(10);
  636 + make.top.equalTo(weakSelf.mas_top).offset(8);
  637 + make.width.mas_equalTo(72);
  638 + make.height.mas_equalTo(28);
  639 + }];
  640 +
  641 + [self.contentImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  642 + make.left.equalTo(weakSelf.titleL.mas_right).offset(23);
  643 + make.top.equalTo(weakSelf.mas_top).offset(8);
  644 + make.width.mas_offset(60);
  645 + make.height.mas_equalTo(60);
  646 + }];
  647 +
  648 + [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {
  649 + make.left.equalTo(weakSelf.contentImageView.mas_left);
  650 + make.top.equalTo(weakSelf.contentImageView.mas_bottom).offset(6);
  651 + make.right.equalTo(weakSelf.mas_right).offset(-41);
  652 + make.bottom.equalTo(weakSelf.mas_bottom).offset(-8);
  653 + }];
  654 +
  655 +
  656 +}
  657 +
  658 +#pragma mark - editUI
  659 +
  660 +
  661 +#pragma mark - ***事件实现***
  662 +
  663 +
  664 +
  665 +
  666 +#pragma mark - ***私有方法***
  667 +#pragma mark - ***懒加载***
  668 +/*** 头部 ***/
  669 +- (UILabel *)titleL {
  670 +
  671 + if (!_titleL) {
  672 + _titleL = [[UILabel alloc]init];
  673 + _titleL.font = [UIFont systemFontOfSize:12];
  674 + _titleL.numberOfLines = 1;
  675 + }
  676 + return _titleL;
  677 +
  678 +}
  679 +
  680 +/*** 内容 ***/
  681 +- (UIImageView *)contentImageView {
  682 +
  683 + if (!_contentImageView) {
  684 + _contentImageView = [[UIImageView alloc]init];
  685 +
  686 + }
  687 + return _contentImageView;
  688 +}
  689 +
  690 +/*** 内容 ***/
  691 +- (UILabel *)contentL {
  692 +
  693 + if (!_contentL) {
  694 + _contentL = [[UILabel alloc]init];
  695 + _contentL.font = [UIFont systemFontOfSize:11];
  696 + _contentL.textAlignment = NSTextAlignmentLeft;
  697 + _contentL.textColor = RGBOF(0x999999);
  698 + _contentL.numberOfLines = 0;
  699 + [_contentL sizeToFit];
  700 + }
  701 + return _contentL;
  702 +}
  703 +
  704 +
  705 +
  706 +
  707 +
  708 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  709 + [super setSelected:selected animated:animated];
  710 +
  711 + // Configure the view for the selected state
  712 +}
  713 +
  714 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailCell.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationDetailCell.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/13.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +
  11 +#define kCNLiveBOrganizationDetailCell @"CNLiveBOrganizationDetailCell"
  12 +
  13 +NS_ASSUME_NONNULL_BEGIN
  14 +
  15 +@interface CNLiveBOrganizationDetailCell : UITableViewCell
  16 +
  17 +@property (strong, nonatomic) NSIndexPath *indexPath;
  18 +
  19 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath;
  20 +
  21 +@end
  22 +
  23 +NS_ASSUME_NONNULL_END
  24 +
  25 +#define kCNLiveBOrganizationImageVDetailCell @"CNLiveBOrganizationImageVDetailCell"
  26 +
  27 +NS_ASSUME_NONNULL_BEGIN
  28 +
  29 +@interface CNLiveBOrganizationImageVDetailCell : UITableViewCell
  30 +
  31 +@property (strong, nonatomic) NSIndexPath *indexPath;
  32 +
  33 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath;
  34 +
  35 +@end
  36 +
  37 +NS_ASSUME_NONNULL_END
  38 +
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailCell.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationDetailCell.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/13.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationDetailCell.h"
  9 +#import <Masonry/Masonry.h>
  10 +#import "UIImage+OrganizationValidation.h"
  11 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
  12 +#import "CNLiveBOrganizationTextField.h"
  13 +#import <SDWebImage/SDWebImage.h>
  14 +
  15 +
  16 +@interface CNLiveBOrganizationDetailCell()
  17 +
  18 +/** 内容*/
  19 +@property (nonatomic, strong) UILabel *contentL;
  20 +
  21 +@end
  22 +
  23 +@implementation CNLiveBOrganizationDetailCell
  24 +
  25 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  26 +{
  27 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  28 + if (self) {
  29 + [self setupUI];
  30 + }
  31 + return self;
  32 +}
  33 +
  34 +- (void)awakeFromNib {
  35 + [super awakeFromNib];
  36 + [self setupUI];
  37 +
  38 +}
  39 +
  40 +- (void)layoutSubviews {
  41 + [super layoutSubviews];
  42 +
  43 + [self layoutUI];
  44 +}
  45 +
  46 +
  47 +#pragma mark - ***setupUI***
  48 +- (void)setupUI {
  49 +
  50 + [self setBackgroundColor:[UIColor whiteColor]];
  51 + [self addSubview:self.contentL];
  52 +
  53 +}
  54 +
  55 +#pragma mark - ***layoutUI***
  56 +- (void)layoutUI {
  57 +
  58 + __weak typeof(self) weakSelf = self;
  59 + [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {
  60 + make.left.equalTo(weakSelf.mas_left).offset(10);
  61 + make.top.equalTo(weakSelf.mas_top).offset(10);
  62 + make.right.equalTo(weakSelf.mas_right).offset(-10);
  63 + make.bottom.equalTo(weakSelf.mas_bottom).offset(-10);
  64 + }];
  65 +
  66 +
  67 +
  68 +}
  69 +
  70 +
  71 +#pragma mark - ***事件实现***
  72 +
  73 +
  74 +
  75 +#pragma mark - ***监听实现***
  76 +
  77 +#pragma mark - ***editUI**
  78 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath {
  79 +
  80 +
  81 + if (!indexPath) {
  82 + return;
  83 + }
  84 +
  85 + self.indexPath = indexPath;
  86 +
  87 + if (indexPath.section == 0) {
  88 + if (indexPath.row == 0) {
  89 + NSString *titleStr = @"公司全称:";
  90 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  91 + self.contentL.attributedText = str;
  92 +
  93 +
  94 + }else if (indexPath.row == 2) {
  95 +
  96 + NSString *titleStr = @"企业简称:";
  97 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测发达发大水范德萨范德萨范德萨范德萨范德萨范德萨范德萨发"];
  98 + self.contentL.attributedText = str;
  99 +
  100 +
  101 + }else if (indexPath.row == 3) {
  102 +
  103 + NSString *titleStr = @"企业代码:";
  104 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测范德萨范德萨发大水发大厦范德萨发大水发大水"];
  105 + self.contentL.attributedText = str;
  106 +
  107 + }else if (indexPath.row == 4) {
  108 +
  109 + NSString *titleStr = @"企业简介:";
  110 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  111 + self.contentL.attributedText = str;
  112 +
  113 + }else if (indexPath.row == 5) {
  114 +
  115 + NSString *titleStr = @"企业类型:";
  116 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  117 + self.contentL.attributedText = str;
  118 +
  119 + }else if (indexPath.row == 6) {
  120 +
  121 + NSString *titleStr = @"网站:";
  122 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  123 + self.contentL.attributedText = str;
  124 +
  125 + }else if (indexPath.row == 7) {
  126 +
  127 + NSString *titleStr = @"网站:";
  128 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  129 + self.contentL.attributedText = str;
  130 +
  131 + }else if (indexPath.row == 8) {
  132 + NSString *titleStr = @"企业法人:";
  133 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  134 + self.contentL.attributedText = str;
  135 +
  136 + }else if (indexPath.row == 9) {
  137 + NSString *titleStr = @"联系人:";
  138 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  139 + self.contentL.attributedText = str;
  140 +
  141 + }else if (indexPath.row == 10) {
  142 + NSString *titleStr = @"合同编号:";
  143 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  144 + self.contentL.attributedText = str;
  145 +
  146 + }else if (indexPath.row == 11) {
  147 + NSString *titleStr = @"营业执照号:";
  148 + NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:@"测试测试测测"];
  149 + self.contentL.attributedText = str;
  150 +
  151 + }else {
  152 +
  153 + }
  154 + }else {
  155 +
  156 + }
  157 +
  158 +
  159 +
  160 +}
  161 +
  162 +
  163 +#pragma mark - ***私有方法***
  164 +- (NSMutableAttributedString *)returnAllContentWithTitle:(NSString *)title content:(NSString *)content {
  165 + NSString *titleStr = [NSString stringWithFormat:@"%@",title ? title : @""];
  166 + NSString *contentStr = [NSString stringWithFormat:@"%@ %@",title ? title : @"",content ? content : @""];
  167 + NSMutableAttributedString *allStr = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName: RGBOF(0xB9B9B9)}];
  168 + NSRange rang = [contentStr rangeOfString:titleStr];
  169 + [allStr addAttributes:@{NSForegroundColorAttributeName: RGBOF(0x333333)} range:rang];
  170 + return allStr;
  171 +
  172 +}
  173 +
  174 +
  175 +
  176 +#pragma mark - ***懒加载***
  177 +
  178 +
  179 +/*** 内容 ***/
  180 +- (UILabel *)contentL {
  181 +
  182 + if (!_contentL) {
  183 + _contentL = [[UILabel alloc]init];
  184 + _contentL.font = [UIFont systemFontOfSize:12];
  185 + _contentL.textAlignment = NSTextAlignmentLeft;
  186 + _contentL.textColor = RGBOF(0xB9B9B9);
  187 + _contentL.numberOfLines = 0;
  188 + }
  189 + return _contentL;
  190 +}
  191 +
  192 +
  193 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  194 + [super setSelected:selected animated:animated];
  195 +
  196 + // Configure the view for the selected state
  197 +}
  198 +
  199 +@end
  200 +
  201 +
  202 +
  203 +@interface CNLiveBOrganizationImageVDetailCell()
  204 +
  205 +/** 头部*/
  206 +@property (nonatomic, strong) UILabel *titleL;
  207 +/** 图片内容*/
  208 +@property (nonatomic, strong) UIImageView *contentImageV;
  209 +
  210 +@end
  211 +
  212 +@implementation CNLiveBOrganizationImageVDetailCell
  213 +
  214 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  215 +{
  216 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  217 + if (self) {
  218 + [self setupUI];
  219 + }
  220 + return self;
  221 +}
  222 +
  223 +- (void)awakeFromNib {
  224 + [super awakeFromNib];
  225 + [self setupUI];
  226 +
  227 +}
  228 +
  229 +- (void)layoutSubviews {
  230 + [super layoutSubviews];
  231 +
  232 + [self layoutUI];
  233 +}
  234 +
  235 +
  236 +#pragma mark - ***setupUI***
  237 +- (void)setupUI {
  238 +
  239 + [self setBackgroundColor:[UIColor whiteColor]];
  240 + [self addSubview:self.titleL];
  241 + [self addSubview:self.contentImageV];
  242 + self.contentImageV.frame = CGRectMake(95, 10, 60, 60);
  243 +}
  244 +
  245 +#pragma mark - ***layoutUI***
  246 +- (void)layoutUI {
  247 +
  248 + __weak typeof(self) weakSelf = self;
  249 + [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  250 + make.left.equalTo(weakSelf.mas_left).offset(10);
  251 + make.top.equalTo(weakSelf.mas_top).offset(10);
  252 + make.width.mas_equalTo(72);
  253 + make.height.mas_equalTo(28);
  254 + }];
  255 +
  256 +
  257 +
  258 + [self.contentImageV setBackgroundColor:[UIColor yellowColor]];
  259 +}
  260 +
  261 +#pragma mark - ***editUI***
  262 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath {
  263 +
  264 + if (!indexPath) {
  265 + return;
  266 + }
  267 +
  268 + self.indexPath = indexPath;
  269 +
  270 + if (!indexPath) {
  271 + return;
  272 + }
  273 +
  274 + self.indexPath = indexPath;
  275 +
  276 + if (indexPath.section == 0) {
  277 + if (indexPath.row == 1) {
  278 + NSString *titleStr = @"企业logo:";
  279 + self.titleL.text = titleStr;
  280 + [self.contentImageV sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:[UIImage imageNamedFromOrganization:@""]];
  281 + self.contentImageV.frame = CGRectMake(95, 10, 60, 60);
  282 +
  283 + }else if (indexPath.row == 12) {
  284 +
  285 + NSString *titleStr = @"营业执照:";
  286 + self.titleL.text = titleStr;
  287 + [self.contentImageV sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:[UIImage imageNamedFromOrganization:@""]];
  288 + self.contentImageV.frame = CGRectMake(95, 10, 101, 151);
  289 +
  290 + }else {
  291 + self.titleL.text = @"";
  292 +
  293 + return;
  294 + }
  295 + }else {
  296 + return;
  297 + }
  298 +
  299 +
  300 +}
  301 +
  302 +
  303 +#pragma mark - ***事件实现***
  304 +
  305 +
  306 +
  307 +#pragma mark - ***监听实现***
  308 +
  309 +
  310 +#pragma mark - ***私有方法***
  311 +#pragma mark - ***懒加载***
  312 +
  313 +/*** 头部 ***/
  314 +- (UILabel *)titleL {
  315 +
  316 + if (!_titleL) {
  317 + _titleL = [[UILabel alloc]init];
  318 + _titleL.font = [UIFont systemFontOfSize:12];
  319 + _titleL.numberOfLines = 1;
  320 + }
  321 + return _titleL;
  322 +
  323 +}
  324 +
  325 +
  326 +/*** 内容 ***/
  327 +- (UIImageView *)contentImageV {
  328 +
  329 + if (!_contentImageV) {
  330 + _contentImageV = [[UIImageView alloc]init];
  331 + }
  332 + return _contentImageV;
  333 +}
  334 +
  335 +
  336 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  337 + [super setSelected:selected animated:animated];
  338 +
  339 + // Configure the view for the selected state
  340 +}
  341 +
  342 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailHeaderView.h 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationDetailHeaderView.h
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/13.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveBOrganizationDetailHeaderView : UIView
  13 +
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailHeaderView.m 0 → 100644
  1 +//
  2 +// CNLiveBOrganizationDetailHeaderView.m
  3 +// CNLiveOrganizationValidationModule
  4 +//
  5 +// Created by 梁星国 on 2020/4/13.
  6 +//
  7 +
  8 +#import "CNLiveBOrganizationDetailHeaderView.h"
  9 +#import <Masonry/Masonry.h>
  10 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
  11 +#import "UIImage+OrganizationValidation.h"
  12 +
  13 +@interface CNLiveBOrganizationDetailHeaderView()
  14 +
  15 +@property (nonatomic, strong) UIImageView *tipImageV;
  16 +
  17 +@property (nonatomic, strong) UILabel *tipNameL;
  18 +
  19 +@end
  20 +
  21 +@implementation CNLiveBOrganizationDetailHeaderView
  22 +
  23 +- (instancetype)init
  24 +{
  25 + self = [super init];
  26 + if (self) {
  27 + [self setupUI];
  28 + }
  29 + return self;
  30 +}
  31 +
  32 +- (instancetype)initWithFrame:(CGRect)frame
  33 +{
  34 + self = [super initWithFrame:frame];
  35 + if (self) {
  36 + [self setupUI];
  37 + }
  38 + return self;
  39 +}
  40 +
  41 +- (void)awakeFromNib {
  42 + [super awakeFromNib];
  43 + [self setupUI];
  44 +
  45 +}
  46 +
  47 +- (void)layoutSubviews {
  48 + [super layoutSubviews];
  49 +
  50 + [self layoutUI];
  51 +}
  52 +
  53 +
  54 +#pragma mark - ***setupUI***r
  55 +- (void)setupUI {
  56 +
  57 + [self addSubview:self.tipImageV];
  58 + [self addSubview:self.tipNameL];
  59 +
  60 + self.tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_detail_company"];
  61 + self.tipNameL.text = @"您的公司信息";
  62 +
  63 +
  64 +}
  65 +
  66 +#pragma mark - ***layoutUI***
  67 +- (void)layoutUI {
  68 +
  69 + __weak typeof(self) weakSelf = self;
  70 +
  71 + [self.tipImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  72 + make.left.equalTo(weakSelf.mas_left).offset(12);
  73 + make.top.equalTo(weakSelf.mas_top).offset(16);
  74 + make.width.mas_equalTo(19);
  75 + make.height.mas_equalTo(20);
  76 + }];
  77 +
  78 + [self.tipNameL mas_makeConstraints:^(MASConstraintMaker *make) {
  79 + make.centerY.equalTo(weakSelf.mas_centerY).offset(0);
  80 + make.left.equalTo(weakSelf.tipImageV.mas_right).offset(10);
  81 + make.right.equalTo(weakSelf.mas_right).offset(-10);
  82 + make.height.mas_equalTo(12);
  83 + }];
  84 +
  85 +
  86 +
  87 +}
  88 +
  89 +#pragma mark - editUI
  90 +
  91 +
  92 +#pragma mark - ***事件实现***
  93 +
  94 +
  95 +#pragma mark - ***私有方法***
  96 +#pragma mark - ***懒加载***
  97 +
  98 +- (UIImageView *)tipImageV {
  99 + if (!_tipImageV) {
  100 + _tipImageV = [[UIImageView alloc]init];
  101 + [_tipImageV setBackgroundColor:[UIColor whiteColor]];
  102 + }
  103 + return _tipImageV;
  104 +}
  105 +
  106 +/*** 第一个提示图片 ***/
  107 +- (UILabel *)tipNameL
  108 +{
  109 + if (!_tipNameL) {
  110 + _tipNameL = [[UILabel alloc]init];
  111 + _tipNameL.font = [UIFont systemFontOfSize:16];
  112 + _tipNameL.textColor = RGBOF(0x1a1a1a);
  113 +
  114 + }
  115 + return _tipNameL;
  116 +}
  117 +
  118 +@end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationTFCell.m deleted 100644 → 0
1 -//  
2 -// CNLiveBOrganizationTFCell.m  
3 -// CNLiveOrganizationValidationModule  
4 -//  
5 -// Created by 梁星国 on 2020/4/10.  
6 -//  
7 -  
8 -#import "CNLiveBOrganizationTFCell.h"  
9 -#import <Masonry/Masonry.h>  
10 -#import "UIImage+OrganizationValidation.h"  
11 -#import <CNLiveBaseKit/CNLiveBaseKit.h>  
12 -  
13 -  
14 -#pragma mark -  
15 -#pragma mark - UITextField 类型  
16 -  
17 -@interface CNLiveBOrganizationTFCell()  
18 -/** 背景*/  
19 -@property (nonatomic, strong) UIImageView *cellBGimageV;  
20 -/** 头部*/  
21 -@property (nonatomic, strong) UILabel *titleL;  
22 -/** 内容*/  
23 -@property (nonatomic, strong) UILabel *contentL;  
24 -/** 认证*/  
25 -@property (nonatomic, strong) UIButton *certificationBtn;  
26 -/** 认证Log*/  
27 -@property (nonatomic, strong) UIImageView *certificationLogImageV;  
28 -  
29 -@end  
30 -  
31 -@implementation CNLiveBOrganizationTFCell  
32 -  
33 -  
34 -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  
35 -{  
36 - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];  
37 - if (self) {  
38 - [self setupUI];  
39 - }  
40 - return self;  
41 -}  
42 -  
43 -- (void)awakeFromNib {  
44 - [super awakeFromNib];  
45 - [self setupUI];  
46 -  
47 -}  
48 -  
49 -- (void)layoutSubviews {  
50 - [super layoutSubviews];  
51 -  
52 - [self layoutUI];  
53 -}  
54 -  
55 -  
56 -#pragma mark - ***setupUI***  
57 -- (void)setupUI {  
58 -  
59 - [self setBackgroundColor:[UIColor whiteColor]];  
60 - [self addSubview:self.cellBGimageV];  
61 - [self addSubview:self.titleL];  
62 - [self addSubview:self.contentL];  
63 - [self addSubview:self.certificationBtn];  
64 - [self addSubview:self.certificationLogImageV];  
65 -  
66 - //测试  
67 -// self.contentView.backgroundColor = [UIColor yellowColor];  
68 -// self.contentL.backgroundColor = [UIColor yellowColor];  
69 - self.titleL.text = @"个人认证";  
70 - self.contentL.text = @"适合企业、媒体、国家机构和其他知名机构申请。\n申请方式:在B端申请或在电脑打开链接:http://open.cnlive.com/操作申请.";  
71 -  
72 -}  
73 -  
74 -#pragma mark - ***layoutUI***  
75 -- (void)layoutUI {  
76 -  
77 - __weak typeof(self) weakSelf = self;  
78 -  
79 - [self.cellBGimageV mas_makeConstraints:^(MASConstraintMaker *make) {  
80 - make.left.equalTo(weakSelf.mas_left).offset(0);  
81 - make.top.equalTo(weakSelf.mas_top).offset(0);  
82 - make.right.equalTo(weakSelf.mas_right).offset(0);  
83 - make.bottom.equalTo(weakSelf.mas_bottom).offset(0);  
84 - }];  
85 -  
86 - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {  
87 - make.left.equalTo(weakSelf.mas_left).offset(20.5);  
88 - make.top.equalTo(weakSelf.mas_top).offset(26.5);  
89 - make.width.mas_equalTo(100);  
90 - make.height.mas_equalTo(17);  
91 - }];  
92 -  
93 - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {  
94 - make.left.equalTo(weakSelf.titleL.mas_left).offset(0);  
95 - make.top.equalTo(weakSelf.titleL.mas_bottom).offset(13);  
96 - make.right.equalTo(weakSelf.mas_right).offset(-20.5);  
97 - make.bottom.equalTo(weakSelf.mas_bottom).offset(-23);  
98 - }];  
99 -  
100 - [self.certificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {  
101 - make.right.equalTo(weakSelf.mas_right).offset(-21);  
102 - make.top.equalTo(weakSelf.mas_top).offset(20);  
103 - make.width.mas_equalTo(70);  
104 - make.height.mas_equalTo(25);  
105 - }];  
106 -  
107 -  
108 -  
109 -}  
110 -  
111 -#pragma mark - editUI  
112 -  
113 -  
114 -#pragma mark - ***事件实现***  
115 -  
116 -  
117 -  
118 -  
119 -#pragma mark - ***私有方法***  
120 -#pragma mark - ***懒加载***  
121 -/*** 背景 ***/  
122 -- (UIImageView *)cellBGimageV  
123 -{  
124 - if (!_cellBGimageV) {  
125 - _cellBGimageV = [[UIImageView alloc]init];  
126 - _cellBGimageV.image = [UIImage imageNamedFromOrganization:@"service_cellBg"];  
127 - }  
128 - return _cellBGimageV;  
129 -}  
130 -  
131 -/*** 头部 ***/  
132 -- (UILabel *)titleL {  
133 -  
134 - if (!_titleL) {  
135 - _titleL = [[UILabel alloc]init];  
136 - _titleL.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];  
137 - _titleL.numberOfLines = 1;  
138 - }  
139 - return _titleL;  
140 -  
141 -}  
142 -  
143 -/*** 内容 ***/  
144 -- (UILabel *)contentL {  
145 -  
146 - if (!_contentL) {  
147 - _contentL = [[UILabel alloc]init];  
148 - _contentL.font = [UIFont systemFontOfSize:12];  
149 - _contentL.textAlignment = NSTextAlignmentLeft;  
150 - //让内容置顶  
151 - [_contentL sizeToFit];  
152 - _contentL.textColor = RGBOF(0x7b7b7b);  
153 - _contentL.numberOfLines = 0;  
154 - }  
155 - return _contentL;  
156 -}  
157 -  
158 -  
159 -/*** 认证按钮***/  
160 -- (UIButton *)certificationBtn  
161 -{  
162 - if (!_certificationBtn) {  
163 - _certificationBtn = [UIButton buttonWithType:UIButtonTypeSystem];  
164 - [_certificationBtn setTitle:@"去认证" forState:UIControlStateNormal];  
165 - [_certificationBtn setTitle:@"已认证" forState:UIControlStateSelected];  
166 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
167 - [_certificationBtn setTitleColor:RGBOF(0x999999) forState:UIControlStateNormal];  
168 - _certificationBtn.layer.masksToBounds = YES;  
169 - _certificationBtn.layer.cornerRadius = 12.5;  
170 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
171 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];  
172 - _certificationBtn.titleLabel.font = [UIFont systemFontOfSize:13];  
173 - _certificationBtn.userInteractionEnabled = NO;  
174 -  
175 - }  
176 - return _certificationBtn;  
177 -}  
178 -  
179 -/*** 认证Logo ***/  
180 -- (UIImageView *)certificationLogImageV  
181 -{  
182 - if (!_certificationLogImageV) {  
183 - _certificationLogImageV = [[UIImageView alloc]init];  
184 - _certificationLogImageV.image = [UIImage imageName:@"service_personLog"];  
185 - }  
186 - return _certificationLogImageV;  
187 -}  
188 -  
189 -  
190 -  
191 -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {  
192 - [super setSelected:selected animated:animated];  
193 -  
194 - // Configure the view for the selected state  
195 -}  
196 -  
197 -@end  
198 -  
199 -  
200 -#pragma mark -  
201 -#pragma mark - UITextView 类型  
202 -  
203 -@interface CNLiveBOrganizationTViewCell()  
204 -/** 背景*/  
205 -@property (nonatomic, strong) UIImageView *cellBGimageV;  
206 -/** 头部*/  
207 -@property (nonatomic, strong) UILabel *titleL;  
208 -/** 内容*/  
209 -@property (nonatomic, strong) UILabel *contentL;  
210 -/** 认证*/  
211 -@property (nonatomic, strong) UIButton *certificationBtn;  
212 -/** 认证Log*/  
213 -@property (nonatomic, strong) UIImageView *certificationLogImageV;  
214 -  
215 -@end  
216 -  
217 -@implementation CNLiveBOrganizationTViewCell  
218 -  
219 -  
220 -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  
221 -{  
222 - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];  
223 - if (self) {  
224 - [self setupUI];  
225 - }  
226 - return self;  
227 -}  
228 -  
229 -- (void)awakeFromNib {  
230 - [super awakeFromNib];  
231 - [self setupUI];  
232 -  
233 -}  
234 -  
235 -- (void)layoutSubviews {  
236 - [super layoutSubviews];  
237 -  
238 - [self layoutUI];  
239 -}  
240 -  
241 -  
242 -#pragma mark - ***setupUI***  
243 -- (void)setupUI {  
244 -  
245 - [self setBackgroundColor:[UIColor whiteColor]];  
246 - [self addSubview:self.cellBGimageV];  
247 - [self addSubview:self.titleL];  
248 - [self addSubview:self.contentL];  
249 - [self addSubview:self.certificationBtn];  
250 - [self addSubview:self.certificationLogImageV];  
251 -  
252 - //测试  
253 -// self.contentView.backgroundColor = [UIColor yellowColor];  
254 -// self.contentL.backgroundColor = [UIColor yellowColor];  
255 - self.titleL.text = @"个人认证";  
256 - self.contentL.text = @"适合企业、媒体、国家机构和其他知名机构申请。\n申请方式:在B端申请或在电脑打开链接:http://open.cnlive.com/操作申请.";  
257 -  
258 -}  
259 -  
260 -#pragma mark - ***layoutUI***  
261 -- (void)layoutUI {  
262 -  
263 - __weak typeof(self) weakSelf = self;  
264 -  
265 - [self.cellBGimageV mas_makeConstraints:^(MASConstraintMaker *make) {  
266 - make.left.equalTo(weakSelf.mas_left).offset(0);  
267 - make.top.equalTo(weakSelf.mas_top).offset(0);  
268 - make.right.equalTo(weakSelf.mas_right).offset(0);  
269 - make.bottom.equalTo(weakSelf.mas_bottom).offset(0);  
270 - }];  
271 -  
272 - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {  
273 - make.left.equalTo(weakSelf.mas_left).offset(20.5);  
274 - make.top.equalTo(weakSelf.mas_top).offset(26.5);  
275 - make.width.mas_equalTo(100);  
276 - make.height.mas_equalTo(17);  
277 - }];  
278 -  
279 - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {  
280 - make.left.equalTo(weakSelf.titleL.mas_left).offset(0);  
281 - make.top.equalTo(weakSelf.titleL.mas_bottom).offset(13);  
282 - make.right.equalTo(weakSelf.mas_right).offset(-20.5);  
283 - make.bottom.equalTo(weakSelf.mas_bottom).offset(-23);  
284 - }];  
285 -  
286 - [self.certificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {  
287 - make.right.equalTo(weakSelf.mas_right).offset(-21);  
288 - make.top.equalTo(weakSelf.mas_top).offset(20);  
289 - make.width.mas_equalTo(70);  
290 - make.height.mas_equalTo(25);  
291 - }];  
292 -  
293 -  
294 -  
295 -}  
296 -  
297 -#pragma mark - editUI  
298 -  
299 -  
300 -#pragma mark - ***事件实现***  
301 -  
302 -  
303 -  
304 -  
305 -#pragma mark - ***私有方法***  
306 -#pragma mark - ***懒加载***  
307 -/*** 背景 ***/  
308 -- (UIImageView *)cellBGimageV  
309 -{  
310 - if (!_cellBGimageV) {  
311 - _cellBGimageV = [[UIImageView alloc]init];  
312 - _cellBGimageV.image = [UIImage imageNamedFromOrganization:@"service_cellBg"];  
313 - }  
314 - return _cellBGimageV;  
315 -}  
316 -  
317 -/*** 头部 ***/  
318 -- (UILabel *)titleL {  
319 -  
320 - if (!_titleL) {  
321 - _titleL = [[UILabel alloc]init];  
322 - _titleL.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];  
323 - _titleL.numberOfLines = 1;  
324 - }  
325 - return _titleL;  
326 -  
327 -}  
328 -  
329 -/*** 内容 ***/  
330 -- (UILabel *)contentL {  
331 -  
332 - if (!_contentL) {  
333 - _contentL = [[UILabel alloc]init];  
334 - _contentL.font = [UIFont systemFontOfSize:12];  
335 - _contentL.textAlignment = NSTextAlignmentLeft;  
336 - //让内容置顶  
337 - [_contentL sizeToFit];  
338 - _contentL.textColor = RGBOF(0x7b7b7b);  
339 - _contentL.numberOfLines = 0;  
340 - }  
341 - return _contentL;  
342 -}  
343 -  
344 -  
345 -/*** 认证按钮***/  
346 -- (UIButton *)certificationBtn  
347 -{  
348 - if (!_certificationBtn) {  
349 - _certificationBtn = [UIButton buttonWithType:UIButtonTypeSystem];  
350 - [_certificationBtn setTitle:@"去认证" forState:UIControlStateNormal];  
351 - [_certificationBtn setTitle:@"已认证" forState:UIControlStateSelected];  
352 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
353 - [_certificationBtn setTitleColor:RGBOF(0x999999) forState:UIControlStateNormal];  
354 - _certificationBtn.layer.masksToBounds = YES;  
355 - _certificationBtn.layer.cornerRadius = 12.5;  
356 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
357 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];  
358 - _certificationBtn.titleLabel.font = [UIFont systemFontOfSize:13];  
359 - _certificationBtn.userInteractionEnabled = NO;  
360 -  
361 - }  
362 - return _certificationBtn;  
363 -}  
364 -  
365 -/*** 认证Logo ***/  
366 -- (UIImageView *)certificationLogImageV  
367 -{  
368 - if (!_certificationLogImageV) {  
369 - _certificationLogImageV = [[UIImageView alloc]init];  
370 - _certificationLogImageV.image = [UIImage imageName:@"service_personLog"];  
371 - }  
372 - return _certificationLogImageV;  
373 -}  
374 -  
375 -  
376 -  
377 -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {  
378 - [super setSelected:selected animated:animated];  
379 -  
380 - // Configure the view for the selected state  
381 -}  
382 -  
383 -@end  
384 -  
385 -  
386 -#pragma mark -  
387 -#pragma mark - CNLiveBOrganizationSelectedCell 类型  
388 -  
389 -@interface CNLiveBOrganizationSelectedCell()  
390 -/** 背景*/  
391 -@property (nonatomic, strong) UIImageView *cellBGimageV;  
392 -/** 头部*/  
393 -@property (nonatomic, strong) UILabel *titleL;  
394 -/** 内容*/  
395 -@property (nonatomic, strong) UILabel *contentL;  
396 -/** 认证*/  
397 -@property (nonatomic, strong) UIButton *certificationBtn;  
398 -/** 认证Log*/  
399 -@property (nonatomic, strong) UIImageView *certificationLogImageV;  
400 -  
401 -@end  
402 -  
403 -@implementation CNLiveBOrganizationSelectedCell  
404 -  
405 -  
406 -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  
407 -{  
408 - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];  
409 - if (self) {  
410 - [self setupUI];  
411 - }  
412 - return self;  
413 -}  
414 -  
415 -- (void)awakeFromNib {  
416 - [super awakeFromNib];  
417 - [self setupUI];  
418 -  
419 -}  
420 -  
421 -- (void)layoutSubviews {  
422 - [super layoutSubviews];  
423 -  
424 - [self layoutUI];  
425 -}  
426 -  
427 -  
428 -#pragma mark - ***setupUI***  
429 -- (void)setupUI {  
430 -  
431 - [self setBackgroundColor:[UIColor whiteColor]];  
432 - [self addSubview:self.cellBGimageV];  
433 - [self addSubview:self.titleL];  
434 - [self addSubview:self.contentL];  
435 - [self addSubview:self.certificationBtn];  
436 - [self addSubview:self.certificationLogImageV];  
437 -  
438 - //测试  
439 -// self.contentView.backgroundColor = [UIColor yellowColor];  
440 -// self.contentL.backgroundColor = [UIColor yellowColor];  
441 - self.titleL.text = @"个人认证";  
442 - self.contentL.text = @"适合企业、媒体、国家机构和其他知名机构申请。\n申请方式:在B端申请或在电脑打开链接:http://open.cnlive.com/操作申请.";  
443 -  
444 -}  
445 -  
446 -#pragma mark - ***layoutUI***  
447 -- (void)layoutUI {  
448 -  
449 - __weak typeof(self) weakSelf = self;  
450 -  
451 - [self.cellBGimageV mas_makeConstraints:^(MASConstraintMaker *make) {  
452 - make.left.equalTo(weakSelf.mas_left).offset(0);  
453 - make.top.equalTo(weakSelf.mas_top).offset(0);  
454 - make.right.equalTo(weakSelf.mas_right).offset(0);  
455 - make.bottom.equalTo(weakSelf.mas_bottom).offset(0);  
456 - }];  
457 -  
458 - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {  
459 - make.left.equalTo(weakSelf.mas_left).offset(20.5);  
460 - make.top.equalTo(weakSelf.mas_top).offset(26.5);  
461 - make.width.mas_equalTo(100);  
462 - make.height.mas_equalTo(17);  
463 - }];  
464 -  
465 - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {  
466 - make.left.equalTo(weakSelf.titleL.mas_left).offset(0);  
467 - make.top.equalTo(weakSelf.titleL.mas_bottom).offset(13);  
468 - make.right.equalTo(weakSelf.mas_right).offset(-20.5);  
469 - make.bottom.equalTo(weakSelf.mas_bottom).offset(-23);  
470 - }];  
471 -  
472 - [self.certificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {  
473 - make.right.equalTo(weakSelf.mas_right).offset(-21);  
474 - make.top.equalTo(weakSelf.mas_top).offset(20);  
475 - make.width.mas_equalTo(70);  
476 - make.height.mas_equalTo(25);  
477 - }];  
478 -  
479 -  
480 -  
481 -}  
482 -  
483 -#pragma mark - editUI  
484 -  
485 -  
486 -#pragma mark - ***事件实现***  
487 -  
488 -  
489 -  
490 -  
491 -#pragma mark - ***私有方法***  
492 -#pragma mark - ***懒加载***  
493 -/*** 背景 ***/  
494 -- (UIImageView *)cellBGimageV  
495 -{  
496 - if (!_cellBGimageV) {  
497 - _cellBGimageV = [[UIImageView alloc]init];  
498 - _cellBGimageV.image = [UIImage imageNamedFromOrganization:@"service_cellBg"];  
499 - }  
500 - return _cellBGimageV;  
501 -}  
502 -  
503 -/*** 头部 ***/  
504 -- (UILabel *)titleL {  
505 -  
506 - if (!_titleL) {  
507 - _titleL = [[UILabel alloc]init];  
508 - _titleL.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];  
509 - _titleL.numberOfLines = 1;  
510 - }  
511 - return _titleL;  
512 -  
513 -}  
514 -  
515 -/*** 内容 ***/  
516 -- (UILabel *)contentL {  
517 -  
518 - if (!_contentL) {  
519 - _contentL = [[UILabel alloc]init];  
520 - _contentL.font = [UIFont systemFontOfSize:12];  
521 - _contentL.textAlignment = NSTextAlignmentLeft;  
522 - //让内容置顶  
523 - [_contentL sizeToFit];  
524 - _contentL.textColor = RGBOF(0x7b7b7b);  
525 - _contentL.numberOfLines = 0;  
526 - }  
527 - return _contentL;  
528 -}  
529 -  
530 -  
531 -/*** 认证按钮***/  
532 -- (UIButton *)certificationBtn  
533 -{  
534 - if (!_certificationBtn) {  
535 - _certificationBtn = [UIButton buttonWithType:UIButtonTypeSystem];  
536 - [_certificationBtn setTitle:@"去认证" forState:UIControlStateNormal];  
537 - [_certificationBtn setTitle:@"已认证" forState:UIControlStateSelected];  
538 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
539 - [_certificationBtn setTitleColor:RGBOF(0x999999) forState:UIControlStateNormal];  
540 - _certificationBtn.layer.masksToBounds = YES;  
541 - _certificationBtn.layer.cornerRadius = 12.5;  
542 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
543 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];  
544 - _certificationBtn.titleLabel.font = [UIFont systemFontOfSize:13];  
545 - _certificationBtn.userInteractionEnabled = NO;  
546 -  
547 - }  
548 - return _certificationBtn;  
549 -}  
550 -  
551 -/*** 认证Logo ***/  
552 -- (UIImageView *)certificationLogImageV  
553 -{  
554 - if (!_certificationLogImageV) {  
555 - _certificationLogImageV = [[UIImageView alloc]init];  
556 - _certificationLogImageV.image = [UIImage imageName:@"service_personLog"];  
557 - }  
558 - return _certificationLogImageV;  
559 -}  
560 -  
561 -  
562 -  
563 -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {  
564 - [super setSelected:selected animated:animated];  
565 -  
566 - // Configure the view for the selected state  
567 -}  
568 -  
569 -@end  
570 -  
571 -  
572 -#pragma mark -  
573 -#pragma mark - CNLiveBOrganizationImageVSelectedCell 图片选择  
574 -  
575 -@interface CNLiveBOrganizationImageVSelectedCell()  
576 -/** 背景*/  
577 -@property (nonatomic, strong) UIImageView *cellBGimageV;  
578 -/** 头部*/  
579 -@property (nonatomic, strong) UILabel *titleL;  
580 -/** 内容*/  
581 -@property (nonatomic, strong) UILabel *contentL;  
582 -/** 认证*/  
583 -@property (nonatomic, strong) UIButton *certificationBtn;  
584 -/** 认证Log*/  
585 -@property (nonatomic, strong) UIImageView *certificationLogImageV;  
586 -  
587 -@end  
588 -  
589 -@implementation CNLiveBOrganizationImageVSelectedCell  
590 -  
591 -  
592 -- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier  
593 -{  
594 - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];  
595 - if (self) {  
596 - [self setupUI];  
597 - }  
598 - return self;  
599 -}  
600 -  
601 -- (void)awakeFromNib {  
602 - [super awakeFromNib];  
603 - [self setupUI];  
604 -  
605 -}  
606 -  
607 -- (void)layoutSubviews {  
608 - [super layoutSubviews];  
609 -  
610 - [self layoutUI];  
611 -}  
612 -  
613 -  
614 -#pragma mark - ***setupUI***  
615 -- (void)setupUI {  
616 -  
617 - [self setBackgroundColor:[UIColor whiteColor]];  
618 - [self addSubview:self.cellBGimageV];  
619 - [self addSubview:self.titleL];  
620 - [self addSubview:self.contentL];  
621 - [self addSubview:self.certificationBtn];  
622 - [self addSubview:self.certificationLogImageV];  
623 -  
624 - //测试  
625 -// self.contentView.backgroundColor = [UIColor yellowColor];  
626 -// self.contentL.backgroundColor = [UIColor yellowColor];  
627 - self.titleL.text = @"个人认证";  
628 - self.contentL.text = @"适合企业、媒体、国家机构和其他知名机构申请。\n申请方式:在B端申请或在电脑打开链接:http://open.cnlive.com/操作申请.";  
629 -  
630 -}  
631 -  
632 -#pragma mark - ***layoutUI***  
633 -- (void)layoutUI {  
634 -  
635 - __weak typeof(self) weakSelf = self;  
636 -  
637 - [self.cellBGimageV mas_makeConstraints:^(MASConstraintMaker *make) {  
638 - make.left.equalTo(weakSelf.mas_left).offset(0);  
639 - make.top.equalTo(weakSelf.mas_top).offset(0);  
640 - make.right.equalTo(weakSelf.mas_right).offset(0);  
641 - make.bottom.equalTo(weakSelf.mas_bottom).offset(0);  
642 - }];  
643 -  
644 - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {  
645 - make.left.equalTo(weakSelf.mas_left).offset(20.5);  
646 - make.top.equalTo(weakSelf.mas_top).offset(26.5);  
647 - make.width.mas_equalTo(100);  
648 - make.height.mas_equalTo(17);  
649 - }];  
650 -  
651 - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) {  
652 - make.left.equalTo(weakSelf.titleL.mas_left).offset(0);  
653 - make.top.equalTo(weakSelf.titleL.mas_bottom).offset(13);  
654 - make.right.equalTo(weakSelf.mas_right).offset(-20.5);  
655 - make.bottom.equalTo(weakSelf.mas_bottom).offset(-23);  
656 - }];  
657 -  
658 - [self.certificationBtn mas_makeConstraints:^(MASConstraintMaker *make) {  
659 - make.right.equalTo(weakSelf.mas_right).offset(-21);  
660 - make.top.equalTo(weakSelf.mas_top).offset(20);  
661 - make.width.mas_equalTo(70);  
662 - make.height.mas_equalTo(25);  
663 - }];  
664 -  
665 -  
666 -  
667 -}  
668 -  
669 -#pragma mark - editUI  
670 -  
671 -  
672 -#pragma mark - ***事件实现***  
673 -  
674 -  
675 -  
676 -  
677 -#pragma mark - ***私有方法***  
678 -#pragma mark - ***懒加载***  
679 -/*** 背景 ***/  
680 -- (UIImageView *)cellBGimageV  
681 -{  
682 - if (!_cellBGimageV) {  
683 - _cellBGimageV = [[UIImageView alloc]init];  
684 - _cellBGimageV.image = [UIImage imageNamedFromOrganization:@"service_cellBg"];  
685 - }  
686 - return _cellBGimageV;  
687 -}  
688 -  
689 -/*** 头部 ***/  
690 -- (UILabel *)titleL {  
691 -  
692 - if (!_titleL) {  
693 - _titleL = [[UILabel alloc]init];  
694 - _titleL.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];  
695 - _titleL.numberOfLines = 1;  
696 - }  
697 - return _titleL;  
698 -  
699 -}  
700 -  
701 -/*** 内容 ***/  
702 -- (UILabel *)contentL {  
703 -  
704 - if (!_contentL) {  
705 - _contentL = [[UILabel alloc]init];  
706 - _contentL.font = [UIFont systemFontOfSize:12];  
707 - _contentL.textAlignment = NSTextAlignmentLeft;  
708 - //让内容置顶  
709 - [_contentL sizeToFit];  
710 - _contentL.textColor = RGBOF(0x7b7b7b);  
711 - _contentL.numberOfLines = 0;  
712 - }  
713 - return _contentL;  
714 -}  
715 -  
716 -  
717 -/*** 认证按钮***/  
718 -- (UIButton *)certificationBtn  
719 -{  
720 - if (!_certificationBtn) {  
721 - _certificationBtn = [UIButton buttonWithType:UIButtonTypeSystem];  
722 - [_certificationBtn setTitle:@"去认证" forState:UIControlStateNormal];  
723 - [_certificationBtn setTitle:@"已认证" forState:UIControlStateSelected];  
724 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
725 - [_certificationBtn setTitleColor:RGBOF(0x999999) forState:UIControlStateNormal];  
726 - _certificationBtn.layer.masksToBounds = YES;  
727 - _certificationBtn.layer.cornerRadius = 12.5;  
728 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];  
729 - [_certificationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];  
730 - _certificationBtn.titleLabel.font = [UIFont systemFontOfSize:13];  
731 - _certificationBtn.userInteractionEnabled = NO;  
732 -  
733 - }  
734 - return _certificationBtn;  
735 -}  
736 -  
737 -/*** 认证Logo ***/  
738 -- (UIImageView *)certificationLogImageV  
739 -{  
740 - if (!_certificationLogImageV) {  
741 - _certificationLogImageV = [[UIImageView alloc]init];  
742 - _certificationLogImageV.image = [UIImage imageName:@"service_personLog"];  
743 - }  
744 - return _certificationLogImageV;  
745 -}  
746 -  
747 -  
748 -  
749 -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {  
750 - [super setSelected:selected animated:animated];  
751 -  
752 - // Configure the view for the selected state  
753 -}  
754 -  
755 -@end  
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.h
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_END @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_END
33 33
34 NS_ASSUME_NONNULL_BEGIN 34 NS_ASSUME_NONNULL_BEGIN
35 35
36 -@interface CNLiveBOrganizationTVFooteriew : UITableViewHeaderFooterView 36 +@interface CNLiveBOrganizationTVFooteriew : UIView
37 37
38 /** 协议按钮*/ 38 /** 协议按钮*/
39 @property (nonatomic, strong) UIButton *agreementBtn; 39 @property (nonatomic, strong) UIButton *agreementBtn;
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.m
@@ -284,9 +284,9 @@ @@ -284,9 +284,9 @@
284 284
285 @implementation CNLiveBOrganizationTVFooteriew 285 @implementation CNLiveBOrganizationTVFooteriew
286 286
287 -- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier 287 +- (instancetype)initWithFrame:(CGRect)frame
288 { 288 {
289 - self = [super initWithReuseIdentifier:reuseIdentifier]; 289 + self = [super initWithFrame:frame];
290 if (self) { 290 if (self) {
291 [self setupUI]; 291 [self setupUI];
292 } 292 }
@@ -308,9 +308,9 @@ @@ -308,9 +308,9 @@
308 308
309 #pragma mark - ***setupUI*** 309 #pragma mark - ***setupUI***
310 - (void)setupUI { 310 - (void)setupUI {
311 - [self.contentView addSubview:self.agreementBtn];  
312 - [self.contentView addSubview:self.agreementL];  
313 - [self.contentView addSubview:self.commitBtn]; 311 + [self addSubview:self.agreementBtn];
  312 + [self addSubview:self.agreementL];
  313 + [self addSubview:self.commitBtn];
314 314
315 NSString *contentStr = @"我同意并已阅读《中国网+内容安全协议》"; 315 NSString *contentStr = @"我同意并已阅读《中国网+内容安全协议》";
316 NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:11],NSForegroundColorAttributeName: [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0]}]; 316 NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:11],NSForegroundColorAttributeName: [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0]}];
Example/CNLiveOrganizationValidationModule.xcodeproj/xcshareddata/xcschemes/CNLiveOrganizationValidationModule-Example.xcscheme
@@ -27,6 +27,15 @@ @@ -27,6 +27,15 @@
27 selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" 27 selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28 selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" 28 selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29 shouldUseLaunchSchemeArgsEnv = "YES"> 29 shouldUseLaunchSchemeArgsEnv = "YES">
  30 + <MacroExpansion>
  31 + <BuildableReference
  32 + BuildableIdentifier = "primary"
  33 + BlueprintIdentifier = "6003F589195388D20070C39A"
  34 + BuildableName = "CNLiveOrganizationValidationModule_Example.app"
  35 + BlueprintName = "CNLiveOrganizationValidationModule_Example"
  36 + ReferencedContainer = "container:CNLiveOrganizationValidationModule.xcodeproj">
  37 + </BuildableReference>
  38 + </MacroExpansion>
30 <Testables> 39 <Testables>
31 <TestableReference 40 <TestableReference
32 skipped = "NO"> 41 skipped = "NO">
@@ -39,17 +48,6 @@ @@ -39,17 +48,6 @@
39 </BuildableReference> 48 </BuildableReference>
40 </TestableReference> 49 </TestableReference>
41 </Testables> 50 </Testables>
42 - <MacroExpansion>  
43 - <BuildableReference  
44 - BuildableIdentifier = "primary"  
45 - BlueprintIdentifier = "6003F589195388D20070C39A"  
46 - BuildableName = "CNLiveOrganizationValidationModule_Example.app"  
47 - BlueprintName = "CNLiveOrganizationValidationModule_Example"  
48 - ReferencedContainer = "container:CNLiveOrganizationValidationModule.xcodeproj">  
49 - </BuildableReference>  
50 - </MacroExpansion>  
51 - <AdditionalOptions>  
52 - </AdditionalOptions>  
53 </TestAction> 51 </TestAction>
54 <LaunchAction 52 <LaunchAction
55 buildConfiguration = "Debug" 53 buildConfiguration = "Debug"
@@ -71,8 +69,6 @@ @@ -71,8 +69,6 @@
71 ReferencedContainer = "container:CNLiveOrganizationValidationModule.xcodeproj"> 69 ReferencedContainer = "container:CNLiveOrganizationValidationModule.xcodeproj">
72 </BuildableReference> 70 </BuildableReference>
73 </BuildableProductRunnable> 71 </BuildableProductRunnable>
74 - <AdditionalOptions>  
75 - </AdditionalOptions>  
76 </LaunchAction> 72 </LaunchAction>
77 <ProfileAction 73 <ProfileAction
78 buildConfiguration = "Release" 74 buildConfiguration = "Release"
Example/CNLiveOrganizationValidationModule/CNLIVEBViewController.m
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 #import "CNLIVEBViewController.h" 9 #import "CNLIVEBViewController.h"
10 #import "UIColor+MLPFlatColors.h" 10 #import "UIColor+MLPFlatColors.h"
11 #import "CNLiveBOrganizationValidattionController.h" 11 #import "CNLiveBOrganizationValidattionController.h"
  12 +#import "CNLiveBOraganizationDetailController.h"
12 13
13 @interface CNLIVEBViewController () 14 @interface CNLIVEBViewController ()
14 15
@@ -27,6 +28,12 @@ @@ -27,6 +28,12 @@
27 button.frame = CGRectMake(100, 100, 100, 100); 28 button.frame = CGRectMake(100, 100, 100, 100);
28 [button setBackgroundColor:UIColorFromRGB(0x000000)]; 29 [button setBackgroundColor:UIColorFromRGB(0x000000)];
29 [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; 30 [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
  31 +
  32 + UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
  33 + [self.view addSubview:button1];
  34 + button1.frame = CGRectMake(100, 210, 100, 100);
  35 + [button1 setBackgroundColor:UIColorFromRGB(0x000000)];
  36 + [button1 addTarget:self action:@selector(button1Action:) forControlEvents:UIControlEventTouchUpInside];
30 } 37 }
31 38
32 - (void)buttonAction:(UIButton *)button { 39 - (void)buttonAction:(UIButton *)button {
@@ -37,6 +44,12 @@ @@ -37,6 +44,12 @@
37 [self.navigationController pushViewController:vc animated:YES]; 44 [self.navigationController pushViewController:vc animated:YES];
38 } 45 }
39 46
  47 +- (void)button1Action:(UIButton *)button {
  48 + CNLiveBOraganizationDetailController *vc = [[CNLiveBOraganizationDetailController alloc]init];
  49 + [self.navigationController pushViewController:vc animated:YES];
  50 +
  51 +}
  52 +
40 53
41 - (void)didReceiveMemoryWarning 54 - (void)didReceiveMemoryWarning
42 { 55 {