Commit 4c53cc7f696586a7bd9325ab1c9ef77a4eeabb13
1 parent
6eaa099c
提交认证模块
Showing
32 changed files
with
1952 additions
and
17 deletions
CNLiveOrganizationValidationModule.podspec
| ... | ... | @@ -8,8 +8,8 @@ |
| 8 | 8 | |
| 9 | 9 | Pod::Spec.new do |s| |
| 10 | 10 | s.name = 'CNLiveOrganizationValidationModule' |
| 11 | - s.version = '0.1.0' | |
| 12 | - s.summary = 'A short description of CNLiveOrganizationValidationModule.' | |
| 11 | + s.version = '0.0.1' | |
| 12 | + s.summary = '机构认证模块' | |
| 13 | 13 | |
| 14 | 14 | # This description is used to generate tags and improve search results. |
| 15 | 15 | # * Think: What does it do? Why did you write it? What is the focus? |
| ... | ... | @@ -18,25 +18,78 @@ Pod::Spec.new do |s| |
| 18 | 18 | # * Finally, don't worry about the indent, CocoaPods strips it! |
| 19 | 19 | |
| 20 | 20 | s.description = <<-DESC |
| 21 | -TODO: Add long description of the pod here. | |
| 21 | + 机构认证模块 | |
| 22 | 22 | DESC |
| 23 | 23 | |
| 24 | - s.homepage = 'https://github.com/梁星国/CNLiveOrganizationValidationModule' | |
| 24 | + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveOrganizationValidationModule' | |
| 25 | 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' |
| 26 | 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } |
| 27 | 27 | s.author = { '梁星国' => 'liangxingguo_job@163.com' } |
| 28 | - s.source = { :git => 'https://github.com/梁星国/CNLiveOrganizationValidationModule.git', :tag => s.version.to_s } | |
| 28 | + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveOrganizationValidationModule.git', :tag => s.version.to_s } | |
| 29 | 29 | # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' |
| 30 | 30 | |
| 31 | - s.ios.deployment_target = '8.0' | |
| 31 | + s.ios.deployment_target = '9.0' | |
| 32 | 32 | |
| 33 | - s.source_files = 'CNLiveOrganizationValidationModule/Classes/**/*' | |
| 33 | + s.requires_arc = true | |
| 34 | + s.resources = "CNLiveOrganizationValidationModule/Assets/*.{png,bundle}" | |
| 35 | + s.source_files = "CNLiveOrganizationValidationModule/Classes/**/**/*.{h,m}" | |
| 36 | + | |
| 37 | + | |
| 34 | 38 | |
| 35 | 39 | # s.resource_bundles = { |
| 36 | 40 | # 'CNLiveOrganizationValidationModule' => ['CNLiveOrganizationValidationModule/Assets/*.png'] |
| 37 | 41 | # } |
| 38 | - | |
| 42 | + | |
| 39 | 43 | # s.public_header_files = 'Pod/Classes/**/*.h' |
| 40 | 44 | # s.frameworks = 'UIKit', 'MapKit' |
| 41 | 45 | # s.dependency 'AFNetworking', '~> 2.3' |
| 46 | + | |
| 47 | + ######################################## | |
| 48 | + ### 私有库,每次pod update后需要 | |
| 49 | + ### 1)注释以下CNLive私有库pod install | |
| 50 | + ### 2)打开以下CNLive私有库pod install | |
| 51 | + ######################################## | |
| 52 | + #CNLive组件 | |
| 53 | + s.dependency 'CNLiveBeeHive' #核心路由架构 | |
| 54 | + #分享工具库 | |
| 55 | + s.dependency 'CNLiveShareToolKit' | |
| 56 | + #基础请求组件库 | |
| 57 | + s.dependency 'CNLiveRequestBastKit' | |
| 58 | + #基础UI组件库 | |
| 59 | + s.dependency 'CNLiveCustomUI' | |
| 60 | + #基础组件库 | |
| 61 | + s.dependency 'CNLiveBaseKit' | |
| 62 | + #基础分类组件库 | |
| 63 | + s.dependency 'CNLiveCommonCategory' | |
| 64 | + #用户管理库 | |
| 65 | + s.dependency 'CNLiveUserManagement' | |
| 66 | + #语音转文字库 | |
| 67 | + s.dependency 'CNLiveVoiceToTextKit' | |
| 68 | + #业务工具库 | |
| 69 | + s.dependency 'CNLiveBusinessTools' | |
| 70 | + #本地存储库 | |
| 71 | + s.dependency 'CNLiveCacheManagerKit' | |
| 72 | + #环境库 | |
| 73 | + s.dependency 'CNLiveEnvironment' | |
| 74 | + #iCould文件取得 | |
| 75 | + s.dependency 'CNLiveICloudPicker' | |
| 76 | + # #系统定位 | |
| 77 | + # pod 'CNLiveLocationManager' | |
| 78 | + #上传 (新加) | |
| 79 | + s.dependency 'CNLiveUploadManager' | |
| 80 | + #相册 (新加) | |
| 81 | + s.dependency 'CNLiveImagePickerController' | |
| 82 | + #腾讯QQ库 | |
| 83 | + s.dependency 'CNLiveTencentopenapi' | |
| 84 | + #组件化-接口库CNLiveServices | |
| 85 | + s.dependency 'CNLiveServices' | |
| 86 | + ######################################## | |
| 87 | + ### 所有github三方管理库(非频繁更新) | |
| 88 | + ######################################## | |
| 89 | + s.dependency 'CNLiveTripartiteManagement' | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 42 | 95 | end | ... | ... |
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/Root.plist
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| 3 | +<plist version="1.0"> | |
| 4 | +<dict> | |
| 5 | + <key>StringsTable</key> | |
| 6 | + <string>Root</string> | |
| 7 | + <key>PreferenceSpecifiers</key> | |
| 8 | + <array> | |
| 9 | + <dict> | |
| 10 | + <key>Type</key> | |
| 11 | + <string>PSGroupSpecifier</string> | |
| 12 | + <key>Title</key> | |
| 13 | + <string>Group</string> | |
| 14 | + </dict> | |
| 15 | + <dict> | |
| 16 | + <key>Type</key> | |
| 17 | + <string>PSTextFieldSpecifier</string> | |
| 18 | + <key>Title</key> | |
| 19 | + <string>Name</string> | |
| 20 | + <key>Key</key> | |
| 21 | + <string>name_preference</string> | |
| 22 | + <key>DefaultValue</key> | |
| 23 | + <string></string> | |
| 24 | + <key>IsSecure</key> | |
| 25 | + <false/> | |
| 26 | + <key>KeyboardType</key> | |
| 27 | + <string>Alphabet</string> | |
| 28 | + <key>AutocapitalizationType</key> | |
| 29 | + <string>None</string> | |
| 30 | + <key>AutocorrectionType</key> | |
| 31 | + <string>No</string> | |
| 32 | + </dict> | |
| 33 | + <dict> | |
| 34 | + <key>Type</key> | |
| 35 | + <string>PSToggleSwitchSpecifier</string> | |
| 36 | + <key>Title</key> | |
| 37 | + <string>Enabled</string> | |
| 38 | + <key>Key</key> | |
| 39 | + <string>enabled_preference</string> | |
| 40 | + <key>DefaultValue</key> | |
| 41 | + <true/> | |
| 42 | + </dict> | |
| 43 | + <dict> | |
| 44 | + <key>Type</key> | |
| 45 | + <string>PSSliderSpecifier</string> | |
| 46 | + <key>Key</key> | |
| 47 | + <string>slider_preference</string> | |
| 48 | + <key>DefaultValue</key> | |
| 49 | + <real>0.5</real> | |
| 50 | + <key>MinimumValue</key> | |
| 51 | + <integer>0</integer> | |
| 52 | + <key>MaximumValue</key> | |
| 53 | + <integer>1</integer> | |
| 54 | + <key>MinimumValueImage</key> | |
| 55 | + <string></string> | |
| 56 | + <key>MaximumValueImage</key> | |
| 57 | + <string></string> | |
| 58 | + </dict> | |
| 59 | + </array> | |
| 60 | + <key>ApplicationGroupContainerIdentifier</key> | |
| 61 | + <string></string> | |
| 62 | +</dict> | |
| 63 | +</plist> | ... | ... |
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/en.lproj/Root.strings
0 → 100644
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ information@2x.png
0 → 100644
9.67 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ information@3x.png
0 → 100644
20.6 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ selected@2x.png
0 → 100644
730 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_ selected@3x.png
0 → 100644
1.4 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_certification@2x.png
0 → 100644
7.89 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_certification@3x.png
0 → 100644
16.2 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_progressTip@2x.png
0 → 100644
860 Bytes
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_progressTip@3x.png
0 → 100644
1.47 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_success@2x.png
0 → 100644
8.36 KB
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_success@3x.png
0 → 100644
17.3 KB
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Category/NSBundle+OrganizationValidation.h
0 → 100644
| 1 | +// | |
| 2 | +// NSBundle+OrganizationValidation.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <Foundation/Foundation.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface NSBundle (OrganizationValidation) | |
| 13 | + | |
| 14 | ++ (NSBundle *)OrganizationValidationBundle; | |
| 15 | + | |
| 16 | +@end | |
| 17 | + | |
| 18 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Category/NSBundle+OrganizationValidation.m
0 → 100644
| 1 | +// | |
| 2 | +// NSBundle+OrganizationValidation.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "NSBundle+OrganizationValidation.h" | |
| 9 | +#import "CNLiveBOrganizationValidattionController.h" | |
| 10 | + | |
| 11 | +@implementation NSBundle (OrganizationValidation) | |
| 12 | + | |
| 13 | ++ (NSBundle *)OrganizationValidationBundle { | |
| 14 | + NSBundle *bundle = [NSBundle bundleForClass:[CNLiveBOrganizationValidattionController class]]; | |
| 15 | + NSURL *url = [bundle URLForResource:@"CNLiveOrganizationValidationModule" withExtension:@"bundle"]; | |
| 16 | + bundle = [NSBundle bundleWithURL:url]; | |
| 17 | + return bundle; | |
| 18 | +} | |
| 19 | + | |
| 20 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Category/UIImage+OrganizationValidation.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+OrganizationValidation.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface UIImage (OrganizationValidation) | |
| 13 | + | |
| 14 | + | |
| 15 | ++ (UIImage *)imageNamedFromOrganization:(NSString *)imageName; | |
| 16 | + | |
| 17 | +@end | |
| 18 | + | |
| 19 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Category/UIImage+OrganizationValidation.m
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+OrganizationValidation.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "UIImage+OrganizationValidation.h" | |
| 9 | +#import "NSBundle+OrganizationValidation.h" | |
| 10 | + | |
| 11 | +@implementation UIImage (OrganizationValidation) | |
| 12 | + | |
| 13 | + | |
| 14 | ++ (UIImage *)imageNamedFromOrganization:(NSString *)imageName { | |
| 15 | + NSBundle *imageBundle = [NSBundle OrganizationValidationBundle]; | |
| 16 | + NSString *imageNameStr = [NSString stringWithFormat:@"%@",[imageName stringByAppendingString:@"@2x"]]; | |
| 17 | + NSString *imagePath = [imageBundle pathForResource:imageNameStr ofType:@"png"]; | |
| 18 | + UIImage *image = [UIImage imageWithContentsOfFile:imagePath]; | |
| 19 | + if (!image) { | |
| 20 | + // 兼容业务方自己设置图片的方式 | |
| 21 | + imageNameStr = [imageNameStr stringByReplacingOccurrencesOfString:@"@2x" withString:@""]; | |
| 22 | + image = [UIImage imageNamed:imageNameStr]; | |
| 23 | + } | |
| 24 | + if (!image) { | |
| 25 | + image = [UIImage new]; | |
| 26 | + } | |
| 27 | + return image; | |
| 28 | +} | |
| 29 | + | |
| 30 | + | |
| 31 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementCommitFinishController.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBAgreementCommitFinishController.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveBAgreementCommitFinishController : UIViewController | |
| 13 | + | |
| 14 | +@end | |
| 15 | + | |
| 16 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementCommitFinishController.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBAgreementCommitFinishController.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveBAgreementCommitFinishController.h" | |
| 9 | + | |
| 10 | +@interface CNLiveBAgreementCommitFinishController () | |
| 11 | + | |
| 12 | +@end | |
| 13 | + | |
| 14 | +@implementation CNLiveBAgreementCommitFinishController | |
| 15 | + | |
| 16 | +- (void)viewDidLoad { | |
| 17 | + [super viewDidLoad]; | |
| 18 | + // Do any additional setup after loading the view. | |
| 19 | +} | |
| 20 | + | |
| 21 | +/* | |
| 22 | +#pragma mark - Navigation | |
| 23 | + | |
| 24 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | |
| 25 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
| 26 | + // Get the new view controller using [segue destinationViewController]. | |
| 27 | + // Pass the selected object to the new view controller. | |
| 28 | +} | |
| 29 | +*/ | |
| 30 | + | |
| 31 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementContentController.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBAgreementContentController.h | |
| 3 | +// AFNetworking | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveBAgreementContentController : UIViewController | |
| 13 | + | |
| 14 | +@end | |
| 15 | + | |
| 16 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementContentController.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBAgreementContentController.m | |
| 3 | +// AFNetworking | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveBAgreementContentController.h" | |
| 9 | + | |
| 10 | +@interface CNLiveBAgreementContentController () | |
| 11 | + | |
| 12 | +@end | |
| 13 | + | |
| 14 | +@implementation CNLiveBAgreementContentController | |
| 15 | + | |
| 16 | +- (void)viewDidLoad { | |
| 17 | + [super viewDidLoad]; | |
| 18 | + // Do any additional setup after loading the view. | |
| 19 | +} | |
| 20 | + | |
| 21 | +/* | |
| 22 | +#pragma mark - Navigation | |
| 23 | + | |
| 24 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | |
| 25 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
| 26 | + // Get the new view controller using [segue destinationViewController]. | |
| 27 | + // Pass the selected object to the new view controller. | |
| 28 | +} | |
| 29 | +*/ | |
| 30 | + | |
| 31 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationValidattionController.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveBOrganizationValidattionController : UIViewController | |
| 13 | + | |
| 14 | +@end | |
| 15 | + | |
| 16 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationValidattionController.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 9 | + | |
| 10 | +#import "CNLiveBOrganizationValidattionController.h" | |
| 11 | +#import "CNLiveBOrganizationValidationHeaderView.h" | |
| 12 | + | |
| 13 | +@interface CNLiveBOrganizationValidattionController ()<UITableViewDataSource,UITableViewDelegate> | |
| 14 | + | |
| 15 | +/** 头部*/ | |
| 16 | +@property (nonatomic , strong) CNLiveBOrganizationValidationHeaderView *headerView; | |
| 17 | + | |
| 18 | +/** 列表 */ | |
| 19 | +@property (nonatomic , strong) UITableView *tableView; | |
| 20 | + | |
| 21 | + | |
| 22 | +@end | |
| 23 | + | |
| 24 | +@implementation CNLiveBOrganizationValidattionController | |
| 25 | + | |
| 26 | +#pragma mark - | |
| 27 | +#pragma mark - *** 生命周期 *** | |
| 28 | + | |
| 29 | +- (instancetype)init | |
| 30 | +{ | |
| 31 | + self = [super init]; | |
| 32 | + if (self) { | |
| 33 | + | |
| 34 | + } | |
| 35 | + return self; | |
| 36 | +} | |
| 37 | + | |
| 38 | +- (void)dealloc | |
| 39 | +{ | |
| 40 | + | |
| 41 | +} | |
| 42 | + | |
| 43 | +- (void)viewWillAppear:(BOOL)animated { | |
| 44 | + [super viewWillAppear:animated]; | |
| 45 | +} | |
| 46 | + | |
| 47 | +- (void)viewDidLoad { | |
| 48 | + [super viewDidLoad]; | |
| 49 | + | |
| 50 | + [self editUI]; | |
| 51 | +} | |
| 52 | + | |
| 53 | +- (void)viewDidAppear:(BOOL)animated { | |
| 54 | + [super viewDidAppear:animated]; | |
| 55 | +} | |
| 56 | + | |
| 57 | +- (void)viewDidDisappear:(BOOL)animated { | |
| 58 | + [super viewDidDisappear:animated]; | |
| 59 | +} | |
| 60 | + | |
| 61 | +#pragma mark - | |
| 62 | +#pragma mark - *** editUI *** | |
| 63 | + | |
| 64 | +- (void)editUI { | |
| 65 | + | |
| 66 | + [self.view setBackgroundColor:[UIColor whiteColor]]; | |
| 67 | + | |
| 68 | + [self.view addSubview:self.tableView]; | |
| 69 | + | |
| 70 | + self.tableView.tableHeaderView = self.headerView; | |
| 71 | + | |
| 72 | +} | |
| 73 | + | |
| 74 | +#pragma mark - | |
| 75 | +#pragma mark - *** layoutUI *** | |
| 76 | + | |
| 77 | + | |
| 78 | +#pragma mark - | |
| 79 | +#pragma mark - *** delegate *** | |
| 80 | + | |
| 81 | +#pragma mark - <UITableViewDelegate, UITableViewDataSource> | |
| 82 | + | |
| 83 | +//设置显示个数 | |
| 84 | +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
| 85 | + | |
| 86 | + return 1; | |
| 87 | +} | |
| 88 | + | |
| 89 | +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
| 90 | + | |
| 91 | + if (section == 0) { | |
| 92 | + return 13; | |
| 93 | + }else { | |
| 94 | + return 0; | |
| 95 | + } | |
| 96 | + | |
| 97 | +} | |
| 98 | + | |
| 99 | +//设置UI | |
| 100 | +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 101 | + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath]; | |
| 102 | + [cell setBackgroundColor:[UIColor yellowColor]]; | |
| 103 | + return cell; | |
| 104 | + | |
| 105 | +} | |
| 106 | + | |
| 107 | +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { | |
| 108 | + | |
| 109 | + CNLiveBOrganizationTVHeaderView *headerV = [tableView dequeueReusableHeaderFooterViewWithIdentifier:kCNLiveBOrganizationTVHeaderView]; | |
| 110 | + if (section == 0) { | |
| 111 | + headerV.titleL.text = @"填写公司资质信息"; | |
| 112 | + }else { | |
| 113 | + headerV.titleL.text = @""; | |
| 114 | + } | |
| 115 | + | |
| 116 | + return headerV; | |
| 117 | + | |
| 118 | +} | |
| 119 | + | |
| 120 | +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { | |
| 121 | + | |
| 122 | + if (section == 0) { | |
| 123 | + CNLiveBOrganizationTVFooteriew *footerView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:kCNLiveBOrganizationTVFooteriew]; | |
| 124 | + return footerView; | |
| 125 | + | |
| 126 | + }else { | |
| 127 | + return [UIView new]; | |
| 128 | + } | |
| 129 | +} | |
| 130 | + | |
| 131 | +//设置高度 | |
| 132 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 133 | + | |
| 134 | + return 80; | |
| 135 | + | |
| 136 | + | |
| 137 | +} | |
| 138 | + | |
| 139 | +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { | |
| 140 | + | |
| 141 | + if (section == 0) { | |
| 142 | + return 42;; | |
| 143 | + }else { | |
| 144 | + return 0.01; | |
| 145 | + } | |
| 146 | + | |
| 147 | +} | |
| 148 | + | |
| 149 | +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { | |
| 150 | + | |
| 151 | + if (section == 0) { | |
| 152 | + return 106; | |
| 153 | + }else { | |
| 154 | + return 0.01; | |
| 155 | + } | |
| 156 | + | |
| 157 | +} | |
| 158 | + | |
| 159 | +/** 点击cell实现 */ | |
| 160 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | +} | |
| 165 | + | |
| 166 | + | |
| 167 | +#pragma mark - TODO: | |
| 168 | +#pragma mark - *** 事件实现 *** | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | +#pragma mark - | |
| 174 | +#pragma mark - *** 接口 *** | |
| 175 | + | |
| 176 | +#pragma mark - | |
| 177 | +#pragma mark - *** 私有属性 *** | |
| 178 | + | |
| 179 | +- (UITableView *)tableView { | |
| 180 | + if (_tableView == nil) { | |
| 181 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) style:UITableViewStyleGrouped]; | |
| 182 | + _tableView.backgroundColor = [UIColor whiteColor]; | |
| 183 | + [_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 | +// | |
| 188 | + [_tableView registerClass:[CNLiveBOrganizationTVHeaderView class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVHeaderView]; | |
| 189 | + [_tableView registerClass:[CNLiveBOrganizationTVFooteriew class] forHeaderFooterViewReuseIdentifier:kCNLiveBOrganizationTVFooteriew]; | |
| 190 | + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | |
| 191 | + _tableView.dataSource = self; | |
| 192 | + _tableView.delegate = self; | |
| 193 | + | |
| 194 | + } | |
| 195 | + return _tableView; | |
| 196 | +} | |
| 197 | + | |
| 198 | +- (UIView *)headerView { | |
| 199 | + if (!_headerView) { | |
| 200 | + _headerView = [[CNLiveBOrganizationValidationHeaderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 130 * (KScreenHeight/667))]; | |
| 201 | + } | |
| 202 | + return _headerView;; | |
| 203 | +} | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | +/* | |
| 208 | + #pragma mark - Navigation | |
| 209 | + | |
| 210 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | |
| 211 | + - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
| 212 | + // Get the new view controller using [segue destinationViewController]. | |
| 213 | + // Pass the selected object to the new view controller. | |
| 214 | + } | |
| 215 | + */ | |
| 216 | + | |
| 217 | +@end | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationTFCell.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationTFCell.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +///UITextField 类型 | |
| 11 | +#define kCNLiveBOrganizationTFCell @"CNLiveBOrganizationTFCell" | |
| 12 | + | |
| 13 | +typedef NS_ENUM(NSInteger, CNLiveBOrganizationTFCellType){ | |
| 14 | + CNLiveBOrganizationTFCellTypeNormal = 0, | |
| 15 | + CNLiveBOrganizationTFCellTypeMust = 1, | |
| 16 | + CNLiveBOrganizationTFCellTypeAll = 2 | |
| 17 | +}; | |
| 18 | + | |
| 19 | +NS_ASSUME_NONNULL_BEGIN | |
| 20 | + | |
| 21 | +@interface CNLiveBOrganizationTFCell : UITableViewCell | |
| 22 | + | |
| 23 | +@end | |
| 24 | + | |
| 25 | +NS_ASSUME_NONNULL_END | |
| 26 | + | |
| 27 | +///TextView | |
| 28 | +#define kCNLiveBOrganizationTViewCell @"CNLiveBOrganizationTViewCell" | |
| 29 | + | |
| 30 | +NS_ASSUME_NONNULL_BEGIN | |
| 31 | + | |
| 32 | +@interface CNLiveBOrganizationTViewCell : UITableViewCell | |
| 33 | + | |
| 34 | +@end | |
| 35 | + | |
| 36 | +NS_ASSUME_NONNULL_END | |
| 37 | + | |
| 38 | +///选着类型cell | |
| 39 | +#define kCNLiveBOrganizationSelectedCell @"CNLiveBOrganizationSelectedCell" | |
| 40 | + | |
| 41 | +NS_ASSUME_NONNULL_BEGIN | |
| 42 | + | |
| 43 | +@interface CNLiveBOrganizationSelectedCell : UITableViewCell | |
| 44 | + | |
| 45 | +@end | |
| 46 | + | |
| 47 | +NS_ASSUME_NONNULL_END | |
| 48 | + | |
| 49 | + | |
| 50 | +///选着图片cell | |
| 51 | +#define kCNLiveBOrganizationImageVSelectedCell @"CNLiveBOrganizationImageVSelectedCell" | |
| 52 | + | |
| 53 | +NS_ASSUME_NONNULL_BEGIN | |
| 54 | + | |
| 55 | +@interface CNLiveBOrganizationImageVSelectedCell : UITableViewCell | |
| 56 | + | |
| 57 | +@end | |
| 58 | + | |
| 59 | +NS_ASSUME_NONNULL_END | |
| 60 | + | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationTFCell.m
0 → 100644
| 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
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationValidationHeaderView.h | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | + | |
| 10 | +NS_ASSUME_NONNULL_BEGIN | |
| 11 | + | |
| 12 | +@interface CNLiveBOrganizationValidationHeaderView : UIView | |
| 13 | + | |
| 14 | +@end | |
| 15 | + | |
| 16 | +NS_ASSUME_NONNULL_END | |
| 17 | + | |
| 18 | + | |
| 19 | +#define kCNLiveBOrganizationTVHeaderView @"CNLiveBOrganizationTVHeaderView" | |
| 20 | + | |
| 21 | +NS_ASSUME_NONNULL_BEGIN | |
| 22 | + | |
| 23 | +@interface CNLiveBOrganizationTVHeaderView : UITableViewHeaderFooterView | |
| 24 | + | |
| 25 | +/*** 题头 ***/ | |
| 26 | +@property (nonatomic, strong) UILabel *titleL; | |
| 27 | +@end | |
| 28 | + | |
| 29 | +NS_ASSUME_NONNULL_END | |
| 30 | + | |
| 31 | + | |
| 32 | +#define kCNLiveBOrganizationTVFooteriew @"CNLiveBOrganizationTVFooteriew" | |
| 33 | + | |
| 34 | +NS_ASSUME_NONNULL_BEGIN | |
| 35 | + | |
| 36 | +@interface CNLiveBOrganizationTVFooteriew : UITableViewHeaderFooterView | |
| 37 | + | |
| 38 | +/** 协议按钮*/ | |
| 39 | +@property (nonatomic, strong) UIButton *agreementBtn; | |
| 40 | +/** 协议文字*/ | |
| 41 | +@property (nonatomic, strong) UILabel *agreementL; | |
| 42 | +/** 提交按钮*/ | |
| 43 | +@property (nonatomic, strong) UIButton *commitBtn; | |
| 44 | + | |
| 45 | + | |
| 46 | +@end | |
| 47 | + | |
| 48 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationValidationHeaderView.m
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveBOrganizationValidationHeaderView.m | |
| 3 | +// CNLiveOrganizationValidationModule | |
| 4 | +// | |
| 5 | +// Created by 梁星国 on 2020/4/10. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "CNLiveBOrganizationValidationHeaderView.h" | |
| 9 | +#import <Masonry/Masonry.h> | |
| 10 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 11 | +#import "UIImage+OrganizationValidation.h" | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | +@interface CNLiveBOrganizationValidationHeaderView() | |
| 16 | + | |
| 17 | +@property (nonatomic, strong) UIView *bgView; | |
| 18 | + | |
| 19 | +@property (nonatomic, strong) UIImageView *tipImageVFirst; | |
| 20 | + | |
| 21 | +@property (nonatomic, strong) UIImageView *tipLogImageVFirst; | |
| 22 | + | |
| 23 | +@property (nonatomic, strong) UIImageView *tipImageVSecond; | |
| 24 | + | |
| 25 | +@property (nonatomic, strong) UIImageView *tipLogImageVSecond; | |
| 26 | + | |
| 27 | +@property (nonatomic, strong) UIImageView *tipImageVThird; | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | +@end | |
| 32 | + | |
| 33 | +@implementation CNLiveBOrganizationValidationHeaderView | |
| 34 | + | |
| 35 | +- (instancetype)init | |
| 36 | +{ | |
| 37 | + self = [super init]; | |
| 38 | + if (self) { | |
| 39 | + [self setupUI]; | |
| 40 | + } | |
| 41 | + return self; | |
| 42 | +} | |
| 43 | + | |
| 44 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 45 | +{ | |
| 46 | + self = [super initWithFrame:frame]; | |
| 47 | + if (self) { | |
| 48 | + [self setupUI]; | |
| 49 | + } | |
| 50 | + return self; | |
| 51 | +} | |
| 52 | + | |
| 53 | +- (void)awakeFromNib { | |
| 54 | + [super awakeFromNib]; | |
| 55 | + [self setupUI]; | |
| 56 | + | |
| 57 | +} | |
| 58 | + | |
| 59 | +- (void)layoutSubviews { | |
| 60 | + [super layoutSubviews]; | |
| 61 | + | |
| 62 | + [self layoutUI]; | |
| 63 | +} | |
| 64 | + | |
| 65 | + | |
| 66 | +#pragma mark - ***setupUI***r | |
| 67 | +- (void)setupUI { | |
| 68 | + | |
| 69 | + [self setBackgroundColor:RGBOF(0xf2f2f2)]; | |
| 70 | + [self addSubview:self.bgView]; | |
| 71 | + [self addSubview:self.tipImageVFirst]; | |
| 72 | + [self addSubview:self.tipLogImageVFirst]; | |
| 73 | + [self addSubview:self.tipImageVSecond]; | |
| 74 | + [self addSubview:self.tipLogImageVSecond]; | |
| 75 | + [self addSubview:self.tipImageVThird]; | |
| 76 | + | |
| 77 | + | |
| 78 | +} | |
| 79 | + | |
| 80 | +#pragma mark - ***layoutUI*** | |
| 81 | +- (void)layoutUI { | |
| 82 | + | |
| 83 | + __weak typeof(self) weakSelf = self; | |
| 84 | + | |
| 85 | + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 86 | + make.left.equalTo(weakSelf.mas_left).offset(0); | |
| 87 | + make.top.equalTo(weakSelf.mas_top).offset(0); | |
| 88 | + make.width.mas_equalTo(KScreenWidth); | |
| 89 | + make.height.mas_equalTo(120.5 * KScreenWidth / 375); | |
| 90 | + }]; | |
| 91 | + | |
| 92 | + [self.tipImageVSecond mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 93 | + make.centerX.equalTo(weakSelf.mas_centerX).offset(0); | |
| 94 | + make.top.equalTo(weakSelf.mas_top).offset(21.5); | |
| 95 | + make.width.mas_equalTo(55 * KScreenWidth / 375); | |
| 96 | + make.height.mas_equalTo(77 * KScreenWidth / 375); | |
| 97 | + }]; | |
| 98 | + | |
| 99 | + [self.tipLogImageVFirst mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 100 | + make.right.equalTo(weakSelf.tipImageVSecond.mas_left).offset( -22); | |
| 101 | + make.centerY.equalTo(weakSelf.tipImageVSecond.mas_centerY); | |
| 102 | + make.width.mas_equalTo(8.5 * KScreenWidth / 375); | |
| 103 | + make.height.mas_equalTo(15 * KScreenWidth / 375); | |
| 104 | + }]; | |
| 105 | + | |
| 106 | + [self.tipLogImageVSecond mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 107 | + make.left.equalTo(weakSelf.tipImageVSecond.mas_right).offset(22); | |
| 108 | + make.centerY.equalTo(weakSelf.tipImageVSecond.mas_centerY); | |
| 109 | + make.width.mas_equalTo(8.5 * KScreenWidth / 375); | |
| 110 | + make.height.mas_equalTo(15 * KScreenWidth / 375); | |
| 111 | + }]; | |
| 112 | + | |
| 113 | + [self.tipImageVFirst mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 114 | + make.right.equalTo(weakSelf.tipLogImageVFirst.mas_left).offset(-18); | |
| 115 | + make.centerY.equalTo(weakSelf.tipLogImageVFirst.mas_centerY); | |
| 116 | + make.width.mas_equalTo(72 * KScreenWidth / 375); | |
| 117 | + make.height.mas_equalTo(77 * KScreenWidth / 375); | |
| 118 | + }]; | |
| 119 | + | |
| 120 | + [self.tipImageVThird mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 121 | + make.left.equalTo(weakSelf.tipLogImageVSecond.mas_right).offset(18); | |
| 122 | + make.centerY.equalTo(weakSelf.tipLogImageVFirst.mas_centerY); | |
| 123 | + make.width.mas_equalTo(55 * KScreenWidth / 375); | |
| 124 | + make.height.mas_equalTo(77 * KScreenWidth / 375); | |
| 125 | + }]; | |
| 126 | + | |
| 127 | +} | |
| 128 | + | |
| 129 | +#pragma mark - editUI | |
| 130 | + | |
| 131 | + | |
| 132 | +#pragma mark - ***事件实现*** | |
| 133 | + | |
| 134 | + | |
| 135 | +#pragma mark - ***私有方法*** | |
| 136 | +#pragma mark - ***懒加载*** | |
| 137 | + | |
| 138 | +- (UIView *)bgView { | |
| 139 | + if (!_bgView) { | |
| 140 | + _bgView = [[UIView alloc]init]; | |
| 141 | + [_bgView setBackgroundColor:[UIColor whiteColor]]; | |
| 142 | + } | |
| 143 | + return _bgView; | |
| 144 | +} | |
| 145 | + | |
| 146 | +/*** 第一个提示图片 ***/ | |
| 147 | +- (UIImageView *)tipImageVFirst | |
| 148 | +{ | |
| 149 | + if (!_tipImageVFirst) { | |
| 150 | + _tipImageVFirst = [[UIImageView alloc]init]; | |
| 151 | + _tipImageVFirst.image = [UIImage imageNamedFromOrganization:@"organization_ information"]; | |
| 152 | + | |
| 153 | + } | |
| 154 | + return _tipImageVFirst; | |
| 155 | +} | |
| 156 | + | |
| 157 | +/*** 第一个log图片 ***/ | |
| 158 | +- (UIImageView *)tipLogImageVFirst | |
| 159 | +{ | |
| 160 | + if (!_tipLogImageVFirst) { | |
| 161 | + _tipLogImageVFirst = [[UIImageView alloc]init]; | |
| 162 | + _tipLogImageVFirst.image = [UIImage imageNamedFromOrganization:@"organization_progressTip"]; | |
| 163 | + | |
| 164 | + } | |
| 165 | + return _tipLogImageVFirst; | |
| 166 | +} | |
| 167 | + | |
| 168 | +/*** 第二个提示图片 ***/ | |
| 169 | +- (UIImageView *)tipImageVSecond | |
| 170 | +{ | |
| 171 | + if (!_tipImageVSecond) { | |
| 172 | + _tipImageVSecond = [[UIImageView alloc]init]; | |
| 173 | + _tipImageVSecond.image = [UIImage imageNamedFromOrganization:@"organization_certification"]; | |
| 174 | + | |
| 175 | + } | |
| 176 | + return _tipImageVSecond; | |
| 177 | +} | |
| 178 | + | |
| 179 | +/*** 第二个log图片 ***/ | |
| 180 | +- (UIImageView *)tipLogImageVSecond | |
| 181 | +{ | |
| 182 | + if (!_tipLogImageVSecond) { | |
| 183 | + _tipLogImageVSecond = [[UIImageView alloc]init]; | |
| 184 | + _tipLogImageVSecond.image = [UIImage imageNamedFromOrganization:@"organization_progressTip"]; | |
| 185 | + | |
| 186 | + } | |
| 187 | + return _tipLogImageVSecond; | |
| 188 | +} | |
| 189 | + | |
| 190 | + | |
| 191 | +/*** 第三个提示图片 ***/ | |
| 192 | +- (UIImageView *)tipImageVThird | |
| 193 | +{ | |
| 194 | + if (!_tipImageVThird) { | |
| 195 | + _tipImageVThird = [[UIImageView alloc]init]; | |
| 196 | + _tipImageVThird.image = [UIImage imageNamedFromOrganization:@"organization_success"]; | |
| 197 | + | |
| 198 | + } | |
| 199 | + return _tipImageVThird; | |
| 200 | +} | |
| 201 | +@end | |
| 202 | + | |
| 203 | +#pragma mark - | |
| 204 | +#pragma mark - CNLiveBOrganizationTVHeaderView | |
| 205 | + | |
| 206 | +@interface CNLiveBOrganizationTVHeaderView() | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | +@end | |
| 211 | + | |
| 212 | +@implementation CNLiveBOrganizationTVHeaderView | |
| 213 | + | |
| 214 | +- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier | |
| 215 | +{ | |
| 216 | + self = [super initWithReuseIdentifier: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 | + [self.contentView addSubview:self.titleL]; | |
| 239 | + self.titleL.frame = CGRectMake(10, 18, KScreenWidth - 20, 15); | |
| 240 | + | |
| 241 | +} | |
| 242 | + | |
| 243 | +#pragma mark - ***layoutUI*** | |
| 244 | +- (void)layoutUI { | |
| 245 | + | |
| 246 | +} | |
| 247 | + | |
| 248 | +#pragma mark - editUI | |
| 249 | + | |
| 250 | +#pragma mark - ***事件实现*** | |
| 251 | + | |
| 252 | + | |
| 253 | +#pragma mark - ***私有方法*** | |
| 254 | +#pragma mark - ***懒加载*** | |
| 255 | + | |
| 256 | +/*** 题头 ***/ | |
| 257 | +- (UILabel *)titleL { | |
| 258 | + | |
| 259 | + if (!_titleL) { | |
| 260 | + _titleL = [[UILabel alloc]init]; | |
| 261 | + _titleL.textColor = RGBOF(0x333333); | |
| 262 | + _titleL.font = [UIFont systemFontOfSize:15];//加粗; | |
| 263 | + _titleL.numberOfLines = 1; | |
| 264 | + | |
| 265 | + } | |
| 266 | + return _titleL; | |
| 267 | + | |
| 268 | +} | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | +@end | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | +#pragma mark - | |
| 277 | +#pragma mark - CNLiveBOrganizationTVFooteriew | |
| 278 | + | |
| 279 | +@interface CNLiveBOrganizationTVFooteriew() | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | +@end | |
| 284 | + | |
| 285 | +@implementation CNLiveBOrganizationTVFooteriew | |
| 286 | + | |
| 287 | +- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier | |
| 288 | +{ | |
| 289 | + self = [super initWithReuseIdentifier:reuseIdentifier]; | |
| 290 | + if (self) { | |
| 291 | + [self setupUI]; | |
| 292 | + } | |
| 293 | + return self; | |
| 294 | +} | |
| 295 | + | |
| 296 | +- (void)awakeFromNib { | |
| 297 | + [super awakeFromNib]; | |
| 298 | + [self setupUI]; | |
| 299 | + | |
| 300 | +} | |
| 301 | + | |
| 302 | +- (void)layoutSubviews { | |
| 303 | + [super layoutSubviews]; | |
| 304 | + | |
| 305 | + [self layoutUI]; | |
| 306 | +} | |
| 307 | + | |
| 308 | + | |
| 309 | +#pragma mark - ***setupUI*** | |
| 310 | +- (void)setupUI { | |
| 311 | + [self.contentView addSubview:self.agreementBtn]; | |
| 312 | + [self.contentView addSubview:self.agreementL]; | |
| 313 | + [self.contentView addSubview:self.commitBtn]; | |
| 314 | + | |
| 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]}]; | |
| 317 | + NSRange range = [contentStr rangeOfString:@"《中国网+内容安全协议》"]; | |
| 318 | + [string addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:11], NSForegroundColorAttributeName: [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]} range:range]; | |
| 319 | + _agreementL.attributedText = string; | |
| 320 | + | |
| 321 | +} | |
| 322 | + | |
| 323 | +#pragma mark - ***layoutUI*** | |
| 324 | +- (void)layoutUI { | |
| 325 | + | |
| 326 | + __weak typeof(self) weakSelf = self; | |
| 327 | + [self.agreementBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 328 | + make.left.equalTo(weakSelf.mas_left).offset((KScreenWidth - 250)/2); | |
| 329 | + make.top.equalTo(weakSelf.mas_top).offset(14); | |
| 330 | + make.width.mas_equalTo(30); | |
| 331 | + make.height.mas_equalTo(30); | |
| 332 | + }]; | |
| 333 | + | |
| 334 | + [self.agreementL mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 335 | + make.left.equalTo(weakSelf.agreementBtn.mas_right).offset(0); | |
| 336 | + make.centerY.equalTo(weakSelf.agreementBtn.mas_centerY).offset(0); | |
| 337 | + make.width.mas_equalTo(220); | |
| 338 | + make.height.mas_equalTo(11); | |
| 339 | + }]; | |
| 340 | + | |
| 341 | + [self.commitBtn mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 342 | + make.top.equalTo(weakSelf.agreementL.mas_bottom).offset(10); | |
| 343 | + make.centerX.equalTo(weakSelf.mas_centerX).offset(0); | |
| 344 | + make.width.mas_equalTo(245); | |
| 345 | + make.height.mas_equalTo(35); | |
| 346 | + | |
| 347 | + }]; | |
| 348 | +} | |
| 349 | + | |
| 350 | +#pragma mark - editUI | |
| 351 | + | |
| 352 | +#pragma mark - ***事件实现*** | |
| 353 | + | |
| 354 | + | |
| 355 | +#pragma mark - ***私有方法*** | |
| 356 | +#pragma mark - ***懒加载*** | |
| 357 | + | |
| 358 | +/*** 协议按钮 ***/ | |
| 359 | +- (UIButton *)agreementBtn { | |
| 360 | + | |
| 361 | + if (!_agreementBtn) { | |
| 362 | + _agreementBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 363 | + [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_ selected"] forState:UIControlStateNormal]; | |
| 364 | + [_agreementBtn setImage:[UIImage imageNamedFromOrganization:@"organization_ selected"] forState:UIControlStateSelected]; | |
| 365 | + } | |
| 366 | + return _agreementBtn; | |
| 367 | + | |
| 368 | +} | |
| 369 | + | |
| 370 | +/*** 协议题头 ***/ | |
| 371 | +- (UILabel *)agreementL { | |
| 372 | + | |
| 373 | + if (!_agreementL) { | |
| 374 | + _agreementL = [[UILabel alloc]init]; | |
| 375 | + _agreementL.userInteractionEnabled = YES; | |
| 376 | + } | |
| 377 | + return _agreementL; | |
| 378 | +} | |
| 379 | + | |
| 380 | +/*** 提交按钮 ***/ | |
| 381 | +- (UIButton *)commitBtn { | |
| 382 | + | |
| 383 | + if (!_commitBtn) { | |
| 384 | + _commitBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 385 | + [_commitBtn setBackgroundColor:RGBOF(0x4EABFD)]; | |
| 386 | + [_commitBtn setTitle:@"提交" forState:UIControlStateNormal]; | |
| 387 | + _commitBtn.titleLabel.textColor = [UIColor whiteColor]; | |
| 388 | + _commitBtn.layer.masksToBounds = YES; | |
| 389 | + _commitBtn.layer.cornerRadius = 17.5; | |
| 390 | + } | |
| 391 | + return _commitBtn; | |
| 392 | + | |
| 393 | +} | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | +@end | |
| 399 | + | ... | ... |
CNLiveOrganizationValidationModule/Classes/ReplaceMe.m deleted
100644 → 0
Example/CNLiveOrganizationValidationModule.xcodeproj/project.pbxproj
| ... | ... | @@ -62,7 +62,7 @@ |
| 62 | 62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; |
| 63 | 63 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
| 64 | 64 | 777556B55158A89D4A4E0FC7 /* Pods-CNLiveOrganizationValidationModule_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveOrganizationValidationModule_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example.debug.xcconfig"; sourceTree = "<group>"; }; |
| 65 | - 79F5BFC324D446B704820BEF /* CNLiveOrganizationValidationModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveOrganizationValidationModule.podspec; path = ../CNLiveOrganizationValidationModule.podspec; sourceTree = "<group>"; }; | |
| 65 | + 79F5BFC324D446B704820BEF /* CNLiveOrganizationValidationModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveOrganizationValidationModule.podspec; path = ../CNLiveOrganizationValidationModule.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; | |
| 66 | 66 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
| 67 | 67 | A38F6D673C6EA1CAA77FA7BE /* Pods-CNLiveOrganizationValidationModule_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveOrganizationValidationModule_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example.release.xcconfig"; sourceTree = "<group>"; }; |
| 68 | 68 | C78F557F33CBBE10626D6A66 /* Pods-CNLiveOrganizationValidationModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveOrganizationValidationModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveOrganizationValidationModule_Tests/Pods-CNLiveOrganizationValidationModule_Tests.release.xcconfig"; sourceTree = "<group>"; }; |
| ... | ... | @@ -207,7 +207,8 @@ |
| 207 | 207 | 6003F586195388D20070C39A /* Sources */, |
| 208 | 208 | 6003F587195388D20070C39A /* Frameworks */, |
| 209 | 209 | 6003F588195388D20070C39A /* Resources */, |
| 210 | - EE1F83B9A954D6D788617358 /* [CP] Embed Pods Frameworks */, | |
| 210 | + 8AB5314613589637C13635ED /* [CP] Embed Pods Frameworks */, | |
| 211 | + CDE1720359A4D3E8B6C14822 /* [CP] Copy Pods Resources */, | |
| 211 | 212 | ); |
| 212 | 213 | buildRules = ( |
| 213 | 214 | ); |
| ... | ... | @@ -342,24 +343,126 @@ |
| 342 | 343 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; |
| 343 | 344 | showEnvVarsInLog = 0; |
| 344 | 345 | }; |
| 345 | - EE1F83B9A954D6D788617358 /* [CP] Embed Pods Frameworks */ = { | |
| 346 | + 8AB5314613589637C13635ED /* [CP] Embed Pods Frameworks */ = { | |
| 346 | 347 | isa = PBXShellScriptBuildPhase; |
| 347 | 348 | buildActionMask = 2147483647; |
| 348 | 349 | files = ( |
| 349 | 350 | ); |
| 350 | 351 | inputPaths = ( |
| 351 | 352 | "${PODS_ROOT}/Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example-frameworks.sh", |
| 353 | + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", | |
| 354 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | |
| 355 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework", | |
| 356 | + "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework", | |
| 357 | + "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework", | |
| 358 | + "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework", | |
| 359 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | |
| 360 | + "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework", | |
| 361 | + "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", | |
| 362 | + "${BUILT_PRODUCTS_DIR}/CNLiveICloudPicker/CNLiveICloudPicker.framework", | |
| 363 | + "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework", | |
| 352 | 364 | "${BUILT_PRODUCTS_DIR}/CNLiveOrganizationValidationModule/CNLiveOrganizationValidationModule.framework", |
| 365 | + "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | |
| 366 | + "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", | |
| 367 | + "${BUILT_PRODUCTS_DIR}/CNLiveUploadManager/CNLiveUploadManager.framework", | |
| 368 | + "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", | |
| 369 | + "${BUILT_PRODUCTS_DIR}/CNLiveVoiceToTextKit/CNLiveVoiceToTextKit.framework", | |
| 370 | + "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", | |
| 371 | + "${BUILT_PRODUCTS_DIR}/GPUImage/GPUImage.framework", | |
| 372 | + "${BUILT_PRODUCTS_DIR}/HappyDNS/HappyDNS.framework", | |
| 373 | + "${BUILT_PRODUCTS_DIR}/Ks3SDK/Ks3SDK.framework", | |
| 374 | + "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", | |
| 375 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | |
| 376 | + "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", | |
| 377 | + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | |
| 378 | + "${BUILT_PRODUCTS_DIR}/PGDatePicker/PGDatePicker.framework", | |
| 379 | + "${BUILT_PRODUCTS_DIR}/PGPickerView/PGPickerView.framework", | |
| 380 | + "${PODS_ROOT}/PLPlayerKit/Pod/Library/PLPlayerKit.framework", | |
| 381 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | |
| 382 | + "${BUILT_PRODUCTS_DIR}/Qiniu/Qiniu.framework", | |
| 383 | + "${BUILT_PRODUCTS_DIR}/RSKImageCropper/RSKImageCropper.framework", | |
| 384 | + "${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework", | |
| 385 | + "${BUILT_PRODUCTS_DIR}/SDAutoLayout/SDAutoLayout.framework", | |
| 386 | + "${BUILT_PRODUCTS_DIR}/SDCycleScrollView/SDCycleScrollView.framework", | |
| 387 | + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | |
| 388 | + "${BUILT_PRODUCTS_DIR}/SGPagingView/SGPagingView.framework", | |
| 389 | + "${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework", | |
| 390 | + "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework", | |
| 391 | + "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework", | |
| 392 | + "${BUILT_PRODUCTS_DIR}/libksygpulive_ks3/libksygpulive.framework", | |
| 393 | + "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework", | |
| 353 | 394 | ); |
| 354 | 395 | name = "[CP] Embed Pods Frameworks"; |
| 355 | 396 | outputPaths = ( |
| 397 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", | |
| 398 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | |
| 399 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework", | |
| 400 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework", | |
| 401 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework", | |
| 402 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework", | |
| 403 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | |
| 404 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework", | |
| 405 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", | |
| 406 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveICloudPicker.framework", | |
| 407 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework", | |
| 356 | 408 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveOrganizationValidationModule.framework", |
| 409 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | |
| 410 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", | |
| 411 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUploadManager.framework", | |
| 412 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", | |
| 413 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveVoiceToTextKit.framework", | |
| 414 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", | |
| 415 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GPUImage.framework", | |
| 416 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HappyDNS.framework", | |
| 417 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Ks3SDK.framework", | |
| 418 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework", | |
| 419 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | |
| 420 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", | |
| 421 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | |
| 422 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PGDatePicker.framework", | |
| 423 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PGPickerView.framework", | |
| 424 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PLPlayerKit.framework", | |
| 425 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | |
| 426 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Qiniu.framework", | |
| 427 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RSKImageCropper.framework", | |
| 428 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework", | |
| 429 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDAutoLayout.framework", | |
| 430 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDCycleScrollView.framework", | |
| 431 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | |
| 432 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SGPagingView.framework", | |
| 433 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework", | |
| 434 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework", | |
| 435 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework", | |
| 436 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libksygpulive.framework", | |
| 437 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework", | |
| 357 | 438 | ); |
| 358 | 439 | runOnlyForDeploymentPostprocessing = 0; |
| 359 | 440 | shellPath = /bin/sh; |
| 360 | 441 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example-frameworks.sh\"\n"; |
| 361 | 442 | showEnvVarsInLog = 0; |
| 362 | 443 | }; |
| 444 | + CDE1720359A4D3E8B6C14822 /* [CP] Copy Pods Resources */ = { | |
| 445 | + isa = PBXShellScriptBuildPhase; | |
| 446 | + buildActionMask = 2147483647; | |
| 447 | + files = ( | |
| 448 | + ); | |
| 449 | + inputPaths = ( | |
| 450 | + "${PODS_ROOT}/Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example-resources.sh", | |
| 451 | + "${PODS_ROOT}/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle", | |
| 452 | + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveShareToolKit/CNLiveShareToolKit.bundle", | |
| 453 | + "${PODS_ROOT}/WeiboSDK/libWeiboSDK/WeiboSDK.bundle", | |
| 454 | + ); | |
| 455 | + name = "[CP] Copy Pods Resources"; | |
| 456 | + outputPaths = ( | |
| 457 | + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mapapi.bundle", | |
| 458 | + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveShareToolKit.bundle", | |
| 459 | + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WeiboSDK.bundle", | |
| 460 | + ); | |
| 461 | + runOnlyForDeploymentPostprocessing = 0; | |
| 462 | + shellPath = /bin/sh; | |
| 463 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveOrganizationValidationModule_Example/Pods-CNLiveOrganizationValidationModule_Example-resources.sh\"\n"; | |
| 464 | + showEnvVarsInLog = 0; | |
| 465 | + }; | |
| 363 | 466 | /* End PBXShellScriptBuildPhase section */ |
| 364 | 467 | |
| 365 | 468 | /* Begin PBXSourcesBuildPhase section */ | ... | ... |
Example/CNLiveOrganizationValidationModule/Base.lproj/Main.storyboard
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak"> | |
| 3 | - <device id="retina4_7" orientation="portrait"> | |
| 4 | - <adaptation id="fullscreen"/> | |
| 5 | - </device> | |
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="0XO-Q7-yxH"> | |
| 3 | + <device id="retina4_7" orientation="portrait" appearance="light"/> | |
| 6 | 4 | <dependencies> |
| 7 | 5 | <deployment identifier="iOS"/> |
| 8 | - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
| 6 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/> | |
| 9 | 7 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| 10 | 8 | </dependencies> |
| 11 | 9 | <scenes> |
| ... | ... | @@ -22,10 +20,27 @@ |
| 22 | 20 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
| 23 | 21 | <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
| 24 | 22 | </view> |
| 23 | + <navigationItem key="navigationItem" id="zFw-cX-PUk"/> | |
| 25 | 24 | </viewController> |
| 26 | 25 | <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/> |
| 27 | 26 | </objects> |
| 28 | 27 | <point key="canvasLocation" x="305" y="433"/> |
| 29 | 28 | </scene> |
| 29 | + <!--Navigation Controller--> | |
| 30 | + <scene sceneID="FjW-Zi-UO0"> | |
| 31 | + <objects> | |
| 32 | + <navigationController id="0XO-Q7-yxH" sceneMemberID="viewController"> | |
| 33 | + <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="ezs-eV-gQK"> | |
| 34 | + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> | |
| 35 | + <autoresizingMask key="autoresizingMask"/> | |
| 36 | + </navigationBar> | |
| 37 | + <connections> | |
| 38 | + <segue destination="whP-gf-Uak" kind="relationship" relationship="rootViewController" id="7FI-MA-PeZ"/> | |
| 39 | + </connections> | |
| 40 | + </navigationController> | |
| 41 | + <placeholder placeholderIdentifier="IBFirstResponder" id="awo-Qq-Lj8" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | |
| 42 | + </objects> | |
| 43 | + <point key="canvasLocation" x="-518" y="432"/> | |
| 44 | + </scene> | |
| 30 | 45 | </scenes> |
| 31 | 46 | </document> | ... | ... |
Example/CNLiveOrganizationValidationModule/CNLIVEBViewController.m
| ... | ... | @@ -7,9 +7,12 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import "CNLIVEBViewController.h" |
| 10 | +#import "UIColor+MLPFlatColors.h" | |
| 11 | +#import "CNLiveBOrganizationValidattionController.h" | |
| 10 | 12 | |
| 11 | 13 | @interface CNLIVEBViewController () |
| 12 | 14 | |
| 15 | + | |
| 13 | 16 | @end |
| 14 | 17 | |
| 15 | 18 | @implementation CNLIVEBViewController |
| ... | ... | @@ -18,8 +21,23 @@ |
| 18 | 21 | { |
| 19 | 22 | [super viewDidLoad]; |
| 20 | 23 | // Do any additional setup after loading the view, typically from a nib. |
| 24 | + | |
| 25 | + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 26 | + [self.view addSubview:button]; | |
| 27 | + button.frame = CGRectMake(100, 100, 100, 100); | |
| 28 | + [button setBackgroundColor:UIColorFromRGB(0x000000)]; | |
| 29 | + [button addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; | |
| 30 | +} | |
| 31 | + | |
| 32 | +- (void)buttonAction:(UIButton *)button { | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + CNLiveBOrganizationValidattionController *vc = [[CNLiveBOrganizationValidattionController alloc]init]; | |
| 37 | + [self.navigationController pushViewController:vc animated:YES]; | |
| 21 | 38 | } |
| 22 | 39 | |
| 40 | + | |
| 23 | 41 | - (void)didReceiveMemoryWarning |
| 24 | 42 | { |
| 25 | 43 | [super didReceiveMemoryWarning]; | ... | ... |
Example/Podfile
| 1 | 1 | use_frameworks! |
| 2 | +source 'https://github.com/CocoaPods/Specs.git' | |
| 3 | +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' | |
| 2 | 4 | |
| 3 | -platform :ios, '8.0' | |
| 5 | +platform :ios, '9.0' | |
| 4 | 6 | |
| 5 | 7 | target 'CNLiveOrganizationValidationModule_Example' do |
| 6 | 8 | pod 'CNLiveOrganizationValidationModule', :path => '../' |
| 9 | + | |
| 10 | + #依赖三方私有库,如果里面有.a的时候加上这个 | |
| 11 | + pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} | |
| 12 | + end | |
| 7 | 13 | |
| 8 | 14 | target 'CNLiveOrganizationValidationModule_Tests' do |
| 9 | 15 | inherit! :search_paths | ... | ... |