Commit b59bd700b2fa23c9edd734a5fc6e7ed191611cb3
1 parent
c1c64c09
提交添加相册选择
Showing
24 changed files
with
572 additions
and
95 deletions
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ information@2x.png renamed to CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_information@2x.png
9.67 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ information@3x.png renamed to CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_information@3x.png
20.6 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_return@2x.png
0 → 100644
986 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_return@3x.png
0 → 100644
2.05 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ selected@2x.png renamed to CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selected@2x.png
730 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ selected@3x.png renamed to CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selected@3x.png
1.4 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedImageL@2x.png
0 → 100644
2.68 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedImageL@3x.png
0 → 100644
4.78 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedImageS@2x.png
0 → 100644
1.24 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedImageS@3x.png
0 → 100644
2.4 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedTipImage@2x.png
0 → 100644
903 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedTipImage@3x.png
0 → 100644
1.61 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedtip@2x.png
0 → 100644
554 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_selectedtip@3x.png
0 → 100644
919 Bytes
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.m
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | #import "CNLiveBOrganizationValidationHeaderView.h" |
| 12 | 12 | #import "CNLiveBOrganizationContentCell.h" |
| 13 | 13 | #import "CNLiveBAgreementCommitFinishController.h" |
| 14 | +#import "CNLiveBOrganizationPopSelectedView.h" | |
| 14 | 15 | |
| 15 | 16 | @interface CNLiveBOrganizationValidattionController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,UITextViewDelegate>{ |
| 16 | 17 | CGPoint contentoffset; |
| ... | ... | @@ -24,6 +25,9 @@ |
| 24 | 25 | /** 列表 */ |
| 25 | 26 | @property (nonatomic , strong) UITableView *tableView; |
| 26 | 27 | |
| 28 | +/** 弹出视图*/ | |
| 29 | +@property (nonatomic , strong) CNLiveBOrganizationPopSelectedView *popSelectedView; | |
| 30 | + | |
| 27 | 31 | |
| 28 | 32 | @end |
| 29 | 33 | |
| ... | ... | @@ -174,6 +178,10 @@ |
| 174 | 178 | }else if (indexPath.row == 6) { |
| 175 | 179 | CNLiveBOrganizationSelectedCell *selectedCell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationSelectedCell forIndexPath:indexPath]; |
| 176 | 180 | [selectedCell editUIWithIndexPath:indexPath]; |
| 181 | + __weak typeof(self) weakSelf = self; | |
| 182 | + selectedCell.clickSelectedCellBlock = ^(CNLiveBOrganizationSelectedCell * _Nonnull selectedCell, CNLiveBOrganizationButton * _Nonnull selectedBtn) { | |
| 183 | + [weakSelf popView]; | |
| 184 | + }; | |
| 177 | 185 | return selectedCell; |
| 178 | 186 | |
| 179 | 187 | }else if (indexPath.row == 1 || indexPath.row == 12) { |
| ... | ... | @@ -229,7 +237,7 @@ |
| 229 | 237 | }else if (indexPath.row == 4){ |
| 230 | 238 | return 100; |
| 231 | 239 | }else if (indexPath.row == 12){ |
| 232 | - return 200; | |
| 240 | + return 231; | |
| 233 | 241 | }else { |
| 234 | 242 | return 44; |
| 235 | 243 | } |
| ... | ... | @@ -276,6 +284,18 @@ |
| 276 | 284 | [self.navigationController pushViewController:commitVC animated:YES]; |
| 277 | 285 | } |
| 278 | 286 | |
| 287 | + | |
| 288 | +- (void)popView { | |
| 289 | + | |
| 290 | + [self.popSelectedView popViewForView:self.view]; | |
| 291 | + self.popSelectedView.clickCellBlock = ^(CNLiveBOrganizationPopSelectedView * _Nonnull view, NSString * _Nonnull text) { | |
| 292 | + NSLog(@"选择结束返回"); | |
| 293 | + | |
| 294 | + | |
| 295 | + }; | |
| 296 | + | |
| 297 | + | |
| 298 | +} | |
| 279 | 299 | |
| 280 | 300 | |
| 281 | 301 | |
| ... | ... | @@ -294,7 +314,6 @@ |
| 294 | 314 | [_tableView registerClass:[CNLiveBOrganizationTViewCell class] forCellReuseIdentifier:kCNLiveBOrganizationTViewCell]; |
| 295 | 315 | [_tableView registerClass:[CNLiveBOrganizationSelectedCell class] forCellReuseIdentifier:kCNLiveBOrganizationSelectedCell]; |
| 296 | 316 | [_tableView registerClass:[CNLiveBOrganizationImageVSelectedCell class] forCellReuseIdentifier:kCNLiveBOrganizationImageVSelectedCell]; |
| 297 | - | |
| 298 | 317 | [_tableView registerClass:[CNLiveBOrganizationTVHeaderView class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVHeaderView]; |
| 299 | 318 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| 300 | 319 | _tableView.dataSource = self; |
| ... | ... | @@ -315,10 +334,18 @@ |
| 315 | 334 | - (UIView *)footerView { |
| 316 | 335 | if (!_footerView) { |
| 317 | 336 | _footerView = [[CNLiveBOrganizationTVFooteriew alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 106)]; |
| 337 | + [_footerView setBackgroundColor:RGBOF(0xf9f9f9)]; | |
| 318 | 338 | } |
| 319 | 339 | return _footerView; |
| 320 | 340 | } |
| 321 | 341 | |
| 342 | +- (CNLiveBOrganizationPopSelectedView *)popSelectedView { | |
| 343 | + if (!_popSelectedView) { | |
| 344 | + _popSelectedView = [[CNLiveBOrganizationPopSelectedView alloc]initWithFrame:CGRectZero]; | |
| 345 | + } | |
| 346 | + return _popSelectedView;; | |
| 347 | +} | |
| 348 | + | |
| 322 | 349 | |
| 323 | 350 | /* |
| 324 | 351 | #pragma mark - Navigation | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationButton.h
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationButton.m
| ... | ... | @@ -6,6 +6,9 @@ |
| 6 | 6 | // |
| 7 | 7 | |
| 8 | 8 | #import "CNLiveBOrganizationButton.h" |
| 9 | +#import <Masonry/Masonry.h> | |
| 10 | +#import "UIImage+OrganizationValidation.h" | |
| 11 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 9 | 12 | |
| 10 | 13 | @implementation CNLiveBOrganizationButton |
| 11 | 14 | |
| ... | ... | @@ -27,13 +30,73 @@ |
| 27 | 30 | [self setUpUI]; |
| 28 | 31 | } |
| 29 | 32 | |
| 33 | +#pragma mark - setter | |
| 34 | +- (void)setIsSelectedStatus:(BOOL)isSelectedStatus { | |
| 35 | + _isSelectedStatus = isSelectedStatus; | |
| 36 | + if (!_isSelectedStatus) { | |
| 37 | + self.textL.textColor = RGBOF(0xb9b9b9); | |
| 38 | + }else{ | |
| 39 | + self.textL.textColor = RGBOF(0x333333); | |
| 40 | + } | |
| 41 | + | |
| 42 | +} | |
| 43 | + | |
| 30 | 44 | |
| 31 | 45 | |
| 32 | 46 | - (void)setUpUI |
| 33 | 47 | { |
| 34 | 48 | |
| 49 | + [self addSubview:self.textL]; | |
| 50 | + [self addSubview:self.tipImageV]; | |
| 51 | + self.textL.text = @"请选择企业类型"; | |
| 52 | + self.isSelectedStatus = NO; | |
| 53 | + self.textL.frame = CGRectMake(6, 8, KScreenWidth - 200, 12); | |
| 54 | + self.tipImageV.frame = CGRectMake(self.frame.size.width -14.5, 8, 6.5, 12); | |
| 55 | + | |
| 35 | 56 | |
| 36 | 57 | } |
| 37 | 58 | |
| 38 | 59 | |
| 60 | +#pragma mark - ***layoutUI*** | |
| 61 | +- (void)layoutUI { | |
| 62 | + | |
| 63 | + | |
| 64 | +} | |
| 65 | + | |
| 66 | +#pragma mark - editUI | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | +#pragma mark - ***事件实现*** | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | +#pragma mark - ***私有方法*** | |
| 76 | +#pragma mark - ***懒加载*** | |
| 77 | + | |
| 78 | +- (UIImageView *)tipImageV { | |
| 79 | + if (!_tipImageV) { | |
| 80 | + _tipImageV = [[UIImageView alloc]init]; | |
| 81 | + _tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_selectedtip"]; | |
| 82 | + } | |
| 83 | + return _tipImageV; | |
| 84 | +} | |
| 85 | + | |
| 86 | + | |
| 87 | +/*** 头部 ***/ | |
| 88 | +- (UILabel *)textL { | |
| 89 | + | |
| 90 | + if (!_textL) { | |
| 91 | + _textL = [[UILabel alloc]init]; | |
| 92 | + _textL.font = [UIFont systemFontOfSize:12]; | |
| 93 | + _textL.numberOfLines = 1; | |
| 94 | + } | |
| 95 | + return _textL; | |
| 96 | + | |
| 97 | +} | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 39 | 102 | @end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationPopCell.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationPopCell.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/14. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | + | |
| 11 | +///选着类型cell | |
| 12 | +#define kCNLiveBOrganizationPopCell @"CNLiveBOrganizationPopCell" | |
| 13 | + | |
| 14 | +NS_ASSUME_NONNULL_BEGIN | |
| 15 | + | |
| 16 | +@interface CNLiveBOrganizationPopCell : UITableViewCell | |
| 17 | + | |
| 18 | +@end | |
| 19 | + | |
| 20 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationPopCell.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationPopCell.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/14. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveBOrganizationPopCell.h" | |
| 9 | +#import <Masonry/Masonry.h> | |
| 10 | +#import "UIImage+OrganizationValidation.h" | |
| 11 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 12 | + | |
| 13 | +@interface CNLiveBOrganizationPopCell() | |
| 14 | +/** 必须标记*/ | |
| 15 | +@property (nonatomic, strong) UIImageView *tipImageV; | |
| 16 | +/** 头部*/ | |
| 17 | +@property (nonatomic, strong) UILabel *titleL; | |
| 18 | + | |
| 19 | + | |
| 20 | +@end | |
| 21 | + | |
| 22 | +@implementation CNLiveBOrganizationPopCell | |
| 23 | + | |
| 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.titleL]; | |
| 52 | + [self addSubview:self.tipImageV]; | |
| 53 | + | |
| 54 | + self.tipImageV.frame = CGRectMake(KScreenWidth - 35, 17 ,20, 15); | |
| 55 | + self.titleL.frame = CGRectMake(14.5, 16, KScreenWidth - 35 - 14.5, 12); | |
| 56 | + | |
| 57 | + | |
| 58 | +} | |
| 59 | + | |
| 60 | +#pragma mark - ***layoutUI*** | |
| 61 | +- (void)layoutUI { | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | +} | |
| 66 | + | |
| 67 | +#pragma mark - editUI | |
| 68 | + | |
| 69 | +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath { | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | +} | |
| 74 | + | |
| 75 | + | |
| 76 | +#pragma mark - ***事件实现*** | |
| 77 | + | |
| 78 | +#pragma mark - ***监听实现*** | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | +#pragma mark - ***私有方法*** | |
| 83 | +#pragma mark - ***懒加载*** | |
| 84 | +- (UIImageView *)tipImageV { | |
| 85 | + if (!_tipImageV) { | |
| 86 | + _tipImageV = [[UIImageView alloc]init]; | |
| 87 | + _tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_selectedTipImage"]; | |
| 88 | + } | |
| 89 | + return _tipImageV; | |
| 90 | +} | |
| 91 | + | |
| 92 | + | |
| 93 | +/*** 头部 ***/ | |
| 94 | +- (UILabel *)titleL { | |
| 95 | + | |
| 96 | + if (!_titleL) { | |
| 97 | + _titleL = [[UILabel alloc]init]; | |
| 98 | + _titleL.font = [UIFont systemFontOfSize:14]; | |
| 99 | + _titleL.textColor = RGBOF(0x282828); | |
| 100 | + _titleL.numberOfLines = 1; | |
| 101 | + } | |
| 102 | + return _titleL; | |
| 103 | + | |
| 104 | +} | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { | |
| 109 | + [super setSelected:selected animated:animated]; | |
| 110 | + | |
| 111 | + // Configure the view for the selected state | |
| 112 | +} | |
| 113 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationPopSelectedView.h
0 → 100644
| 1 | +// | |
| 2 | +// CNPlayDetailAllView.h | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2018/12/14. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +NS_ASSUME_NONNULL_BEGIN | |
| 12 | + | |
| 13 | +@interface CNLiveBOrganizationPopSelectedView : UIView | |
| 14 | + | |
| 15 | +/** 数据数组 */ | |
| 16 | +@property (strong , nonatomic) NSMutableArray *dataSourceArr; | |
| 17 | + | |
| 18 | + | |
| 19 | +/** 点击Cell回调 */ | |
| 20 | +@property (nonatomic, copy) void(^clickCellBlock)(CNLiveBOrganizationPopSelectedView *view,NSString *text); | |
| 21 | + | |
| 22 | +-(void)popViewForView:(UIView *)view; | |
| 23 | + | |
| 24 | +-(void)dismissView; | |
| 25 | + | |
| 26 | +@end | |
| 27 | + | |
| 28 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Other/CNLiveBOrganizationPopSelectedView.m
0 → 100644
| 1 | +// | |
| 2 | +// CNPlayDetailAllView.m | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2018/12/14. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNLiveBOrganizationPopSelectedView.h" | |
| 10 | +#import <Masonry/Masonry.h> | |
| 11 | +#import "UIImage+OrganizationValidation.h" | |
| 12 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 13 | +#import "CNLiveBOrganizationPopCell.h" | |
| 14 | + | |
| 15 | +@interface CNLiveBOrganizationPopSelectedView ()<UITableViewDelegate,UITableViewDataSource> | |
| 16 | +{ | |
| 17 | + | |
| 18 | +} | |
| 19 | + | |
| 20 | +@property (strong ,nonatomic) UIView *headerView; | |
| 21 | +@property (strong ,nonatomic) UILabel *headerL;//头名 | |
| 22 | +@property (strong ,nonatomic) UIButton *returnBtn;//提示 | |
| 23 | +@property (strong ,nonatomic) UITableView *tableView;//列表 | |
| 24 | + | |
| 25 | + | |
| 26 | +@end | |
| 27 | + | |
| 28 | + | |
| 29 | +@implementation CNLiveBOrganizationPopSelectedView | |
| 30 | + | |
| 31 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 32 | +{ | |
| 33 | + self = [super initWithFrame:frame]; | |
| 34 | + if (self) { | |
| 35 | + | |
| 36 | + [self setupUI]; | |
| 37 | + [self editUI]; | |
| 38 | + | |
| 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 | +#pragma mark - getter,setter | |
| 56 | + | |
| 57 | + | |
| 58 | +#pragma mark - setupUI | |
| 59 | +- (void)setupUI { | |
| 60 | + self. dataSourceArr = [NSMutableArray array]; | |
| 61 | + | |
| 62 | + [self.headerView addSubview:self.headerL]; | |
| 63 | + [self.headerView addSubview:self.returnBtn]; | |
| 64 | + self.headerView.frame = CGRectMake(0, 0, KScreenWidth, 50); | |
| 65 | + UIBezierPath *fieldPath = [UIBezierPath bezierPathWithRoundedRect:self.headerView.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(15 , 15)]; | |
| 66 | + CAShapeLayer *fieldLayer = [[CAShapeLayer alloc] init]; | |
| 67 | + fieldLayer.frame = self.headerView.bounds; | |
| 68 | + fieldLayer.path = fieldPath.CGPath; | |
| 69 | + self.headerView.layer.mask = fieldLayer; | |
| 70 | + self.headerL.frame = CGRectMake(44, 0, KScreenWidth - 88, 50); | |
| 71 | + self.headerL.text = @"请选择企业类型"; | |
| 72 | + self.returnBtn.frame = CGRectMake(KScreenWidth - 54, 0, 44, 44); | |
| 73 | + self.tableView.tableHeaderView = self.headerView; | |
| 74 | + UIView *footerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, kVerticalBottomSafeHeight)]; | |
| 75 | + self.tableView.tableFooterView = footerView; | |
| 76 | + [self.tableView setBackgroundColor:[UIColor clearColor]]; | |
| 77 | + | |
| 78 | + | |
| 79 | + [self addSubview:self.tableView]; | |
| 80 | + /** tableView */ | |
| 81 | + self.tableView.delegate = self; | |
| 82 | + self.tableView.dataSource = self; | |
| 83 | + [self.tableView registerClass:[CNLiveBOrganizationPopCell class] forCellReuseIdentifier:kCNLiveBOrganizationPopCell]; | |
| 84 | + [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"]; | |
| 85 | + [self.tableView registerClass:[UITableViewHeaderFooterView class] forHeaderFooterViewReuseIdentifier:@"HeaderFooter"]; | |
| 86 | + | |
| 87 | + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(viewTapAction:)]; | |
| 88 | + [self addGestureRecognizer:tap]; | |
| 89 | + | |
| 90 | +} | |
| 91 | + | |
| 92 | +#pragma mark - layoutUI | |
| 93 | +- (void)layoutUI { | |
| 94 | + __weak typeof(self) weakSelf = self; | |
| 95 | + | |
| 96 | + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 97 | + make.left.equalTo(weakSelf.mas_left); | |
| 98 | + make.top.equalTo(weakSelf.mas_top).offset(KScreenHeight/2); | |
| 99 | + make.right.equalTo(weakSelf.mas_right); | |
| 100 | + make.height.mas_equalTo(KScreenHeight/2); | |
| 101 | + }]; | |
| 102 | + | |
| 103 | +} | |
| 104 | + | |
| 105 | +#pragma mark - editUI | |
| 106 | +- (void)editUI { | |
| 107 | + | |
| 108 | +} | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | +#pragma mark - delegate | |
| 113 | +#pragma mark - <UITableViewDelegate,UITableViewDataSource> | |
| 114 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
| 115 | + return 13; | |
| 116 | +} | |
| 117 | + | |
| 118 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 119 | + CNLiveBOrganizationPopCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationPopCell forIndexPath:indexPath]; | |
| 120 | + | |
| 121 | + return cell; | |
| 122 | +} | |
| 123 | + | |
| 124 | +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { | |
| 125 | + UITableViewHeaderFooterView *headerVeiw = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"HeaderFooter"]; | |
| 126 | + return headerVeiw; | |
| 127 | + | |
| 128 | +} | |
| 129 | + | |
| 130 | +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { | |
| 131 | + UITableViewHeaderFooterView *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:@"HeaderFooter"]; | |
| 132 | + return footerView; | |
| 133 | +} | |
| 134 | + | |
| 135 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 136 | + return 49.5; | |
| 137 | +} | |
| 138 | + | |
| 139 | +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { | |
| 140 | + return 0.01; | |
| 141 | +} | |
| 142 | + | |
| 143 | +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { | |
| 144 | + return 0.01; | |
| 145 | +} | |
| 146 | + | |
| 147 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 148 | + | |
| 149 | + if (self.clickCellBlock) { | |
| 150 | + self.clickCellBlock(self, @"影视"); | |
| 151 | + __weak typeof(self) weakSelf = self; | |
| 152 | + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | |
| 153 | + if (weakSelf) { | |
| 154 | + [weakSelf dismissView]; | |
| 155 | + } | |
| 156 | + }); | |
| 157 | + } | |
| 158 | + | |
| 159 | +} | |
| 160 | + | |
| 161 | +#pragma mark - 事件实现 | |
| 162 | +- (void)viewTapAction:(UITapGestureRecognizer *)tap { | |
| 163 | + | |
| 164 | + [self dismissView]; | |
| 165 | +} | |
| 166 | + | |
| 167 | +#pragma mark - 私有方法 | |
| 168 | + | |
| 169 | +#pragma mark - 弹出 | |
| 170 | +-(void)popViewForView:(UIView *)view{ | |
| 171 | + | |
| 172 | + self.frame = CGRectMake(0, KScreenHeight/2, KScreenWidth, KScreenHeight); | |
| 173 | + [self setBackgroundColor:RGBA(0, 0, 0, 0.5)]; | |
| 174 | + [view addSubview:self]; | |
| 175 | + [view bringSubviewToFront:self]; | |
| 176 | + | |
| 177 | + [UIView animateWithDuration:0.25 animations:^{ | |
| 178 | + | |
| 179 | + self.frame = CGRectMake(0,KScreenHeight - CGRectGetHeight(self.frame), KScreenWidth, CGRectGetHeight(self.frame)); | |
| 180 | + | |
| 181 | + }]; | |
| 182 | +} | |
| 183 | + | |
| 184 | +-(void)dismissView{ | |
| 185 | + | |
| 186 | + [UIView animateWithDuration:0.25 animations:^{ | |
| 187 | + self.frame = CGRectMake(0, KScreenHeight, KScreenWidth,CGRectGetHeight(self.frame)); | |
| 188 | + } completion:^(BOOL finished) { | |
| 189 | + self.dataSourceArr = [NSMutableArray array]; | |
| 190 | + [self removeFromSuperview]; | |
| 191 | + | |
| 192 | + }]; | |
| 193 | +} | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | +#pragma mark - 接口 | |
| 198 | +- (void)getAllList{ | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | +} | |
| 203 | + | |
| 204 | +#pragma mark - 懒加载 | |
| 205 | +/** 列表 */ | |
| 206 | +- (UITableView *)tableView { | |
| 207 | + if (!_tableView) { | |
| 208 | + _tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain]; | |
| 209 | + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | |
| 210 | + } | |
| 211 | + return _tableView; | |
| 212 | +} | |
| 213 | +/** 头部视图 */ | |
| 214 | +- (UIView *)headerView { | |
| 215 | + if (!_headerView) { | |
| 216 | + _headerView = [[UIView alloc]init]; | |
| 217 | + [_headerView setBackgroundColor:kWhiteColor]; | |
| 218 | + } | |
| 219 | + return _headerView; | |
| 220 | +} | |
| 221 | + | |
| 222 | +/** 头名 */ | |
| 223 | +- (UILabel *)headerL { | |
| 224 | + if (!_headerL) { | |
| 225 | + _headerL = [[UILabel alloc]init]; | |
| 226 | + _headerL.textColor = RGB(40, 40, 40); | |
| 227 | + _headerL.textAlignment = NSTextAlignmentCenter; | |
| 228 | + _headerL.font = [UIFont CNBoldFontOfSize:15]; | |
| 229 | + | |
| 230 | + } | |
| 231 | + return _headerL; | |
| 232 | +} | |
| 233 | + | |
| 234 | +/** 提示视图 */ | |
| 235 | +- (UIButton *)returnBtn { | |
| 236 | + | |
| 237 | + if (!_returnBtn) { | |
| 238 | + _returnBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 239 | + [_returnBtn setImage:[UIImage imageNamedFromOrganization:@"organization_return"] forState:UIControlStateNormal]; | |
| 240 | + } | |
| 241 | + return _returnBtn; | |
| 242 | +} | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.h
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | #import <UIKit/UIKit.h> |
| 9 | 9 | #import "CNLiveBOrganizationTextField.h" |
| 10 | 10 | #import "CNLiveBOrganizationTextView.h" |
| 11 | +#import "CNLiveBOrganizationButton.h" | |
| 11 | 12 | |
| 12 | 13 | ///UITextField 类型 |
| 13 | 14 | #define kCNLiveBOrganizationTFCell @"CNLiveBOrganizationTFCell" |
| ... | ... | @@ -56,9 +57,11 @@ NS_ASSUME_NONNULL_END |
| 56 | 57 | NS_ASSUME_NONNULL_BEGIN |
| 57 | 58 | |
| 58 | 59 | @interface CNLiveBOrganizationSelectedCell : UITableViewCell |
| 60 | +/** 认证*/ | |
| 61 | +@property (nonatomic, strong) CNLiveBOrganizationButton *selectedBtn; | |
| 59 | 62 | |
| 60 | 63 | /** 点击item实现*/ |
| 61 | -@property (nonatomic, copy) void(^clickSelectedCellBlock)(CNLiveBOrganizationSelectedCell *selectedCell, UIButton *selectedBtn); | |
| 64 | +@property (nonatomic, copy) void(^clickSelectedCellBlock)(CNLiveBOrganizationSelectedCell *selectedCell, CNLiveBOrganizationButton *selectedBtn); | |
| 62 | 65 | |
| 63 | 66 | @property (strong, nonatomic) NSIndexPath *indexPath; |
| 64 | 67 | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationContentCell.m
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | #import "UIImage+OrganizationValidation.h" |
| 11 | 11 | #import <CNLiveBaseKit/CNLiveBaseKit.h> |
| 12 | 12 | #import "CNLiveBOrganizationTextField.h" |
| 13 | +#import "CNLiveBOrganizationButton.h" | |
| 13 | 14 | |
| 14 | 15 | #pragma mark - |
| 15 | 16 | #pragma mark - UITextField 类型 |
| ... | ... | @@ -72,7 +73,7 @@ |
| 72 | 73 | #pragma mark - ***layoutUI*** |
| 73 | 74 | - (void)layoutUI { |
| 74 | 75 | |
| 75 | - | |
| 76 | + | |
| 76 | 77 | } |
| 77 | 78 | |
| 78 | 79 | #pragma mark - editUI |
| ... | ... | @@ -136,7 +137,7 @@ |
| 136 | 137 | self.contentTF.tfIndexPath = indexPath; |
| 137 | 138 | |
| 138 | 139 | }else if (indexPath.row == 9) { |
| 139 | - | |
| 140 | + | |
| 140 | 141 | [self contentType:CNLiveBOrganizationTFCellTypeMust]; |
| 141 | 142 | self.titleL.text = @"联系人"; |
| 142 | 143 | self.contentL.text = @""; |
| ... | ... | @@ -193,7 +194,7 @@ |
| 193 | 194 | |
| 194 | 195 | #pragma mark - ***私有方法*** |
| 195 | 196 | - (void)contentType:(CNLiveBOrganizationTFCellType) type{ |
| 196 | - | |
| 197 | + | |
| 197 | 198 | if (type == CNLiveBOrganizationTFCellTypeMust) { |
| 198 | 199 | self.tipImageV.hidden = NO; |
| 199 | 200 | self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); |
| ... | ... | @@ -204,7 +205,7 @@ |
| 204 | 205 | self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); |
| 205 | 206 | self.titleL.frame = CGRectMake(10, 16, 72, 12); |
| 206 | 207 | self.contentL.hidden = YES; |
| 207 | - | |
| 208 | + | |
| 208 | 209 | }else { |
| 209 | 210 | self.tipImageV.hidden = NO; |
| 210 | 211 | self.tipImageV.frame = CGRectMake(10, 18, 7, 8); |
| ... | ... | @@ -324,13 +325,13 @@ |
| 324 | 325 | self.titleL.frame = CGRectMake(21.5, 16, 72, 12); |
| 325 | 326 | self.contentTV.frame = CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 78); |
| 326 | 327 | |
| 327 | - [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textViewTextChange:) name:UITextViewTextDidChangeNotification object:nil]; | |
| 328 | + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(textViewTextChange:) name:UITextViewTextDidChangeNotification object:nil]; | |
| 328 | 329 | |
| 329 | 330 | } |
| 330 | 331 | |
| 331 | 332 | #pragma mark - ***layoutUI*** |
| 332 | 333 | - (void)layoutUI { |
| 333 | - | |
| 334 | + | |
| 334 | 335 | |
| 335 | 336 | |
| 336 | 337 | } |
| ... | ... | @@ -340,9 +341,9 @@ |
| 340 | 341 | - (void)editUIWithIndexPath:(NSIndexPath *)indexPath { |
| 341 | 342 | |
| 342 | 343 | if (!indexPath) { |
| 343 | - return; | |
| 344 | - } | |
| 345 | - | |
| 344 | + return; | |
| 345 | + } | |
| 346 | + | |
| 346 | 347 | self.indexPath = indexPath; |
| 347 | 348 | |
| 348 | 349 | if (indexPath.section == 0) { |
| ... | ... | @@ -407,7 +408,7 @@ |
| 407 | 408 | - (UITextView *)contentTV { |
| 408 | 409 | |
| 409 | 410 | if (!_contentTV) { |
| 410 | - _contentTV = [[CNLiveBOrganizationTextView alloc]initWithFrame:CGRectMake(97, 8, KScreenWidth - 97 -29.5, 78)]; | |
| 411 | + _contentTV = [[CNLiveBOrganizationTextView alloc]initWithFrame:CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 78)]; | |
| 411 | 412 | _contentTV.font = [UIFont systemFontOfSize:12]; |
| 412 | 413 | _contentTV.layer.masksToBounds = YES; |
| 413 | 414 | _contentTV.layer.cornerRadius = 5; |
| ... | ... | @@ -438,8 +439,7 @@ |
| 438 | 439 | @property (nonatomic, strong) UIImageView *tipImageV; |
| 439 | 440 | /** 头部*/ |
| 440 | 441 | @property (nonatomic, strong) UILabel *titleL; |
| 441 | -/** 认证*/ | |
| 442 | -@property (nonatomic, strong) UIButton *selectedBtn; | |
| 442 | + | |
| 443 | 443 | |
| 444 | 444 | |
| 445 | 445 | @end |
| ... | ... | @@ -483,14 +483,14 @@ |
| 483 | 483 | self.selectedBtn.frame = CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 28); |
| 484 | 484 | |
| 485 | 485 | self.titleL.text = @"企业类型"; |
| 486 | - | |
| 486 | + | |
| 487 | 487 | [self.selectedBtn addTarget:self action:@selector(selectedBtnAction:) forControlEvents:UIControlEventTouchUpInside]; |
| 488 | 488 | |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | 491 | #pragma mark - ***layoutUI*** |
| 492 | 492 | - (void)layoutUI { |
| 493 | - | |
| 493 | + | |
| 494 | 494 | |
| 495 | 495 | } |
| 496 | 496 | |
| ... | ... | @@ -498,27 +498,27 @@ |
| 498 | 498 | - (void)editUIWithIndexPath:(NSIndexPath *)indexPath { |
| 499 | 499 | |
| 500 | 500 | if (!indexPath) { |
| 501 | - return; | |
| 502 | - } | |
| 503 | - | |
| 504 | - self.indexPath = indexPath; | |
| 505 | - | |
| 506 | - if (indexPath.section == 0) { | |
| 507 | - if (indexPath.row == 6) { | |
| 508 | - self.titleL.text = @"企业类型"; | |
| 509 | - | |
| 510 | - }else { | |
| 511 | - return; | |
| 512 | - } | |
| 513 | - }else { | |
| 514 | - return; | |
| 515 | - } | |
| 501 | + return; | |
| 502 | + } | |
| 503 | + | |
| 504 | + self.indexPath = indexPath; | |
| 505 | + | |
| 506 | + if (indexPath.section == 0) { | |
| 507 | + if (indexPath.row == 6) { | |
| 508 | + self.titleL.text = @"企业类型"; | |
| 509 | + | |
| 510 | + }else { | |
| 511 | + return; | |
| 512 | + } | |
| 513 | + }else { | |
| 514 | + return; | |
| 515 | + } | |
| 516 | 516 | |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | 519 | |
| 520 | 520 | #pragma mark - ***事件实现*** |
| 521 | -- (void)selectedBtnAction:(UIButton *)button { | |
| 521 | +- (void)selectedBtnAction:(CNLiveBOrganizationButton *)button { | |
| 522 | 522 | |
| 523 | 523 | if (self.clickSelectedCellBlock) { |
| 524 | 524 | self.clickSelectedCellBlock(self, button); |
| ... | ... | @@ -557,7 +557,7 @@ |
| 557 | 557 | - (UIButton *)selectedBtn { |
| 558 | 558 | |
| 559 | 559 | if (!_selectedBtn) { |
| 560 | - _selectedBtn = [[UIButton alloc]init]; | |
| 560 | + _selectedBtn = [[CNLiveBOrganizationButton alloc]initWithFrame:CGRectMake(104.5, 10, KScreenWidth - 104.5 - 30.5, 28)]; | |
| 561 | 561 | _selectedBtn.titleLabel.font = [UIFont systemFontOfSize:12]; |
| 562 | 562 | _selectedBtn.layer.masksToBounds = YES; |
| 563 | 563 | _selectedBtn.layer.cornerRadius = 5; |
| ... | ... | @@ -583,6 +583,8 @@ |
| 583 | 583 | #pragma mark - CNLiveBOrganizationImageVSelectedCell 图片选择 |
| 584 | 584 | |
| 585 | 585 | @interface CNLiveBOrganizationImageVSelectedCell() |
| 586 | +/** 必须标记*/ | |
| 587 | +@property (nonatomic, strong) UIImageView *tipImageV; | |
| 586 | 588 | /** 图片*/ |
| 587 | 589 | @property (nonatomic, strong) UIImageView *contentImageView; |
| 588 | 590 | /** 头部*/ |
| ... | ... | @@ -625,37 +627,22 @@ |
| 625 | 627 | [self addSubview:self.contentImageView]; |
| 626 | 628 | [self addSubview:self.titleL]; |
| 627 | 629 | [self addSubview:self.contentL]; |
| 630 | + [self addSubview:self.tipImageV]; | |
| 631 | + | |
| 632 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 633 | + self.tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 634 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 635 | + self.contentImageView.frame = CGRectMake(104.5, 10, 60, 60); | |
| 636 | + self.titleL.centerY = self.contentImageView.centerY; | |
| 637 | + self.tipImageV.centerY = self.contentImageView.centerY; | |
| 638 | + self.contentL.frame = CGRectMake(104.5, self.contentImageView.bottom + 6, KScreenWidth - 104.5 - 30.5, 30); | |
| 628 | 639 | |
| 629 | - self.titleL.text = @"* 企业logo"; | |
| 630 | 640 | |
| 631 | - [self.contentImageView setBackgroundColor:[UIColor yellowColor]]; | |
| 632 | 641 | } |
| 633 | 642 | |
| 634 | 643 | #pragma mark - ***layoutUI*** |
| 635 | 644 | - (void)layoutUI { |
| 636 | 645 | |
| 637 | - __weak typeof(self) weakSelf = self; | |
| 638 | - | |
| 639 | - [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 640 | - make.left.equalTo(weakSelf.mas_left).offset(10); | |
| 641 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 642 | - make.width.mas_equalTo(72); | |
| 643 | - make.height.mas_equalTo(12); | |
| 644 | - }]; | |
| 645 | - | |
| 646 | - [self.contentImageView mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 647 | - make.left.equalTo(weakSelf.titleL.mas_right).offset(23); | |
| 648 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 649 | - make.width.mas_offset(60); | |
| 650 | - make.height.mas_equalTo(60); | |
| 651 | - }]; | |
| 652 | - | |
| 653 | - [self.contentL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 654 | - make.left.equalTo(weakSelf.contentImageView.mas_left); | |
| 655 | - make.top.equalTo(weakSelf.contentImageView.mas_bottom).offset(6); | |
| 656 | - make.right.equalTo(weakSelf.mas_right).offset(-41); | |
| 657 | - make.bottom.equalTo(weakSelf.mas_bottom).offset(-8); | |
| 658 | - }]; | |
| 659 | 646 | |
| 660 | 647 | |
| 661 | 648 | } |
| ... | ... | @@ -668,37 +655,33 @@ |
| 668 | 655 | __weak typeof(self) weakSelf = self; |
| 669 | 656 | if (indexPath.section == 0) { |
| 670 | 657 | if (indexPath.row == 1) { |
| 671 | - NSString *titleStr = @"* 企业logo"; | |
| 672 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 673 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 674 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 675 | - self.titleL.attributedText = string; | |
| 658 | + NSString *titleStr = @"企业logo"; | |
| 659 | + self.titleL.text = titleStr; | |
| 676 | 660 | self.contentL.text = @"请上传LOGO图片(尺寸100*100,图片大小5M以内"; |
| 677 | 661 | |
| 678 | - [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 679 | - make.left.equalTo(weakSelf.titleL.mas_right).offset(23); | |
| 680 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 681 | - make.width.mas_offset(60); | |
| 682 | - make.height.mas_equalTo(60); | |
| 683 | - }]; | |
| 684 | - | |
| 662 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 663 | + self.tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 664 | + self.titleL.frame = CGRectMake(21.5, 16, 72, 12); | |
| 665 | + self.contentImageView.frame = CGRectMake(104.5, 10, 60, 60); | |
| 666 | + self.titleL.centerY = self.contentImageView.centerY; | |
| 667 | + self.tipImageV.centerY = self.contentImageView.centerY; | |
| 668 | + self.contentL.frame = CGRectMake(104.5, self.contentImageView.bottom + 6, KScreenWidth - 104.5 - 30.5, 30); | |
| 669 | + self.contentImageView.image = [UIImage imageNamedFromOrganization:@"organization_selectedImageS"]; | |
| 670 | +#pragma mark - TODO:判断是否有图 | |
| 685 | 671 | |
| 686 | 672 | }else if (indexPath.row == 12){ |
| 687 | - NSString *titleStr = @"* 营业执照:"; | |
| 688 | - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:titleStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName:RGBOF(0x333333)}]; | |
| 689 | - NSRange range = [titleStr rangeOfString:@"*"]; | |
| 690 | - [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12], NSForegroundColorAttributeName: RGBOF(0xf3565f)} range:range]; | |
| 691 | - self.titleL.attributedText = string; | |
| 692 | - | |
| 673 | + NSString *titleStr = @"营业执照:"; | |
| 674 | + self.titleL.text = titleStr; | |
| 693 | 675 | self.contentL.text = @"请上传营业执照图片,格式为JPG,PNG(图片大小不超过5M)"; |
| 694 | 676 | |
| 695 | - [self.contentImageView mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 696 | - make.left.equalTo(weakSelf.titleL.mas_right).offset(23); | |
| 697 | - make.top.equalTo(weakSelf.mas_top).offset(8); | |
| 698 | - make.width.mas_offset(100); | |
| 699 | - make.height.mas_equalTo(137); | |
| 700 | - }]; | |
| 701 | - | |
| 677 | + self.tipImageV.frame = CGRectMake(10, 18 , 7, 8); | |
| 678 | + self.tipImageV.image = [UIImage imageNamedFromOrganization:@"organization_must"]; | |
| 679 | + self.titleL.frame = CGRectMake(21.5, 10, 72, 12); | |
| 680 | + self.contentImageView.frame = CGRectMake(104.5, 10, 100, 137); | |
| 681 | + self.tipImageV.centerY = self.titleL.centerY; | |
| 682 | + self.contentL.frame = CGRectMake(104.5, self.contentImageView.bottom + 6, KScreenWidth - 104.5 - 30.5, 30); | |
| 683 | + self.contentImageView.image = [UIImage imageNamedFromOrganization:@"organization_selectedImageL"]; | |
| 684 | +#pragma mark - TODO:判断是否有图 | |
| 702 | 685 | |
| 703 | 686 | }else { |
| 704 | 687 | return; |
| ... | ... | @@ -717,15 +700,7 @@ |
| 717 | 700 | |
| 718 | 701 | |
| 719 | 702 | #pragma mark - ***私有方法*** |
| 720 | -- (NSMutableAttributedString *)returnAllContentWithTitle:(NSString *)title content:(NSString *)content { | |
| 721 | - NSString *titleStr = [NSString stringWithFormat:@"%@",title ? title : @""]; | |
| 722 | - NSString *contentStr = [NSString stringWithFormat:@"%@ %@",title ? title : @"",content ? content : @""]; | |
| 723 | - NSMutableAttributedString *allStr = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12],NSForegroundColorAttributeName: RGBOF(0xB9B9B9)}]; | |
| 724 | - NSRange rang = [contentStr rangeOfString:titleStr]; | |
| 725 | - [allStr addAttributes:@{NSForegroundColorAttributeName: RGBOF(0x333333)} range:rang]; | |
| 726 | - return allStr; | |
| 727 | - | |
| 728 | -} | |
| 703 | + | |
| 729 | 704 | |
| 730 | 705 | #pragma mark - ***懒加载*** |
| 731 | 706 | /*** 头部 ***/ | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.m
| ... | ... | @@ -148,7 +148,7 @@ |
| 148 | 148 | { |
| 149 | 149 | if (!_tipImageVFirst) { |
| 150 | 150 | _tipImageVFirst = [[UIImageView alloc]init]; |
| 151 | - _tipImageVFirst.image = [UIImage imageNamedFromOrganization:@"organization_ information"]; | |
| 151 | + _tipImageVFirst.image = [UIImage imageNamedFromOrganization:@"organization_information"]; | |
| 152 | 152 | |
| 153 | 153 | } |
| 154 | 154 | return _tipImageVFirst; |
| ... | ... | @@ -370,8 +370,8 @@ |
| 370 | 370 | |
| 371 | 371 | if (!_agreementBtn) { |
| 372 | 372 | _agreementBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 373 | - [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_ selected"] forState:UIControlStateNormal]; | |
| 374 | - [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_ selected"] forState:UIControlStateSelected]; | |
| 373 | + [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_selected"] forState:UIControlStateNormal]; | |
| 374 | + [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_selected"] forState:UIControlStateSelected]; | |
| 375 | 375 | } |
| 376 | 376 | return _agreementBtn; |
| 377 | 377 | ... | ... |