Commit bcea0f0a3c0abdb83bc23bf0da87a0cdba3b4d8d

Authored by yinqiaojuan
1 parent 1b642251

0.0.1

Showing 54 changed files with 4737 additions and 0 deletions

Too many changes to show.

To preserve performance only 54 of 183 files are displayed.

CNLiveDisease.podspec 0 → 100644
  1 +
  2 +Pod::Spec.new do |s|
  3 + s.name = 'CNLiveDisease'
  4 + s.version = '0.0.1'
  5 + s.summary = '智慧农业部分组件化'
  6 +
  7 +# This description is used to generate tags and improve search results.
  8 +# * Think: What does it do? Why did you write it? What is the focus?
  9 +# * Try to keep it short, snappy and to the point.
  10 +# * Write the description between the DESC delimiters below.
  11 +# * Finally, don't worry about the indent, CocoaPods strips it!
  12 +
  13 + s.description = <<-DESC
  14 +TODO: Add long description of the pod here.
  15 + DESC
  16 +
  17 + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease'
  18 + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  19 + s.license = { :type => 'MIT', :file => 'LICENSE' }
  20 + s.author = { '殷巧娟' => '1427945373@qq.com' }
  21 + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease.git', :tag => s.version.to_s }
  22 + # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
  23 +
  24 + s.ios.deployment_target = '9.0'
  25 +
  26 + s.source_files = 'CNLiveDisease/Classes/**/*'
  27 +
  28 + # s.resource_bundles = {
  29 + # 'CNLiveDisease' => ['CNLiveDisease/Assets/*.png']
  30 + # }
  31 +
  32 + # s.public_header_files = 'Pod/Classes/**/*.h'
  33 + s.frameworks = 'UIKit', 'Foundation'
  34 + s.dependency 'CNLiveBaseKit'
  35 + s.dependency 'Masonry'
  36 +
  37 +end
... ...
CNLiveDisease/Assets/.gitkeep 0 → 100644
CNLiveDisease/Classes/View/CNDiseaseType.h 0 → 100644
  1 +//
  2 +// CNDiseaseType.h
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2019/1/3.
  6 +// Copyright © 2019年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +NS_ASSUME_NONNULL_BEGIN
  12 +
  13 +@interface CNDiseaseType : NSObject
  14 + + (NSString *)showType:(NSString *)titleName;
  15 +@end
  16 +
  17 +NS_ASSUME_NONNULL_END
... ...
CNLiveDisease/Classes/View/CNDiseaseType.m 0 → 100644
  1 +//
  2 +// CNDiseaseType.m
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2019/1/3.
  6 +// Copyright © 2019年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNDiseaseType.h"
  10 +
  11 +@implementation CNDiseaseType
  12 + + (NSString *)showType:(NSString *)titleName {
  13 + NSString *type ;
  14 + if ([titleName isEqualToString:@"苹果"]) {
  15 + type = @"1";
  16 + }else if ([titleName isEqualToString:@"樱桃"]){
  17 + type = @"3";
  18 + }else if ([titleName isEqualToString:@"葡萄"]) {
  19 + type = @"5";
  20 + }else if ([titleName isEqualToString:@"桃子"]) {
  21 + type = @"6";
  22 + }else if ([titleName isEqualToString:@"梨"]) {
  23 + type = @"7";
  24 + }else if ([titleName isEqualToString:@"枣"]) {
  25 + type = @"8";
  26 + }else if ([titleName isEqualToString:@"李子"]) {
  27 + type = @"9";
  28 + }else if ([titleName isEqualToString:@"杏子"]) {
  29 + type = @"10";
  30 + }else if ([titleName isEqualToString:@"柿子"]) {
  31 + type = @"11";
  32 + }else if ([titleName isEqualToString:@"无花果"]) {
  33 + type = @"12";
  34 + }else if ([titleName isEqualToString:@"猕猴桃"]) {
  35 + type = @"13";
  36 + }else if ([titleName isEqualToString:@"山楂"]) {
  37 + type = @"14";
  38 + }else if ([titleName isEqualToString:@"板栗"]) {
  39 + type = @"15";
  40 + }else if ([titleName isEqualToString:@"核桃"]) {
  41 + type = @"16";
  42 + }else if ([titleName isEqualToString:@"石榴"]) {
  43 + type = @"17";
  44 + }else if ([titleName isEqualToString:@"蓝莓"]) {
  45 + type = @"18";
  46 + }else if ([titleName isEqualToString:@"油桃"]) {
  47 + type = @"19";
  48 + }else {
  49 + type = @"开发中";
  50 + }
  51 + return type;
  52 +}
  53 +@end
... ...
CNLiveDisease/Classes/View/CNDiseaseViewCell.h 0 → 100644
  1 +//
  2 +// CNDiseaseViewCell.h
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2018/12/29.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +NS_ASSUME_NONNULL_BEGIN
  12 +
  13 +@interface CNDiseaseViewCell : UICollectionViewCell
  14 +@property (nonatomic, strong) UIImageView *showImageV;
  15 +@property (nonatomic, strong) UILabel *titleLabel;
  16 +@end
  17 +
  18 +NS_ASSUME_NONNULL_END
... ...
CNLiveDisease/Classes/View/CNDiseaseViewCell.m 0 → 100644
  1 +//
  2 +// CNDiseaseViewCell.m
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2018/12/29.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNDiseaseViewCell.h"
  10 +#import <Masonry/Masonry.h>
  11 +#import <CNLiveBaseKit/UIView+Extension.h>
  12 +#define MJWeakSelf __weak typeof(self) weakSelf = self;
  13 +#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
  14 +@implementation CNDiseaseViewCell
  15 +-(instancetype)initWithFrame:(CGRect)frame {
  16 + self = [super initWithFrame:frame];
  17 + if (self) {
  18 + [self setUpViews];
  19 + }
  20 + return self;
  21 +}
  22 +-(void)setUpViews {
  23 + [self.contentView addSubview:self.showImageV];
  24 + [self.showImageV addSubview:self.titleLabel];
  25 + [self setUpLayout];
  26 +}
  27 +-(void)setUpLayout {
  28 + MJWeakSelf;
  29 + [_showImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  30 + make.left.right.top.bottom.mas_equalTo(weakSelf.contentView);
  31 + }];
  32 + [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  33 + make.left.mas_equalTo(weakSelf.mas_left).offset(10);
  34 + make.width.mas_equalTo(60);
  35 + make.bottom.mas_equalTo(weakSelf.showImageV.mas_bottom).offset(-10);
  36 + make.height.mas_equalTo(14);
  37 + }];
  38 +}
  39 +-(UIImageView *)showImageV {
  40 + if (!_showImageV) {
  41 + _showImageV = [[UIImageView alloc]init];
  42 + _showImageV.contentMode = UIViewContentModeScaleAspectFit;
  43 + _showImageV.clipsToBounds = YES;
  44 + }
  45 + return _showImageV;
  46 +}
  47 +-(UILabel *)titleLabel {
  48 + if (!_titleLabel) {
  49 + _titleLabel = [[UILabel alloc]init];
  50 + _titleLabel.textColor = RGBA(255, 255, 255, 1);
  51 + _titleLabel.font = [UIFont systemFontOfSize:15.0f];
  52 + _titleLabel.textAlignment = NSTextAlignmentLeft;
  53 + }
  54 + return _titleLabel;
  55 +}
  56 +@end
... ...
CNLiveDisease/Classes/View/CNLiveDiseaseSegment.h 0 → 100644
  1 +//
  2 +// CNLiveDiseaseSegment.h
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2019/1/8.
  6 +// Copyright © 2019年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +NS_ASSUME_NONNULL_BEGIN
  12 +@protocol CNLiveDiseaseSegmentDelegate <NSObject>
  13 +@optional
  14 +/**
  15 + * 选择了某个选项的回调
  16 + */
  17 +- (void)haveSelectedIndex:(NSInteger )index;
  18 +
  19 +@end
  20 +
  21 +@interface CNLiveDiseaseSegment : UIView
  22 +/**
  23 + * 数据源
  24 + */
  25 +@property (nonatomic, strong) NSArray * dataArr;
  26 +/**
  27 + * 标签文字颜色_未选中时
  28 + */
  29 +@property (nonatomic, strong) UIColor * tagTextColor_normal;
  30 +/**
  31 + * 标签文字颜色_选中时
  32 + */
  33 +@property (nonatomic, strong) UIColor * tagTextColor_selected;
  34 +/**
  35 + * 标签文字颜色_未选中时
  36 + */
  37 +@property (nonatomic, assign)CGFloat tagTextFont_normal;
  38 +/**
  39 + * 标签文字颜色_选中时
  40 + */
  41 +@property (nonatomic, assign)CGFloat tagTextFont_selected;
  42 +/**
  43 + * 滑块颜色
  44 + */
  45 +@property (nonatomic, strong)UIColor *sliderColor;
  46 +/**
  47 + * 滑块宽度
  48 + */
  49 +@property (nonatomic, assign)CGFloat sliderW;
  50 +/**
  51 + * 滑块高度
  52 + */
  53 +@property (nonatomic, assign)CGFloat sliderH;
  54 +/**
  55 + * delegate
  56 + */
  57 +@property (nonatomic, assign)id<CNLiveDiseaseSegmentDelegate> delegate;
  58 +
  59 +/**
  60 + * 选择某一个标签
  61 + */
  62 +- (void)selectingOneTagWithIndex:(NSInteger )index;
  63 +
  64 +@end
  65 +
  66 +NS_ASSUME_NONNULL_END
... ...
CNLiveDisease/Classes/View/CNLiveDiseaseSegment.m 0 → 100644
  1 +//
  2 +// CNLiveDiseaseSegment.m
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 殷巧娟 on 2019/1/8.
  6 +// Copyright © 2019年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveDiseaseSegment.h"
  10 +#import <CNLiveBaseKit/UIView+Extension.h>
  11 +#define MJWeakSelf __weak typeof(self) weakSelf = self;
  12 +#define DefaultTagTextColor_normal [UIColor blackColor]
  13 +#define DefaultTagTextColor_selected [UIColor redColor]
  14 +#define DefaultTagTextFont_normal 15
  15 +#define DefaultTagTextFont_selected 22
  16 +#define DefaultSliderColor [UIColor redColor]
  17 +#define DefaultSliderH 1
  18 +#define DefaultSliderW 60
  19 +
  20 +@interface CNLiveDiseaseSegment ()
  21 +@property (nonatomic, strong) NSMutableArray * buttonsArray;
  22 +@property (nonatomic, strong) UIView * sliderView;
  23 +@end
  24 +@implementation CNLiveDiseaseSegment
  25 +
  26 +-(instancetype)initWithFrame:(CGRect)frame{
  27 + self = [super initWithFrame:frame];
  28 + if (self) {
  29 + self.frame = frame;
  30 + self.backgroundColor = [UIColor whiteColor];
  31 + _buttonsArray = [[NSMutableArray alloc] init];
  32 +
  33 + //默认
  34 + _tagTextColor_normal = DefaultTagTextColor_normal;
  35 + _tagTextColor_selected = DefaultTagTextColor_selected;
  36 + _tagTextFont_normal = DefaultTagTextFont_normal;
  37 + _tagTextFont_selected = DefaultTagTextFont_selected;
  38 + _sliderColor = DefaultSliderColor;
  39 + _sliderH = DefaultSliderH;
  40 + _sliderW = DefaultSliderW;
  41 +
  42 + }
  43 + return self;
  44 +}
  45 +
  46 +- (void)createUI
  47 +{
  48 + [self.buttonsArray removeAllObjects];
  49 + float width = self.width / _dataArr.count;
  50 + for (int i = 0 ; i < _dataArr.count ; i++) {
  51 + UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(i * width, 0, width, self.height)];
  52 + button.tag = 1000+i;
  53 + button.backgroundColor = [UIColor whiteColor];
  54 + [button setTitle:[_dataArr objectAtIndex:i] forState:UIControlStateNormal];
  55 + [button setTitleColor:self.tagTextColor_normal forState:UIControlStateNormal];
  56 + [button setTitleColor:self.tagTextColor_selected forState:UIControlStateSelected];
  57 + button.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_normal];
  58 + button.titleLabel.textAlignment = NSTextAlignmentCenter;
  59 + [button addTarget:self action:@selector(tagBtnClick:) forControlEvents:UIControlEventTouchUpInside];
  60 + //默认第一个选中
  61 + if (i == 0) {
  62 + button.selected = YES;
  63 + button.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_selected];
  64 + }
  65 + [self.buttonsArray addObject:button];
  66 + [self addSubview:button];
  67 + }
  68 +
  69 + self.sliderView = [[UIView alloc] initWithFrame:CGRectMake(0, self.height-self.sliderH, self.sliderW, self.sliderH)];
  70 + self.sliderView.backgroundColor = self.sliderColor;
  71 + self.sliderView.centerX = width/2;
  72 + [self addSubview:self.sliderView];
  73 +
  74 +}
  75 +
  76 +- (void)tagBtnClick:(UIButton *)btn
  77 +{
  78 + MJWeakSelf;
  79 + [UIView animateWithDuration:0.2 animations:^{
  80 + weakSelf.sliderView.centerX = btn.centerX;
  81 +
  82 + }];
  83 + for (UIButton *subButton in self.buttonsArray) {
  84 + subButton.selected = NO;
  85 + subButton.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_normal];
  86 + }
  87 + btn.selected = YES;
  88 + btn.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_selected];
  89 + self.sliderView.width = btn.titleLabel.text.length * btn.titleLabel.font.pointSize + 12;
  90 +
  91 + if ([self.delegate respondsToSelector:@selector(haveSelectedIndex:)]) {
  92 + [self.delegate haveSelectedIndex:btn.tag -1000];
  93 + }
  94 +}
  95 +
  96 +- (void)selectingOneTagWithIndex:(NSInteger)index
  97 +{
  98 + NSInteger s_btnTagIndex = index+1000;
  99 + for (UIButton *subButton in self.buttonsArray) {
  100 + if (s_btnTagIndex != subButton.tag) {
  101 + subButton.selected = NO;
  102 + subButton.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_normal];
  103 + subButton.backgroundColor = [UIColor whiteColor];
  104 + }
  105 + else{
  106 + subButton.selected = YES;
  107 + subButton.titleLabel.font = [UIFont systemFontOfSize:self.tagTextFont_selected];
  108 + self.sliderView.width = subButton.titleLabel.text.length * subButton.titleLabel.font.pointSize + 12;
  109 + self.sliderView.centerX = subButton.centerX;
  110 + }
  111 + }
  112 +
  113 +}
  114 +
  115 +- (void)setDataArr:(NSArray *)dataArr
  116 +{
  117 + if (_dataArr != dataArr) {
  118 + _dataArr = dataArr;
  119 + [self createUI];
  120 + }
  121 +}
  122 +- (void)setTagTextColor_normal:(UIColor *)tagTextColor_normal
  123 +{
  124 + if (_tagTextColor_normal != tagTextColor_normal) {
  125 + for (UIButton *subButton in self.buttonsArray){
  126 + [subButton setTitleColor:tagTextColor_normal forState:UIControlStateNormal];
  127 + }
  128 + _tagTextColor_normal = tagTextColor_normal;
  129 + }
  130 +}
  131 +- (void)setTagTextColor_selected:(UIColor *)tagTextColor_selected
  132 +{
  133 + if (_tagTextColor_selected != tagTextColor_selected) {
  134 + for (UIButton *subButton in self.buttonsArray){
  135 + [subButton setTitleColor:tagTextColor_selected forState:UIControlStateSelected];
  136 + }
  137 + _tagTextColor_selected = tagTextColor_selected;
  138 + }
  139 +}
  140 +- (void)setTagTextFont_normal:(CGFloat)tagTextFont_normal
  141 +{
  142 + if (_tagTextFont_normal != tagTextFont_normal) {
  143 + for (UIButton *subButton in self.buttonsArray){
  144 + if (subButton.selected == NO) {
  145 + subButton.titleLabel.font = [UIFont systemFontOfSize:tagTextFont_normal] ;
  146 + }
  147 + }
  148 + _tagTextFont_normal = tagTextFont_normal;
  149 + }
  150 +}
  151 +- (void)setTagTextFont_selected:(CGFloat)tagTextFont_selected
  152 +{
  153 + if (_tagTextFont_selected != tagTextFont_selected) {
  154 + for (UIButton *subButton in self.buttonsArray){
  155 + if (subButton.selected == YES) {
  156 + subButton.titleLabel.font = [UIFont systemFontOfSize:tagTextFont_selected] ;
  157 + }
  158 + }
  159 + _tagTextFont_selected = tagTextFont_selected;
  160 + }
  161 +}
  162 +- (void)setSliderColor:(UIColor *)sliderColor
  163 +{
  164 + if (_sliderColor != sliderColor) {
  165 + self.sliderView.backgroundColor = sliderColor;
  166 + _sliderColor = sliderColor;
  167 + }
  168 +}
  169 +- (void)setSliderW:(CGFloat)sliderW
  170 +{
  171 + if (_sliderW != sliderW) {
  172 + self.sliderView.width = sliderW;
  173 + _sliderW = sliderW;
  174 + }
  175 +}
  176 +- (void)setSliderH:(CGFloat)sliderH
  177 +{
  178 + if (_sliderH != sliderH) {
  179 + self.sliderView.height = sliderH;
  180 + self.sliderView.y = self.height-self.sliderView.height;
  181 + for (UIButton *subButton in self.buttonsArray){
  182 + if (subButton.selected == YES) {
  183 + self.sliderView.centerX = subButton.centerX;
  184 + }
  185 + }
  186 + _sliderH = sliderH;
  187 + }
  188 +}
  189 +
  190 +@end
... ...
Example/CNLiveDisease.xcodeproj/project.pbxproj 0 → 100644
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  11 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
  12 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  13 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; };
  14 + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; };
  15 + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */; };
  16 + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLiveViewController.m */; };
  17 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; };
  18 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
  19 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
  20 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
  21 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
  22 + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; };
  23 + 6688D555FB07D0C041E22FF3 /* Pods_CNLiveDisease_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9FCE2A4201EA005ABD9A1B6 /* Pods_CNLiveDisease_Tests.framework */; };
  24 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
  25 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
  26 + 971659BC5525542B82148625 /* Pods_CNLiveDisease_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FA7F2BD8AA53739AED3B2D2 /* Pods_CNLiveDisease_Example.framework */; };
  27 +/* End PBXBuildFile section */
  28 +
  29 +/* Begin PBXContainerItemProxy section */
  30 + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = {
  31 + isa = PBXContainerItemProxy;
  32 + containerPortal = 6003F582195388D10070C39A /* Project object */;
  33 + proxyType = 1;
  34 + remoteGlobalIDString = 6003F589195388D20070C39A;
  35 + remoteInfo = CNLiveDisease;
  36 + };
  37 +/* End PBXContainerItemProxy section */
  38 +
  39 +/* Begin PBXFileReference section */
  40 + 3135B2DA9FBD67028809E402 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
  41 + 56A0B7C14E86A6BDEA97C3F7 /* Pods-CNLiveDisease_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDisease_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests.release.xcconfig"; sourceTree = "<group>"; };
  42 + 6003F58A195388D20070C39A /* CNLiveDisease_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveDisease_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
  43 + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
  44 + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
  45 + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
  46 + 6003F595195388D20070C39A /* CNLiveDisease-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLiveDisease-Info.plist"; sourceTree = "<group>"; };
  47 + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  48 + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  49 + 6003F59B195388D20070C39A /* CNLiveDisease-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveDisease-Prefix.pch"; sourceTree = "<group>"; };
  50 + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveAppDelegate.h; sourceTree = "<group>"; };
  51 + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveAppDelegate.m; sourceTree = "<group>"; };
  52 + 6003F5A5195388D20070C39A /* CNLiveViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; };
  53 + 6003F5A6195388D20070C39A /* CNLiveViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; };
  54 + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
  55 + 6003F5AE195388D20070C39A /* CNLiveDisease_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveDisease_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
  56 + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
  57 + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
  58 + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
  59 + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
  60 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; };
  61 + 648D02BDF591001BE30AFF80 /* Pods-CNLiveDisease_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDisease_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example.release.xcconfig"; sourceTree = "<group>"; };
  62 + 6A6E27CA09053B08B84C3D38 /* CNLiveDisease.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveDisease.podspec; path = ../CNLiveDisease.podspec; sourceTree = "<group>"; };
  63 + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  64 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  65 + 8FA7F2BD8AA53739AED3B2D2 /* Pods_CNLiveDisease_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveDisease_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  66 + C32548F22ECDA15445E99025 /* Pods-CNLiveDisease_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDisease_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example.debug.xcconfig"; sourceTree = "<group>"; };
  67 + D36D00917A1B966628A94A9E /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
  68 + F9FCE2A4201EA005ABD9A1B6 /* Pods_CNLiveDisease_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveDisease_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
  69 + FA3C1E4B44554116FA3A8D82 /* Pods-CNLiveDisease_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveDisease_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests.debug.xcconfig"; sourceTree = "<group>"; };
  70 +/* End PBXFileReference section */
  71 +
  72 +/* Begin PBXFrameworksBuildPhase section */
  73 + 6003F587195388D20070C39A /* Frameworks */ = {
  74 + isa = PBXFrameworksBuildPhase;
  75 + buildActionMask = 2147483647;
  76 + files = (
  77 + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
  78 + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
  79 + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
  80 + 971659BC5525542B82148625 /* Pods_CNLiveDisease_Example.framework in Frameworks */,
  81 + );
  82 + runOnlyForDeploymentPostprocessing = 0;
  83 + };
  84 + 6003F5AB195388D20070C39A /* Frameworks */ = {
  85 + isa = PBXFrameworksBuildPhase;
  86 + buildActionMask = 2147483647;
  87 + files = (
  88 + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
  89 + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
  90 + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
  91 + 6688D555FB07D0C041E22FF3 /* Pods_CNLiveDisease_Tests.framework in Frameworks */,
  92 + );
  93 + runOnlyForDeploymentPostprocessing = 0;
  94 + };
  95 +/* End PBXFrameworksBuildPhase section */
  96 +
  97 +/* Begin PBXGroup section */
  98 + 6003F581195388D10070C39A = {
  99 + isa = PBXGroup;
  100 + children = (
  101 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
  102 + 6003F593195388D20070C39A /* Example for CNLiveDisease */,
  103 + 6003F5B5195388D20070C39A /* Tests */,
  104 + 6003F58C195388D20070C39A /* Frameworks */,
  105 + 6003F58B195388D20070C39A /* Products */,
  106 + A58449BC77B780AF9820AD1A /* Pods */,
  107 + );
  108 + sourceTree = "<group>";
  109 + };
  110 + 6003F58B195388D20070C39A /* Products */ = {
  111 + isa = PBXGroup;
  112 + children = (
  113 + 6003F58A195388D20070C39A /* CNLiveDisease_Example.app */,
  114 + 6003F5AE195388D20070C39A /* CNLiveDisease_Tests.xctest */,
  115 + );
  116 + name = Products;
  117 + sourceTree = "<group>";
  118 + };
  119 + 6003F58C195388D20070C39A /* Frameworks */ = {
  120 + isa = PBXGroup;
  121 + children = (
  122 + 6003F58D195388D20070C39A /* Foundation.framework */,
  123 + 6003F58F195388D20070C39A /* CoreGraphics.framework */,
  124 + 6003F591195388D20070C39A /* UIKit.framework */,
  125 + 6003F5AF195388D20070C39A /* XCTest.framework */,
  126 + 8FA7F2BD8AA53739AED3B2D2 /* Pods_CNLiveDisease_Example.framework */,
  127 + F9FCE2A4201EA005ABD9A1B6 /* Pods_CNLiveDisease_Tests.framework */,
  128 + );
  129 + name = Frameworks;
  130 + sourceTree = "<group>";
  131 + };
  132 + 6003F593195388D20070C39A /* Example for CNLiveDisease */ = {
  133 + isa = PBXGroup;
  134 + children = (
  135 + 6003F59C195388D20070C39A /* CNLiveAppDelegate.h */,
  136 + 6003F59D195388D20070C39A /* CNLiveAppDelegate.m */,
  137 + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */,
  138 + 6003F5A5195388D20070C39A /* CNLiveViewController.h */,
  139 + 6003F5A6195388D20070C39A /* CNLiveViewController.m */,
  140 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */,
  141 + 6003F5A8195388D20070C39A /* Images.xcassets */,
  142 + 6003F594195388D20070C39A /* Supporting Files */,
  143 + );
  144 + name = "Example for CNLiveDisease";
  145 + path = CNLiveDisease;
  146 + sourceTree = "<group>";
  147 + };
  148 + 6003F594195388D20070C39A /* Supporting Files */ = {
  149 + isa = PBXGroup;
  150 + children = (
  151 + 6003F595195388D20070C39A /* CNLiveDisease-Info.plist */,
  152 + 6003F596195388D20070C39A /* InfoPlist.strings */,
  153 + 6003F599195388D20070C39A /* main.m */,
  154 + 6003F59B195388D20070C39A /* CNLiveDisease-Prefix.pch */,
  155 + );
  156 + name = "Supporting Files";
  157 + sourceTree = "<group>";
  158 + };
  159 + 6003F5B5195388D20070C39A /* Tests */ = {
  160 + isa = PBXGroup;
  161 + children = (
  162 + 6003F5BB195388D20070C39A /* Tests.m */,
  163 + 6003F5B6195388D20070C39A /* Supporting Files */,
  164 + );
  165 + path = Tests;
  166 + sourceTree = "<group>";
  167 + };
  168 + 6003F5B6195388D20070C39A /* Supporting Files */ = {
  169 + isa = PBXGroup;
  170 + children = (
  171 + 6003F5B7195388D20070C39A /* Tests-Info.plist */,
  172 + 6003F5B8195388D20070C39A /* InfoPlist.strings */,
  173 + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */,
  174 + );
  175 + name = "Supporting Files";
  176 + sourceTree = "<group>";
  177 + };
  178 + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = {
  179 + isa = PBXGroup;
  180 + children = (
  181 + 6A6E27CA09053B08B84C3D38 /* CNLiveDisease.podspec */,
  182 + D36D00917A1B966628A94A9E /* README.md */,
  183 + 3135B2DA9FBD67028809E402 /* LICENSE */,
  184 + );
  185 + name = "Podspec Metadata";
  186 + sourceTree = "<group>";
  187 + };
  188 + A58449BC77B780AF9820AD1A /* Pods */ = {
  189 + isa = PBXGroup;
  190 + children = (
  191 + C32548F22ECDA15445E99025 /* Pods-CNLiveDisease_Example.debug.xcconfig */,
  192 + 648D02BDF591001BE30AFF80 /* Pods-CNLiveDisease_Example.release.xcconfig */,
  193 + FA3C1E4B44554116FA3A8D82 /* Pods-CNLiveDisease_Tests.debug.xcconfig */,
  194 + 56A0B7C14E86A6BDEA97C3F7 /* Pods-CNLiveDisease_Tests.release.xcconfig */,
  195 + );
  196 + name = Pods;
  197 + sourceTree = "<group>";
  198 + };
  199 +/* End PBXGroup section */
  200 +
  201 +/* Begin PBXNativeTarget section */
  202 + 6003F589195388D20070C39A /* CNLiveDisease_Example */ = {
  203 + isa = PBXNativeTarget;
  204 + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveDisease_Example" */;
  205 + buildPhases = (
  206 + 951AC9A58C99B29E4D78D574 /* [CP] Check Pods Manifest.lock */,
  207 + 6003F586195388D20070C39A /* Sources */,
  208 + 6003F587195388D20070C39A /* Frameworks */,
  209 + 6003F588195388D20070C39A /* Resources */,
  210 + 10F702BA576037937EC8B0A0 /* [CP] Embed Pods Frameworks */,
  211 + );
  212 + buildRules = (
  213 + );
  214 + dependencies = (
  215 + );
  216 + name = CNLiveDisease_Example;
  217 + productName = CNLiveDisease;
  218 + productReference = 6003F58A195388D20070C39A /* CNLiveDisease_Example.app */;
  219 + productType = "com.apple.product-type.application";
  220 + };
  221 + 6003F5AD195388D20070C39A /* CNLiveDisease_Tests */ = {
  222 + isa = PBXNativeTarget;
  223 + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveDisease_Tests" */;
  224 + buildPhases = (
  225 + 9AB9C0957480C110601421EA /* [CP] Check Pods Manifest.lock */,
  226 + 6003F5AA195388D20070C39A /* Sources */,
  227 + 6003F5AB195388D20070C39A /* Frameworks */,
  228 + 6003F5AC195388D20070C39A /* Resources */,
  229 + 5F7B713DF00F7F6AF1D4BCC9 /* [CP] Embed Pods Frameworks */,
  230 + );
  231 + buildRules = (
  232 + );
  233 + dependencies = (
  234 + 6003F5B4195388D20070C39A /* PBXTargetDependency */,
  235 + );
  236 + name = CNLiveDisease_Tests;
  237 + productName = CNLiveDiseaseTests;
  238 + productReference = 6003F5AE195388D20070C39A /* CNLiveDisease_Tests.xctest */;
  239 + productType = "com.apple.product-type.bundle.unit-test";
  240 + };
  241 +/* End PBXNativeTarget section */
  242 +
  243 +/* Begin PBXProject section */
  244 + 6003F582195388D10070C39A /* Project object */ = {
  245 + isa = PBXProject;
  246 + attributes = {
  247 + CLASSPREFIX = CNLive;
  248 + LastUpgradeCheck = 0720;
  249 + ORGANIZATIONNAME = "殷巧娟";
  250 + TargetAttributes = {
  251 + 6003F589195388D20070C39A = {
  252 + DevelopmentTeam = 94X49GG3ZW;
  253 + };
  254 + 6003F5AD195388D20070C39A = {
  255 + TestTargetID = 6003F589195388D20070C39A;
  256 + };
  257 + };
  258 + };
  259 + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveDisease" */;
  260 + compatibilityVersion = "Xcode 3.2";
  261 + developmentRegion = English;
  262 + hasScannedForEncodings = 0;
  263 + knownRegions = (
  264 + en,
  265 + Base,
  266 + );
  267 + mainGroup = 6003F581195388D10070C39A;
  268 + productRefGroup = 6003F58B195388D20070C39A /* Products */;
  269 + projectDirPath = "";
  270 + projectRoot = "";
  271 + targets = (
  272 + 6003F589195388D20070C39A /* CNLiveDisease_Example */,
  273 + 6003F5AD195388D20070C39A /* CNLiveDisease_Tests */,
  274 + );
  275 + };
  276 +/* End PBXProject section */
  277 +
  278 +/* Begin PBXResourcesBuildPhase section */
  279 + 6003F588195388D20070C39A /* Resources */ = {
  280 + isa = PBXResourcesBuildPhase;
  281 + buildActionMask = 2147483647;
  282 + files = (
  283 + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */,
  284 + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */,
  285 + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */,
  286 + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */,
  287 + );
  288 + runOnlyForDeploymentPostprocessing = 0;
  289 + };
  290 + 6003F5AC195388D20070C39A /* Resources */ = {
  291 + isa = PBXResourcesBuildPhase;
  292 + buildActionMask = 2147483647;
  293 + files = (
  294 + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */,
  295 + );
  296 + runOnlyForDeploymentPostprocessing = 0;
  297 + };
  298 +/* End PBXResourcesBuildPhase section */
  299 +
  300 +/* Begin PBXShellScriptBuildPhase section */
  301 + 10F702BA576037937EC8B0A0 /* [CP] Embed Pods Frameworks */ = {
  302 + isa = PBXShellScriptBuildPhase;
  303 + buildActionMask = 2147483647;
  304 + files = (
  305 + );
  306 + inputFileListPaths = (
  307 + );
  308 + inputPaths = (
  309 + "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example-frameworks.sh",
  310 + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
  311 + "${BUILT_PRODUCTS_DIR}/CNLiveDisease/CNLiveDisease.framework",
  312 + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
  313 + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
  314 + );
  315 + name = "[CP] Embed Pods Frameworks";
  316 + outputFileListPaths = (
  317 + );
  318 + outputPaths = (
  319 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
  320 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveDisease.framework",
  321 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
  322 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
  323 + );
  324 + runOnlyForDeploymentPostprocessing = 0;
  325 + shellPath = /bin/sh;
  326 + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example-frameworks.sh\"\n";
  327 + showEnvVarsInLog = 0;
  328 + };
  329 + 5F7B713DF00F7F6AF1D4BCC9 /* [CP] Embed Pods Frameworks */ = {
  330 + isa = PBXShellScriptBuildPhase;
  331 + buildActionMask = 2147483647;
  332 + files = (
  333 + );
  334 + inputFileListPaths = (
  335 + );
  336 + inputPaths = (
  337 + "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests-frameworks.sh",
  338 + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
  339 + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
  340 + "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
  341 + );
  342 + name = "[CP] Embed Pods Frameworks";
  343 + outputFileListPaths = (
  344 + );
  345 + outputPaths = (
  346 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
  347 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
  348 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
  349 + );
  350 + runOnlyForDeploymentPostprocessing = 0;
  351 + shellPath = /bin/sh;
  352 + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests-frameworks.sh\"\n";
  353 + showEnvVarsInLog = 0;
  354 + };
  355 + 951AC9A58C99B29E4D78D574 /* [CP] Check Pods Manifest.lock */ = {
  356 + isa = PBXShellScriptBuildPhase;
  357 + buildActionMask = 2147483647;
  358 + files = (
  359 + );
  360 + inputFileListPaths = (
  361 + );
  362 + inputPaths = (
  363 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  364 + "${PODS_ROOT}/Manifest.lock",
  365 + );
  366 + name = "[CP] Check Pods Manifest.lock";
  367 + outputFileListPaths = (
  368 + );
  369 + outputPaths = (
  370 + "$(DERIVED_FILE_DIR)/Pods-CNLiveDisease_Example-checkManifestLockResult.txt",
  371 + );
  372 + runOnlyForDeploymentPostprocessing = 0;
  373 + shellPath = /bin/sh;
  374 + 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";
  375 + showEnvVarsInLog = 0;
  376 + };
  377 + 9AB9C0957480C110601421EA /* [CP] Check Pods Manifest.lock */ = {
  378 + isa = PBXShellScriptBuildPhase;
  379 + buildActionMask = 2147483647;
  380 + files = (
  381 + );
  382 + inputFileListPaths = (
  383 + );
  384 + inputPaths = (
  385 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  386 + "${PODS_ROOT}/Manifest.lock",
  387 + );
  388 + name = "[CP] Check Pods Manifest.lock";
  389 + outputFileListPaths = (
  390 + );
  391 + outputPaths = (
  392 + "$(DERIVED_FILE_DIR)/Pods-CNLiveDisease_Tests-checkManifestLockResult.txt",
  393 + );
  394 + runOnlyForDeploymentPostprocessing = 0;
  395 + shellPath = /bin/sh;
  396 + 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";
  397 + showEnvVarsInLog = 0;
  398 + };
  399 +/* End PBXShellScriptBuildPhase section */
  400 +
  401 +/* Begin PBXSourcesBuildPhase section */
  402 + 6003F586195388D20070C39A /* Sources */ = {
  403 + isa = PBXSourcesBuildPhase;
  404 + buildActionMask = 2147483647;
  405 + files = (
  406 + 6003F59E195388D20070C39A /* CNLiveAppDelegate.m in Sources */,
  407 + 6003F5A7195388D20070C39A /* CNLiveViewController.m in Sources */,
  408 + 6003F59A195388D20070C39A /* main.m in Sources */,
  409 + );
  410 + runOnlyForDeploymentPostprocessing = 0;
  411 + };
  412 + 6003F5AA195388D20070C39A /* Sources */ = {
  413 + isa = PBXSourcesBuildPhase;
  414 + buildActionMask = 2147483647;
  415 + files = (
  416 + 6003F5BC195388D20070C39A /* Tests.m in Sources */,
  417 + );
  418 + runOnlyForDeploymentPostprocessing = 0;
  419 + };
  420 +/* End PBXSourcesBuildPhase section */
  421 +
  422 +/* Begin PBXTargetDependency section */
  423 + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = {
  424 + isa = PBXTargetDependency;
  425 + target = 6003F589195388D20070C39A /* CNLiveDisease_Example */;
  426 + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
  427 + };
  428 +/* End PBXTargetDependency section */
  429 +
  430 +/* Begin PBXVariantGroup section */
  431 + 6003F596195388D20070C39A /* InfoPlist.strings */ = {
  432 + isa = PBXVariantGroup;
  433 + children = (
  434 + 6003F597195388D20070C39A /* en */,
  435 + );
  436 + name = InfoPlist.strings;
  437 + sourceTree = "<group>";
  438 + };
  439 + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = {
  440 + isa = PBXVariantGroup;
  441 + children = (
  442 + 6003F5B9195388D20070C39A /* en */,
  443 + );
  444 + name = InfoPlist.strings;
  445 + sourceTree = "<group>";
  446 + };
  447 + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = {
  448 + isa = PBXVariantGroup;
  449 + children = (
  450 + 71719F9E1E33DC2100824A3D /* Base */,
  451 + );
  452 + name = LaunchScreen.storyboard;
  453 + sourceTree = "<group>";
  454 + };
  455 +/* End PBXVariantGroup section */
  456 +
  457 +/* Begin XCBuildConfiguration section */
  458 + 6003F5BD195388D20070C39A /* Debug */ = {
  459 + isa = XCBuildConfiguration;
  460 + buildSettings = {
  461 + ALWAYS_SEARCH_USER_PATHS = NO;
  462 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  463 + CLANG_CXX_LIBRARY = "libc++";
  464 + CLANG_ENABLE_MODULES = YES;
  465 + CLANG_ENABLE_OBJC_ARC = YES;
  466 + CLANG_WARN_BOOL_CONVERSION = YES;
  467 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  468 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  469 + CLANG_WARN_EMPTY_BODY = YES;
  470 + CLANG_WARN_ENUM_CONVERSION = YES;
  471 + CLANG_WARN_INT_CONVERSION = YES;
  472 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  473 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  474 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  475 + COPY_PHASE_STRIP = NO;
  476 + ENABLE_TESTABILITY = YES;
  477 + GCC_C_LANGUAGE_STANDARD = gnu99;
  478 + GCC_DYNAMIC_NO_PIC = NO;
  479 + GCC_OPTIMIZATION_LEVEL = 0;
  480 + GCC_PREPROCESSOR_DEFINITIONS = (
  481 + "DEBUG=1",
  482 + "$(inherited)",
  483 + );
  484 + GCC_SYMBOLS_PRIVATE_EXTERN = NO;
  485 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  486 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  487 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  488 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  489 + GCC_WARN_UNUSED_FUNCTION = YES;
  490 + GCC_WARN_UNUSED_VARIABLE = YES;
  491 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  492 + ONLY_ACTIVE_ARCH = YES;
  493 + SDKROOT = iphoneos;
  494 + TARGETED_DEVICE_FAMILY = "1,2";
  495 + };
  496 + name = Debug;
  497 + };
  498 + 6003F5BE195388D20070C39A /* Release */ = {
  499 + isa = XCBuildConfiguration;
  500 + buildSettings = {
  501 + ALWAYS_SEARCH_USER_PATHS = NO;
  502 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  503 + CLANG_CXX_LIBRARY = "libc++";
  504 + CLANG_ENABLE_MODULES = YES;
  505 + CLANG_ENABLE_OBJC_ARC = YES;
  506 + CLANG_WARN_BOOL_CONVERSION = YES;
  507 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  508 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  509 + CLANG_WARN_EMPTY_BODY = YES;
  510 + CLANG_WARN_ENUM_CONVERSION = YES;
  511 + CLANG_WARN_INT_CONVERSION = YES;
  512 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  513 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  514 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  515 + COPY_PHASE_STRIP = YES;
  516 + ENABLE_NS_ASSERTIONS = NO;
  517 + GCC_C_LANGUAGE_STANDARD = gnu99;
  518 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  519 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  520 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  521 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  522 + GCC_WARN_UNUSED_FUNCTION = YES;
  523 + GCC_WARN_UNUSED_VARIABLE = YES;
  524 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  525 + SDKROOT = iphoneos;
  526 + TARGETED_DEVICE_FAMILY = "1,2";
  527 + VALIDATE_PRODUCT = YES;
  528 + };
  529 + name = Release;
  530 + };
  531 + 6003F5C0195388D20070C39A /* Debug */ = {
  532 + isa = XCBuildConfiguration;
  533 + baseConfigurationReference = C32548F22ECDA15445E99025 /* Pods-CNLiveDisease_Example.debug.xcconfig */;
  534 + buildSettings = {
  535 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  536 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  537 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  538 + GCC_PREFIX_HEADER = "CNLiveDisease/CNLiveDisease-Prefix.pch";
  539 + INFOPLIST_FILE = "CNLiveDisease/CNLiveDisease-Info.plist";
  540 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  541 + MODULE_NAME = ExampleApp;
  542 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  543 + PRODUCT_NAME = "$(TARGET_NAME)";
  544 + WRAPPER_EXTENSION = app;
  545 + };
  546 + name = Debug;
  547 + };
  548 + 6003F5C1195388D20070C39A /* Release */ = {
  549 + isa = XCBuildConfiguration;
  550 + baseConfigurationReference = 648D02BDF591001BE30AFF80 /* Pods-CNLiveDisease_Example.release.xcconfig */;
  551 + buildSettings = {
  552 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  553 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  554 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  555 + GCC_PREFIX_HEADER = "CNLiveDisease/CNLiveDisease-Prefix.pch";
  556 + INFOPLIST_FILE = "CNLiveDisease/CNLiveDisease-Info.plist";
  557 + IPHONEOS_DEPLOYMENT_TARGET = 9.3;
  558 + MODULE_NAME = ExampleApp;
  559 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  560 + PRODUCT_NAME = "$(TARGET_NAME)";
  561 + WRAPPER_EXTENSION = app;
  562 + };
  563 + name = Release;
  564 + };
  565 + 6003F5C3195388D20070C39A /* Debug */ = {
  566 + isa = XCBuildConfiguration;
  567 + baseConfigurationReference = FA3C1E4B44554116FA3A8D82 /* Pods-CNLiveDisease_Tests.debug.xcconfig */;
  568 + buildSettings = {
  569 + BUNDLE_LOADER = "$(TEST_HOST)";
  570 + FRAMEWORK_SEARCH_PATHS = (
  571 + "$(SDKROOT)/Developer/Library/Frameworks",
  572 + "$(inherited)",
  573 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  574 + );
  575 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  576 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  577 + GCC_PREPROCESSOR_DEFINITIONS = (
  578 + "DEBUG=1",
  579 + "$(inherited)",
  580 + );
  581 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  582 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  583 + PRODUCT_NAME = "$(TARGET_NAME)";
  584 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveDisease_Example.app/CNLiveDisease_Example";
  585 + WRAPPER_EXTENSION = xctest;
  586 + };
  587 + name = Debug;
  588 + };
  589 + 6003F5C4195388D20070C39A /* Release */ = {
  590 + isa = XCBuildConfiguration;
  591 + baseConfigurationReference = 56A0B7C14E86A6BDEA97C3F7 /* Pods-CNLiveDisease_Tests.release.xcconfig */;
  592 + buildSettings = {
  593 + BUNDLE_LOADER = "$(TEST_HOST)";
  594 + FRAMEWORK_SEARCH_PATHS = (
  595 + "$(SDKROOT)/Developer/Library/Frameworks",
  596 + "$(inherited)",
  597 + "$(DEVELOPER_FRAMEWORKS_DIR)",
  598 + );
  599 + GCC_PRECOMPILE_PREFIX_HEADER = YES;
  600 + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch";
  601 + INFOPLIST_FILE = "Tests/Tests-Info.plist";
  602 + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
  603 + PRODUCT_NAME = "$(TARGET_NAME)";
  604 + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveDisease_Example.app/CNLiveDisease_Example";
  605 + WRAPPER_EXTENSION = xctest;
  606 + };
  607 + name = Release;
  608 + };
  609 +/* End XCBuildConfiguration section */
  610 +
  611 +/* Begin XCConfigurationList section */
  612 + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveDisease" */ = {
  613 + isa = XCConfigurationList;
  614 + buildConfigurations = (
  615 + 6003F5BD195388D20070C39A /* Debug */,
  616 + 6003F5BE195388D20070C39A /* Release */,
  617 + );
  618 + defaultConfigurationIsVisible = 0;
  619 + defaultConfigurationName = Release;
  620 + };
  621 + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveDisease_Example" */ = {
  622 + isa = XCConfigurationList;
  623 + buildConfigurations = (
  624 + 6003F5C0195388D20070C39A /* Debug */,
  625 + 6003F5C1195388D20070C39A /* Release */,
  626 + );
  627 + defaultConfigurationIsVisible = 0;
  628 + defaultConfigurationName = Release;
  629 + };
  630 + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveDisease_Tests" */ = {
  631 + isa = XCConfigurationList;
  632 + buildConfigurations = (
  633 + 6003F5C3195388D20070C39A /* Debug */,
  634 + 6003F5C4195388D20070C39A /* Release */,
  635 + );
  636 + defaultConfigurationIsVisible = 0;
  637 + defaultConfigurationName = Release;
  638 + };
  639 +/* End XCConfigurationList section */
  640 + };
  641 + rootObject = 6003F582195388D10070C39A /* Project object */;
  642 +}
... ...
Example/CNLiveDisease.xcodeproj/project.xcworkspace/contents.xcworkspacedata 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "self:CNLiveDisease.xcodeproj">
  6 + </FileRef>
  7 +</Workspace>
... ...
Example/CNLiveDisease.xcodeproj/xcshareddata/xcschemes/CNLiveDisease-Example.xcscheme 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0720"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "6003F589195388D20070C39A"
  18 + BuildableName = "CNLiveDisease_Example.app"
  19 + BlueprintName = "CNLiveDisease_Example"
  20 + ReferencedContainer = "container:CNLiveDisease.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + shouldUseLaunchSchemeArgsEnv = "YES">
  30 + <Testables>
  31 + <TestableReference
  32 + skipped = "NO">
  33 + <BuildableReference
  34 + BuildableIdentifier = "primary"
  35 + BlueprintIdentifier = "6003F5AD195388D20070C39A"
  36 + BuildableName = "CNLiveDisease_Tests.xctest"
  37 + BlueprintName = "CNLiveDisease_Tests"
  38 + ReferencedContainer = "container:CNLiveDisease.xcodeproj">
  39 + </BuildableReference>
  40 + </TestableReference>
  41 + </Testables>
  42 + <MacroExpansion>
  43 + <BuildableReference
  44 + BuildableIdentifier = "primary"
  45 + BlueprintIdentifier = "6003F589195388D20070C39A"
  46 + BuildableName = "CNLiveDisease_Example.app"
  47 + BlueprintName = "CNLiveDisease_Example"
  48 + ReferencedContainer = "container:CNLiveDisease.xcodeproj">
  49 + </BuildableReference>
  50 + </MacroExpansion>
  51 + <AdditionalOptions>
  52 + </AdditionalOptions>
  53 + </TestAction>
  54 + <LaunchAction
  55 + buildConfiguration = "Debug"
  56 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  57 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  58 + launchStyle = "0"
  59 + useCustomWorkingDirectory = "NO"
  60 + ignoresPersistentStateOnLaunch = "NO"
  61 + debugDocumentVersioning = "YES"
  62 + debugServiceExtension = "internal"
  63 + allowLocationSimulation = "YES">
  64 + <BuildableProductRunnable
  65 + runnableDebuggingMode = "0">
  66 + <BuildableReference
  67 + BuildableIdentifier = "primary"
  68 + BlueprintIdentifier = "6003F589195388D20070C39A"
  69 + BuildableName = "CNLiveDisease_Example.app"
  70 + BlueprintName = "CNLiveDisease_Example"
  71 + ReferencedContainer = "container:CNLiveDisease.xcodeproj">
  72 + </BuildableReference>
  73 + </BuildableProductRunnable>
  74 + <AdditionalOptions>
  75 + </AdditionalOptions>
  76 + </LaunchAction>
  77 + <ProfileAction
  78 + buildConfiguration = "Release"
  79 + shouldUseLaunchSchemeArgsEnv = "YES"
  80 + savedToolIdentifier = ""
  81 + useCustomWorkingDirectory = "NO"
  82 + debugDocumentVersioning = "YES">
  83 + <BuildableProductRunnable
  84 + runnableDebuggingMode = "0">
  85 + <BuildableReference
  86 + BuildableIdentifier = "primary"
  87 + BlueprintIdentifier = "6003F589195388D20070C39A"
  88 + BuildableName = "CNLiveDisease_Example.app"
  89 + BlueprintName = "CNLiveDisease_Example"
  90 + ReferencedContainer = "container:CNLiveDisease.xcodeproj">
  91 + </BuildableReference>
  92 + </BuildableProductRunnable>
  93 + </ProfileAction>
  94 + <AnalyzeAction
  95 + buildConfiguration = "Debug">
  96 + </AnalyzeAction>
  97 + <ArchiveAction
  98 + buildConfiguration = "Release"
  99 + revealArchiveInOrganizer = "YES">
  100 + </ArchiveAction>
  101 +</Scheme>
... ...
Example/CNLiveDisease.xcworkspace/contents.xcworkspacedata 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:CNLiveDisease.xcodeproj">
  6 + </FileRef>
  7 + <FileRef
  8 + location = "group:Pods/Pods.xcodeproj">
  9 + </FileRef>
  10 +</Workspace>
... ...
Example/CNLiveDisease.xcworkspace/xcshareddata/IDEWorkspaceChecks.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>IDEDidComputeMac32BitWarning</key>
  6 + <true/>
  7 +</dict>
  8 +</plist>
... ...
Example/CNLiveDisease.xcworkspace/xcuserdata/yinqiaojuan.xcuserdatad/UserInterfaceState.xcuserstate 0 → 100644
No preview for this file type
Example/CNLiveDisease/Base.lproj/LaunchScreen.storyboard 0 → 100644
  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" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
  3 + <device id="retina4_7" orientation="portrait">
  4 + <adaptation id="fullscreen"/>
  5 + </device>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="EHf-IW-A2E">
  14 + <objects>
  15 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
  18 + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="53" y="375"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
... ...
Example/CNLiveDisease/Base.lproj/Main.storyboard 0 → 100644
  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>
  6 + <dependencies>
  7 + <deployment identifier="iOS"/>
  8 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
  9 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  10 + </dependencies>
  11 + <scenes>
  12 + <!--View Controller-->
  13 + <scene sceneID="wQg-tq-qST">
  14 + <objects>
  15 + <viewController id="whP-gf-Uak" customClass="CNLiveViewController" sceneMemberID="viewController">
  16 + <layoutGuides>
  17 + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/>
  18 + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/>
  19 + </layoutGuides>
  20 + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1">
  21 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  22 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  23 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  24 + </view>
  25 + </viewController>
  26 + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
  27 + </objects>
  28 + <point key="canvasLocation" x="305" y="433"/>
  29 + </scene>
  30 + </scenes>
  31 +</document>
... ...
Example/CNLiveDisease/CNLiveAppDelegate.h 0 → 100644
  1 +//
  2 +// CNLiveAppDelegate.h
  3 +// CNLiveDisease
  4 +//
  5 +// Created by 殷巧娟 on 01/22/2019.
  6 +// Copyright (c) 2019 殷巧娟. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +
  11 +@interface CNLiveAppDelegate : UIResponder <UIApplicationDelegate>
  12 +
  13 +@property (strong, nonatomic) UIWindow *window;
  14 +
  15 +@end
... ...
Example/CNLiveDisease/CNLiveAppDelegate.m 0 → 100644
  1 +//
  2 +// CNLiveAppDelegate.m
  3 +// CNLiveDisease
  4 +//
  5 +// Created by 殷巧娟 on 01/22/2019.
  6 +// Copyright (c) 2019 殷巧娟. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveAppDelegate.h"
  10 +
  11 +@implementation CNLiveAppDelegate
  12 +
  13 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  14 +{
  15 + // Override point for customization after application launch.
  16 + return YES;
  17 +}
  18 +
  19 +- (void)applicationWillResignActive:(UIApplication *)application
  20 +{
  21 + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
  22 + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
  23 +}
  24 +
  25 +- (void)applicationDidEnterBackground:(UIApplication *)application
  26 +{
  27 + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  28 + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  29 +}
  30 +
  31 +- (void)applicationWillEnterForeground:(UIApplication *)application
  32 +{
  33 + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
  34 +}
  35 +
  36 +- (void)applicationDidBecomeActive:(UIApplication *)application
  37 +{
  38 + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  39 +}
  40 +
  41 +- (void)applicationWillTerminate:(UIApplication *)application
  42 +{
  43 + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  44 +}
  45 +
  46 +@end
... ...
Example/CNLiveDisease/CNLiveDisease-Info.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>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleDisplayName</key>
  8 + <string>${PRODUCT_NAME}</string>
  9 + <key>CFBundleExecutable</key>
  10 + <string>${EXECUTABLE_NAME}</string>
  11 + <key>CFBundleIdentifier</key>
  12 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  13 + <key>CFBundleInfoDictionaryVersion</key>
  14 + <string>6.0</string>
  15 + <key>CFBundleName</key>
  16 + <string>${PRODUCT_NAME}</string>
  17 + <key>CFBundlePackageType</key>
  18 + <string>APPL</string>
  19 + <key>CFBundleShortVersionString</key>
  20 + <string>1.0</string>
  21 + <key>CFBundleSignature</key>
  22 + <string>????</string>
  23 + <key>CFBundleVersion</key>
  24 + <string>1.0</string>
  25 + <key>LSRequiresIPhoneOS</key>
  26 + <true/>
  27 + <key>UILaunchStoryboardName</key>
  28 + <string>LaunchScreen</string>
  29 + <key>UIMainStoryboardFile</key>
  30 + <string>Main</string>
  31 + <key>UIRequiredDeviceCapabilities</key>
  32 + <array>
  33 + <string>armv7</string>
  34 + </array>
  35 + <key>UISupportedInterfaceOrientations</key>
  36 + <array>
  37 + <string>UIInterfaceOrientationPortrait</string>
  38 + <string>UIInterfaceOrientationLandscapeLeft</string>
  39 + <string>UIInterfaceOrientationLandscapeRight</string>
  40 + </array>
  41 + <key>UISupportedInterfaceOrientations~ipad</key>
  42 + <array>
  43 + <string>UIInterfaceOrientationPortrait</string>
  44 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  45 + <string>UIInterfaceOrientationLandscapeLeft</string>
  46 + <string>UIInterfaceOrientationLandscapeRight</string>
  47 + </array>
  48 +</dict>
  49 +</plist>
... ...
Example/CNLiveDisease/CNLiveDisease-Prefix.pch 0 → 100644
  1 +//
  2 +// Prefix header
  3 +//
  4 +// The contents of this file are implicitly included at the beginning of every source file.
  5 +//
  6 +
  7 +#import <Availability.h>
  8 +
  9 +#ifndef __IPHONE_5_0
  10 +#warning "This project uses features only available in iOS SDK 5.0 and later."
  11 +#endif
  12 +
  13 +#ifdef __OBJC__
  14 + @import UIKit;
  15 + @import Foundation;
  16 +#endif
... ...
Example/CNLiveDisease/CNLiveViewController.h 0 → 100644
  1 +//
  2 +// CNLiveViewController.h
  3 +// CNLiveDisease
  4 +//
  5 +// Created by 殷巧娟 on 01/22/2019.
  6 +// Copyright (c) 2019 殷巧娟. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +
  11 +@interface CNLiveViewController : UIViewController
  12 +
  13 +@end
... ...
Example/CNLiveDisease/CNLiveViewController.m 0 → 100644
  1 +//
  2 +// CNLiveViewController.m
  3 +// CNLiveDisease
  4 +//
  5 +// Created by 殷巧娟 on 01/22/2019.
  6 +// Copyright (c) 2019 殷巧娟. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveViewController.h"
  10 +
  11 +@interface CNLiveViewController ()
  12 +
  13 +@end
  14 +
  15 +@implementation CNLiveViewController
  16 +
  17 +- (void)viewDidLoad
  18 +{
  19 + [super viewDidLoad];
  20 + // Do any additional setup after loading the view, typically from a nib.
  21 +}
  22 +
  23 +- (void)didReceiveMemoryWarning
  24 +{
  25 + [super didReceiveMemoryWarning];
  26 + // Dispose of any resources that can be recreated.
  27 +}
  28 +
  29 +@end
... ...
Example/CNLiveDisease/Images.xcassets/AppIcon.appiconset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "iphone",
  5 + "size" : "20x20",
  6 + "scale" : "2x"
  7 + },
  8 + {
  9 + "idiom" : "iphone",
  10 + "size" : "20x20",
  11 + "scale" : "3x"
  12 + },
  13 + {
  14 + "idiom" : "iphone",
  15 + "size" : "29x29",
  16 + "scale" : "2x"
  17 + },
  18 + {
  19 + "idiom" : "iphone",
  20 + "size" : "29x29",
  21 + "scale" : "3x"
  22 + },
  23 + {
  24 + "idiom" : "iphone",
  25 + "size" : "40x40",
  26 + "scale" : "2x"
  27 + },
  28 + {
  29 + "idiom" : "iphone",
  30 + "size" : "40x40",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "idiom" : "iphone",
  35 + "size" : "60x60",
  36 + "scale" : "2x"
  37 + },
  38 + {
  39 + "idiom" : "iphone",
  40 + "size" : "60x60",
  41 + "scale" : "3x"
  42 + },
  43 + {
  44 + "idiom" : "ipad",
  45 + "size" : "20x20",
  46 + "scale" : "1x"
  47 + },
  48 + {
  49 + "idiom" : "ipad",
  50 + "size" : "20x20",
  51 + "scale" : "2x"
  52 + },
  53 + {
  54 + "idiom" : "ipad",
  55 + "size" : "29x29",
  56 + "scale" : "1x"
  57 + },
  58 + {
  59 + "idiom" : "ipad",
  60 + "size" : "29x29",
  61 + "scale" : "2x"
  62 + },
  63 + {
  64 + "idiom" : "ipad",
  65 + "size" : "40x40",
  66 + "scale" : "1x"
  67 + },
  68 + {
  69 + "idiom" : "ipad",
  70 + "size" : "40x40",
  71 + "scale" : "2x"
  72 + },
  73 + {
  74 + "idiom" : "ipad",
  75 + "size" : "76x76",
  76 + "scale" : "1x"
  77 + },
  78 + {
  79 + "idiom" : "ipad",
  80 + "size" : "76x76",
  81 + "scale" : "2x"
  82 + },
  83 + {
  84 + "idiom" : "ipad",
  85 + "size" : "83.5x83.5",
  86 + "scale" : "2x"
  87 + },
  88 + {
  89 + "idiom" : "ios-marketing",
  90 + "size" : "1024x1024",
  91 + "scale" : "1x"
  92 + }
  93 + ],
  94 + "info" : {
  95 + "version" : 1,
  96 + "author" : "xcode"
  97 + }
  98 +}
... ...
Example/CNLiveDisease/en.lproj/InfoPlist.strings 0 → 100644
  1 +/* Localized versions of Info.plist keys */
  2 +
... ...
Example/CNLiveDisease/main.m 0 → 100644
  1 +//
  2 +// main.m
  3 +// CNLiveDisease
  4 +//
  5 +// Created by 殷巧娟 on 01/22/2019.
  6 +// Copyright (c) 2019 殷巧娟. All rights reserved.
  7 +//
  8 +
  9 +@import UIKit;
  10 +#import "CNLiveAppDelegate.h"
  11 +
  12 +int main(int argc, char * argv[])
  13 +{
  14 + @autoreleasepool {
  15 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLiveAppDelegate class]));
  16 + }
  17 +}
... ...
Example/Podfile 0 → 100644
  1 +
  2 +source 'https://github.com/CocoaPods/Specs.git'
  3 +source ‘http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git’
  4 +use_frameworks!
  5 +
  6 +platform :ios, '9.0'
  7 +
  8 +target 'CNLiveDisease_Example' do
  9 + pod 'CNLiveDisease', :path => '../'
  10 + pod 'CNLiveBaseKit'
  11 + pod 'Masonry'
  12 + target 'CNLiveDisease_Tests' do
  13 + inherit! :search_paths
  14 + pod 'CNLiveBaseKit'
  15 + pod 'Masonry'
  16 +
  17 + end
  18 +end
... ...
Example/Podfile.lock 0 → 100644
  1 +PODS:
  2 + - CNLiveBaseKit (0.1.8):
  3 + - MJExtension (~> 3.0.15.1)
  4 + - CNLiveDisease (0.0.1):
  5 + - CNLiveBaseKit
  6 + - Masonry
  7 + - Masonry (1.1.0)
  8 + - MJExtension (3.0.15.1)
  9 +
  10 +DEPENDENCIES:
  11 + - CNLiveBaseKit
  12 + - CNLiveDisease (from `../`)
  13 + - Masonry
  14 +
  15 +SPEC REPOS:
  16 + http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git:
  17 + - CNLiveBaseKit
  18 + https://github.com/cocoapods/specs.git:
  19 + - Masonry
  20 + - MJExtension
  21 +
  22 +EXTERNAL SOURCES:
  23 + CNLiveDisease:
  24 + :path: "../"
  25 +
  26 +SPEC CHECKSUMS:
  27 + CNLiveBaseKit: 09a97c3411a91270fb68bfe20a1df2cdbcd2c524
  28 + CNLiveDisease: ea9486a67e106c6aff065cb6e81092ef6a8ddba9
  29 + Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
  30 + MJExtension: 19bc33ce2eee2d319760f5622562cf581a6ff756
  31 +
  32 +PODFILE CHECKSUM: 8e704e4e7be40355507f03b6c84a09edbde2e3d1
  33 +
  34 +COCOAPODS: 1.5.3
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/BaseModel/BaseModel.h 0 → 100644
  1 +//
  2 +// BaseModel.h
  3 +// ZXBaseProject
  4 +//
  5 +// Created by 张旭 on 2017/1/10.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface BaseModel : NSObject
  12 +
  13 +/** 字典初始化模型 dic -> model */
  14 ++ (id _Nullable)modelWithDic:(NSDictionary <NSString * , id>*_Nullable)dic;
  15 +
  16 +/**
  17 + 子类重写
  18 + */
  19 +- (void)loadModel; // init时调用
  20 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/BaseModel/BaseModel.m 0 → 100644
  1 +//
  2 +// BaseModel.m
  3 +// ZXBaseProject
  4 +//
  5 +// Created by 张旭 on 2017/1/10.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "BaseModel.h"
  10 +#import <MJExtension/MJExtension.h>
  11 +
  12 +@implementation BaseModel
  13 +
  14 +/** 字典初始化模型 dic -> models */
  15 ++ (id _Nullable)modelWithDic:(NSDictionary <NSString * , id>*_Nullable)dic
  16 +{
  17 + return [[[self alloc] init] mj_setKeyValues:dic];
  18 +}
  19 +
  20 +- (instancetype)init
  21 +{
  22 + if (self = [super init]) {
  23 + [self loadModel];
  24 + }
  25 + return self;
  26 +}
  27 +
  28 +- (void)loadModel {}
  29 +
  30 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/IOSDeviceSetting/IOSDeviceConfig.h 0 → 100644
  1 +//
  2 +// IOSDeviceConfig.h
  3 +// CommonLibrary
  4 +//
  5 +// Created by AlexiChen on 13-1-11.
  6 +// Copyright (c) 2013年 AlexiChen. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface IOSDeviceConfig : NSObject
  12 +
  13 +// 固有属性
  14 +@property (nonatomic, readonly) BOOL isIPad;
  15 +
  16 +@property (nonatomic, readonly) BOOL isIPhone;
  17 +
  18 +@property (nonatomic, readonly) BOOL isIPhone4;
  19 +
  20 +@property (nonatomic, readonly) BOOL isIPhone5;
  21 +
  22 +@property (nonatomic, readonly) BOOL isIOS7;
  23 +
  24 +@property (nonatomic, readonly) BOOL isIOS6;
  25 +
  26 +@property (nonatomic, readonly) BOOL isIOS6Later;
  27 +
  28 +@property (nonatomic, readonly) BOOL isIOS7Later;
  29 +
  30 +// 全局设置
  31 +@property (nonatomic, readonly) BOOL isPortrait;
  32 +
  33 ++ (IOSDeviceConfig *)sharedConfig;
  34 +
  35 +
  36 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/IOSDeviceSetting/IOSDeviceConfig.m 0 → 100644
  1 +
  2 +//
  3 +// IOSDeviceConfig.m
  4 +// CommonLibrary
  5 +//
  6 +// Created by AlexiChen on 13-1-11.
  7 +// Copyright (c) 2013年 AlexiChen. All rights reserved.
  8 +//
  9 +
  10 +#import "IOSDeviceConfig.h"
  11 +#import "IOSDeviceMacro.h"
  12 +
  13 +
  14 +@implementation IOSDeviceConfig
  15 +
  16 +static IOSDeviceConfig *_sharedConfig = nil;
  17 +
  18 +
  19 +@synthesize isIPad = _isIPad;
  20 +@synthesize isIPhone = _isIPhone;
  21 +@synthesize isIPhone4 = _isIPhone4;
  22 +@synthesize isIPhone5 = _isIPhone5;
  23 +@synthesize isIOS7 = _isIOS7;
  24 +@synthesize isIOS6 = _isIOS6;
  25 +@synthesize isIOS6Later = _isIOS6Later;
  26 +
  27 ++ (IOSDeviceConfig *)sharedConfig
  28 +{
  29 + @synchronized(_sharedConfig)
  30 + {
  31 + if (_sharedConfig == nil) {
  32 + _sharedConfig = [[IOSDeviceConfig alloc] init];
  33 + }
  34 + return _sharedConfig;
  35 + }
  36 +}
  37 +
  38 +- (void)dealloc
  39 +{
  40 +
  41 +}
  42 +
  43 +
  44 +- (id)init
  45 +{
  46 + if (self = [super init])
  47 + {
  48 + _isIPad = isIPad();
  49 + _isIPhone = isIPhone();
  50 + _isIPhone4 = isIPhone4();
  51 + _isIPhone5 = isIPhone5();
  52 + _isIOS7 = isIOS7();
  53 + _isIOS6 = isIOS6();
  54 + _isIOS6Later = [[UIDevice currentDevice].systemVersion doubleValue]>= 7.0;
  55 + _isIOS7Later = [[UIDevice currentDevice].systemVersion doubleValue]>= 8.0;
  56 + }
  57 + return self;
  58 +}
  59 +
  60 +- (BOOL)isPortrait
  61 +{
  62 + return UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation);
  63 +}
  64 +
  65 +
  66 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/IOSDeviceSetting/IOSDeviceMacro.h 0 → 100644
  1 +//
  2 +// IOSDeviceMacro.h
  3 +// CommonLibrary
  4 +//
  5 +// Created by Alexi on 13-10-23.
  6 +// Copyright (c) 2013年 ywchen. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CommonLibrary_IOSDeviceMacro_h
  10 +#define CommonLibrary_IOSDeviceMacro_h
  11 +
  12 +
  13 +#pragma mark -
  14 +#pragma mark iOS 4 Version Checkers
  15 +
  16 +#define isIPad() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  17 +#define isIPhone() (!isIPad())
  18 +
  19 +#define isIPhone5() ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
  20 +#define isIPhone4() ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
  21 +
  22 +#define isIOS7() ([[UIDevice currentDevice].systemVersion doubleValue]>= 7.0 && [[UIDevice currentDevice].systemVersion doubleValue] < 8.0)
  23 +
  24 +#define isIOS6() ([[UIDevice currentDevice].systemVersion doubleValue]>= 6.0 && [[UIDevice currentDevice].systemVersion doubleValue] < 7.0)
  25 +
  26 +
  27 +
  28 +#endif
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/CNLiveDefinesHeader.h 0 → 100644
  1 +//
  2 +// CNLiveDefinesHeader.h
  3 +// CNLiveCommonCategory
  4 +//
  5 +// Created by 张旭 on 2018/9/26.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CNLiveDefinesHeader_h
  10 +#define CNLiveDefinesHeader_h
  11 +#import <UIKit/UIKit.h>
  12 +#import <Foundation/Foundation.h>
  13 +#import "ColorHeaders.h"
  14 +//#import "CNLiveARCCompile.h" 暂时用不到
  15 +
  16 +////////////////////////////////////////////////////////
  17 +//////////// Color
  18 +////////////////////////////////////////////////////////
  19 +// 默认的字体颜色
  20 +#define kMainTextColor kBlackColor
  21 +#define kAppBakgroundColor kWhiteColor
  22 +
  23 +// 主色调
  24 +// 导航按钮
  25 +#define kNavBarThemeColor RGB(128, 64, 122)
  26 +
  27 +#define kDetailTextColor RGB(145, 145, 145)
  28 +
  29 +// 默认TableViewCell高度
  30 +#define kDefaultCellHeight 69
  31 +// 默认界面之间的间距
  32 +#define kDefaultMargin 5
  33 +
  34 +////////////////////////////////////////////////////////
  35 +//////////// Font
  36 +////////////////////////////////////////////////////////
  37 +// CommonLibrary中常用的字体
  38 +#define kCommonLargeTextFont [UIFont systemFontOfSize:16]
  39 +#define kCommonMiddleTextFont [UIFont systemFontOfSize:14]
  40 +#define kCommonSmallTextFont [UIFont systemFontOfSize:12]
  41 +
  42 +////////////////////////////////////////////////////////
  43 +//////////// SCreen
  44 +////////////////////////////////////////////////////////
  45 +#define KScreenWidth ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width)
  46 +#define KScreenHeight ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.width : [UIScreen mainScreen].bounds.size.height)
  47 +
  48 +//判断iPHoneXr
  49 +#define Device_Is_iPhoneXS_XR ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO)
  50 +
  51 +//判断iPHoneX、iPHoneXs
  52 +#define Device_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
  53 +#define Device_Is_iPhoneXS ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
  54 +
  55 +//判断iPhoneXs Max
  56 +#define Device_Is_iPhoneXS_MAX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO)
  57 +
  58 +#define IS_IPhoneX_All (CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(375, 812)) ||CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(812, 375)) ||CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(414, 896)) ||CGSizeEqualToSize([UIScreen mainScreen].bounds.size, CGSizeMake(896, 414)))
  59 +
  60 +
  61 +#define kStatusHeight (int)[UIApplication sharedApplication].statusBarFrame.size.height //x44 非x20
  62 +#define kNavigationBarHeight ((int)[UIApplication sharedApplication].statusBarFrame.size.height+44) //x88 非x64
  63 +#define kVerticalNaviBarHeight ((IS_IPhoneX_All > 0) ? 88 : 44)
  64 +#define kVerticalTabBarTotalHeight ((IS_IPhoneX_All > 0) ? 83 : 49)
  65 +#define kVerticalBottomSafeHeight ((IS_IPhoneX_All > 0) ? 34 : 0)
  66 +#define kVerticalStatusHeight ((IS_IPhoneX_All > 0) ? 44 : 20)
  67 +#define kVerticalTopHeight ((IS_IPhoneX_All > 0) ? 24 : 0)
  68 +#define kHorizontalTopNaviBarHeight 32
  69 +#define kHorizontalBottomHeight ((IS_IPhoneX_All > 0) ? 21 : 0)
  70 +#define kHorizontalLeftHeight ((IS_IPhoneX_All > 0) ? 44 : 0)
  71 +#define kHorizontalRightHeight ((IS_IPhoneX_All > 0) ? 44 : 0)
  72 +#define kHorizontalTopHeight ((IS_IPhoneX_All > 0) ? 24 : 0)
  73 +
  74 +
  75 +////////////////////////////////////////////////////////
  76 +//////////// WeakSelf&StrongSelf
  77 +////////////////////////////////////////////////////////
  78 +/**
  79 + * weakSelf
  80 + */
  81 +#ifndef weakself
  82 +#define weakself __weak typeof(self)weakSelf = self;
  83 +#endif
  84 +/**
  85 + * strongSelf
  86 + */
  87 +#ifndef strongself
  88 +#define strongself __strong typeof(weakSelf)self = weakSelf;
  89 +#endif
  90 +
  91 +////////////////////////////////////////////////////////
  92 +//////////// 输出测试
  93 +////////////////////////////////////////////////////////
  94 +#ifdef DEBUG
  95 +#define NSLog(s, ... ) NSLog( @"[%@ in line %d] ===============>%@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
  96 +#else
  97 +#define NSLog(s, ... )
  98 +#endif
  99 +
  100 +#ifdef DEBUG
  101 +
  102 +#ifndef DebugLog
  103 +#define DebugLog(fmt, ...) NSLog((@"[%s Line %d] \n" fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
  104 +#endif
  105 +
  106 +#else
  107 +
  108 +#ifndef DebugLog
  109 +#define DebugLog(fmt, ...)
  110 +#endif
  111 +
  112 +#endif
  113 +
  114 +
  115 +////////////////////////////////////////////////////////
  116 +//////////// 动态跟随系统设置的字体大小改变字体和行高
  117 +////////////////////////////////////////////////////////
  118 +#define RATIO [CNSetUserDefaultTool getScaleCoefficient]
  119 +
  120 +//这个字体宏可以统一成UIFontMake()
  121 +//字体大小
  122 +#define Text_FONT(F) [UIFont systemFontOfSize:F]
  123 +
  124 +
  125 +#define contentLabelFontSize 16
  126 +
  127 +////////////////////////////////////////////////////////
  128 +//////////// AppDelegate
  129 +////////////////////////////////////////////////////////
  130 +#ifndef AppKeyWindow
  131 +#define AppKeyWindow [IMAAppDelegate sharedAppDelegate].window
  132 +#endif
  133 +
  134 +////////////////////////////////////////////////////////
  135 +//////////// NSNotificationCenter
  136 +////////////////////////////////////////////////////////
  137 +#define CNNotificationCenter [NSNotificationCenter defaultCenter]
  138 +
  139 +
  140 +#define SINGLETON_FOR_HEADER(className) \
  141 +\
  142 ++ (className *)shared##className;
  143 +
  144 +#define SINGLETON_FOR_CLASS(className) \
  145 +\
  146 ++ (className *)shared##className { \
  147 +static className *shared##className = nil; \
  148 +static dispatch_once_t onceToken; \
  149 +dispatch_once(&onceToken, ^{ \
  150 +shared##className = [[self alloc] init]; \
  151 +}); \
  152 +return shared##className; \
  153 +}
  154 +
  155 +#define AppVersion [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]
  156 +
  157 +
  158 +
  159 +
  160 +#endif /* CNLiveDefinesHeader_h */
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+AES.h 0 → 100644
  1 +//
  2 +// NSString+AES.h
  3 +//
  4 +//
  5 +// Created by Bear on 16/11/26.
  6 +// Copyright © 2016年 Bear. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface NSString (AES)
  12 +
  13 +/**< 加密方法 */
  14 +- (NSString*)aci_encryptWithAES;
  15 +
  16 +/**< 解密方法 */
  17 +- (NSString*)aci_decryptWithAES;
  18 +
  19 +
  20 +/**< 加密方法 */
  21 +- (NSString*)aci_encryptWithAESWithKey:(NSString *)key;
  22 +
  23 +/**< 解密方法 */
  24 +- (NSString*)aci_decryptWithAESWithKey:(NSString *)key;
  25 +
  26 +/**< GTMBase64编码 */
  27 +- (NSString*)encodeBase64Data:(NSData *)data;
  28 +
  29 +/**< GTMBase64解码 */
  30 +- (NSData*)decodeBase64Data:(NSData *)data;
  31 +
  32 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+AES.m 0 → 100644
  1 +//
  2 +// NSString+AES.m
  3 +//
  4 +//
  5 +// Created by Bear on 16/11/26.
  6 +// Copyright © 2016年 Bear . All rights reserved.
  7 +//
  8 +
  9 +#import "NSString+AES.h"
  10 +#import <CommonCrypto/CommonDigest.h>
  11 +#import <CommonCrypto/CommonCryptor.h>
  12 +#import "GTMBase64.h"
  13 +
  14 +static NSString *const PSW_AES_KEY = @"gndtd3b785q40bgm";//@"TESTPASSWORD";
  15 +static NSString *const AES_IV_PARAMETER = @"";//AES00IVPARAMETER
  16 +
  17 +@implementation NSString (AES)
  18 +
  19 +/**< 加密方法 */
  20 +- (NSString*)aci_encryptWithAESWithKey:(NSString *)key
  21 +{
  22 + NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
  23 + NSData *AESData = [self AES128operation:kCCEncrypt
  24 + data:data
  25 + key:key
  26 + iv:AES_IV_PARAMETER];
  27 + NSString *baseStr_GTM = [self encodeBase64Data:AESData];
  28 + NSString *baseStr = [AESData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
  29 +
  30 + NSLog(@"*****************\nGTMBase:%@\n*****************", baseStr_GTM);
  31 + NSLog(@"*****************\niOSCode:%@\n*****************", baseStr);
  32 + return baseStr_GTM;
  33 +}
  34 +
  35 +/**< 解密方法 */
  36 +- (NSString*)aci_decryptWithAESWithKey:(NSString *)key
  37 +{
  38 + NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
  39 + NSData *baseData_GTM = [self decodeBase64Data:data];
  40 + NSData *baseData = [[NSData alloc]initWithBase64EncodedString:self options:0];
  41 +
  42 + NSData *AESData_GTM = [self AES128operation:kCCDecrypt
  43 + data:baseData_GTM
  44 + key:key
  45 + iv:AES_IV_PARAMETER];
  46 + NSData *AESData = [self AES128operation:kCCDecrypt
  47 + data:baseData
  48 + key:key
  49 + iv:AES_IV_PARAMETER];
  50 +
  51 + NSString *decStr_GTM = [[NSString alloc] initWithData:AESData_GTM encoding:NSUTF8StringEncoding];
  52 + NSString *decStr = [[NSString alloc] initWithData:AESData encoding:NSUTF8StringEncoding];
  53 +
  54 + NSLog(@"*****************\nGTMBase:%@\n*****************", decStr_GTM);
  55 + NSLog(@"*****************\niOSCode:%@\n*****************", decStr);
  56 +
  57 + return decStr;
  58 +}
  59 +
  60 +
  61 +- (NSString*)aci_encryptWithAES {
  62 +
  63 + NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
  64 + NSData *AESData = [self AES128operation:kCCEncrypt
  65 + data:data
  66 + key:PSW_AES_KEY
  67 + iv:AES_IV_PARAMETER];
  68 + NSString *baseStr_GTM = [self encodeBase64Data:AESData];
  69 + NSString *baseStr = [AESData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
  70 +
  71 + NSLog(@"*****************\nGTMBase:%@\n*****************", baseStr_GTM);
  72 + NSLog(@"*****************\niOSCode:%@\n*****************", baseStr);
  73 + return baseStr_GTM;
  74 +}
  75 +
  76 +- (NSString*)aci_decryptWithAES {
  77 +
  78 + NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding];
  79 + NSData *baseData_GTM = [self decodeBase64Data:data];
  80 + NSData *baseData = [[NSData alloc]initWithBase64EncodedString:self options:0];
  81 +
  82 + NSData *AESData_GTM = [self AES128operation:kCCDecrypt
  83 + data:baseData_GTM
  84 + key:PSW_AES_KEY
  85 + iv:AES_IV_PARAMETER];
  86 + NSData *AESData = [self AES128operation:kCCDecrypt
  87 + data:baseData
  88 + key:PSW_AES_KEY
  89 + iv:AES_IV_PARAMETER];
  90 +
  91 + NSString *decStr_GTM = [[NSString alloc] initWithData:AESData_GTM encoding:NSUTF8StringEncoding];
  92 + NSString *decStr = [[NSString alloc] initWithData:AESData encoding:NSUTF8StringEncoding];
  93 +
  94 + NSLog(@"*****************\nGTMBase:%@\n*****************", decStr_GTM);
  95 + NSLog(@"*****************\niOSCode:%@\n*****************", decStr);
  96 +
  97 + return decStr;
  98 +}
  99 +
  100 +/**
  101 + * AES加解密算法
  102 + *
  103 + * @param operation kCCEncrypt(加密)kCCDecrypt(解密)
  104 + * @param data 待操作Data数据
  105 + * @param key key
  106 + * @param iv 向量
  107 + *
  108 + * @return AES128Data
  109 + */
  110 +- (NSData *)AES128operation:(CCOperation)operation data:(NSData *)data key:(NSString *)key iv:(NSString *)iv {
  111 + char keyPtr[kCCKeySizeAES128 + 1];
  112 + bzero(keyPtr, sizeof(keyPtr));
  113 + [key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
  114 +
  115 + // IV
  116 + char ivPtr[kCCBlockSizeAES128 + 1];
  117 + bzero(ivPtr, sizeof(ivPtr));
  118 + [iv getCString:ivPtr maxLength:sizeof(ivPtr) encoding:NSUTF8StringEncoding];
  119 +
  120 + size_t bufferSize = [data length] + kCCBlockSizeAES128;
  121 + void *buffer = malloc(bufferSize);
  122 + size_t numBytesEncrypted = 0;
  123 +
  124 + CCCryptorStatus cryptorStatus = CCCrypt(operation, kCCAlgorithmAES128, kCCOptionPKCS7Padding |kCCOptionECBMode,
  125 + keyPtr, kCCKeySizeAES128,
  126 + ivPtr,
  127 + [data bytes], [data length],
  128 + buffer, bufferSize,
  129 + &numBytesEncrypted);
  130 +
  131 + if(cryptorStatus == kCCSuccess) {
  132 + NSLog(@"Success");
  133 + return [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted];
  134 +
  135 + } else {
  136 + NSLog(@"Error");
  137 + }
  138 +
  139 + free(buffer);
  140 + return nil;
  141 +}
  142 +
  143 +/**< GTMBase64编码 */
  144 +- (NSString*)encodeBase64Data:(NSData *)data {
  145 + data = [GTMBase64 encodeData:data];
  146 + NSString *base64String = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  147 + return base64String;
  148 +}
  149 +
  150 +/**< GTMBase64解码 */
  151 +- (NSData*)decodeBase64Data:(NSData *)data {
  152 + data = [GTMBase64 decodeData:data];
  153 + return data;
  154 +}
  155 +
  156 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+CNLiveExtension.h 0 → 100644
  1 +//
  2 +// NSString+CNLiveExtension.h
  3 +// CNLiveCommonCategory
  4 +//
  5 +// Created by 张旭 on 2018/9/26.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface NSString (CNLiveExtension)
  12 +
  13 +//判断是否为空字符串
  14 +- (BOOL)isEmptyString;
  15 +
  16 +//判断是否为空字符串当去除换行和空格后
  17 +- (BOOL)isEmptyByTrimStr;
  18 +
  19 +//把格式化的JSON格式的字符串转换成字典
  20 +- (NSDictionary *)jsonToDictionary;
  21 +
  22 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+CNLiveExtension.m 0 → 100644
  1 +//
  2 +// NSString+CNLiveExtension.m
  3 +// CNLiveCommonCategory
  4 +//
  5 +// Created by 张旭 on 2018/9/26.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "NSString+CNLiveExtension.h"
  10 +
  11 +@implementation NSString (CNLiveExtension)
  12 +
  13 +//判断是否为空字符串
  14 +- (BOOL)isEmptyString
  15 +{
  16 + if (!self || ![self isKindOfClass:[NSString class]] || self.length == 0 || [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]].length == 0) {
  17 + return YES;
  18 + }
  19 + return NO;
  20 +}
  21 +
  22 +//判断是否为空字符串当去除换行和空格后
  23 +- (BOOL)isEmptyByTrimStr
  24 +{
  25 + NSString *str = [self stringByReplacingOccurrencesOfString:@"\r" withString:@""];
  26 + NSString *str1 = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
  27 + NSString *str2 = [str1 stringByReplacingOccurrencesOfString:@" " withString:@""];
  28 + if ([str2 isEmptyString]) {
  29 + return YES;
  30 + }
  31 + else
  32 + return NO;
  33 +}
  34 +
  35 +/*!
  36 + * @brief 把格式化的JSON格式的字符串转换成字典
  37 + * @return 返回字典
  38 + */
  39 +- (NSDictionary *)jsonToDictionary {
  40 + if ([self isEmptyString]) {
  41 + return nil;
  42 + }
  43 + NSData *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding];
  44 + NSError *err;
  45 + NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
  46 + if(err) {
  47 + NSLog(@"json解析失败:%@",err);
  48 + return nil;
  49 + }
  50 + return dic;
  51 +}
  52 +
  53 +
  54 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+Common.h 0 → 100644
  1 +//
  2 +// NSString+Common.h
  3 +//
  4 +// Created by Alexi on 12-11-5.
  5 +// Copyright (c) 2012年 . All rights reserved.
  6 +//
  7 +
  8 +#import <Foundation/Foundation.h>
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +char pinyinFirstLetter(unsigned short hanzi);
  12 +
  13 +@interface NSString (Common)
  14 +
  15 +// 将str加密成本地保存的文件名
  16 ++ (NSString *)md5String:(NSString *)str;
  17 +- (NSString *)md5;
  18 +
  19 +-(NSString*)firstPinYin;
  20 +
  21 +//是否为空
  22 ++ (BOOL)isEmpty:(NSString *)string;
  23 +
  24 +/**
  25 + compare two version
  26 + @param sourVersion *.*.*.*
  27 + @param desVersion *.*.*.*
  28 + @returns No,sourVersion is less than desVersion; YES, the statue is opposed
  29 + */
  30 ++(BOOL)compareVerison:(NSString *)sourVersion withDes:(NSString *)desVersion;
  31 +
  32 +//当前字符串是否只包含空白字符和换行符
  33 +- (BOOL)isWhitespaceAndNewlines;
  34 +
  35 +//去除字符串前后的空白,不包含换行符
  36 +- (NSString *)trim;
  37 +
  38 +//去除字符串中所有空白
  39 +- (NSString *)removeWhiteSpace;
  40 +- (NSString *)removeNewLine;
  41 +
  42 +//将字符串以URL格式编码
  43 +- (NSString *)stringByUrlEncoding;
  44 +
  45 +/*!
  46 + @brief 大写第一个字符
  47 + @return 格式化后的字符串
  48 + */
  49 +- (NSString *)capitalize;
  50 +
  51 +//以给定字符串开始,忽略大小写
  52 +- (BOOL)startsWith:(NSString *)str;
  53 +//以指定条件判断字符串是否以给定字符串开始
  54 +- (BOOL)startsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
  55 +
  56 +
  57 +//以给定字符串结束,忽略大小写
  58 +- (BOOL)endsWith:(NSString *)str;
  59 +//以指定条件判断字符串是否以给定字符串结尾
  60 +- (BOOL)endsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
  61 +
  62 +//包含给定的字符串, 忽略大小写
  63 +- (BOOL)containsString:(NSString *)str;
  64 +//以指定条件判断是否包含给定的字符串
  65 +- (BOOL)containsString:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
  66 +
  67 +//判断字符串是否相同,忽略大小写
  68 +- (BOOL)equalsString:(NSString *)str;
  69 +
  70 +
  71 +- (NSString *)emjoiText;
  72 +
  73 +
  74 +#pragma mark Hashing
  75 +- (NSString *)base64Encoding;
  76 +
  77 +- (NSString *)valueOfLabel:(NSString *)label;
  78 +
  79 +- (NSString *)substringAtRange:(NSRange)rang;
  80 +
  81 +
  82 +// 是否带有表情府
  83 +
  84 +- (NSUInteger)utf8Length;
  85 +
  86 +- (BOOL)isContainsEmoji;
  87 +
  88 +//递归计算符合规定的文本长度
  89 +- (NSString *)cutBeyondTextInLength:(NSInteger)maxLenth;
  90 +
  91 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font;
  92 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font breakMode:(NSLineBreakMode)breakMode;
  93 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font breakMode:(NSLineBreakMode)breakMode align:(NSTextAlignment)alignment;
  94 +
  95 +
  96 ++ (BOOL)isMobileNumber:(NSString *)mobileNum;
  97 +//正则 手机号码
  98 ++ (BOOL)validateCellPhoneNumber:(NSString *)cellNum;
  99 +//是不是 url
  100 +- (BOOL)isValidUrl;
  101 +// 去除Emoji表情
  102 ++ (BOOL)stringContainsEmoji:(NSString *)string;
  103 ++ (NSString *)disable_emoji:(NSString *)text;
  104 +
  105 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/NSString+Common.m 0 → 100644
  1 +//
  2 +// NSString+Common.m
  3 +//
  4 +//
  5 +// Created by Alexi on 12-11-5.
  6 +// Copyright (c) 2012年 . All rights reserved.
  7 +//
  8 +
  9 +#import "NSString+Common.h"
  10 +#import <CommonCrypto/CommonDigest.h>
  11 +
  12 +//#import "NSData+Common.h"
  13 +
  14 +#import "GTMBase64.h"
  15 +#import "UIFont+CNLiveExtension.h"
  16 +
  17 +#define HANZI_START 19968
  18 +#define HANZI_COUNT 20902
  19 +
  20 +
  21 +static char firstLetterArray[HANZI_COUNT] =
  22 +"ydkqsxnwzssxjbymgcczqpssqbycdscdqldylybssjgyqzjjfgcclzznwdwzjljpfyynnjjtmynzwzhflzppqhgccyynmjqyxxgd"
  23 +"nnsnsjnjnsnnmlnrxyfsngnnnnqzggllyjlnyzssecykyyhqwjssggyxyqyjtwktjhychmnxjtlhjyqbyxdldwrrjnwysrldzjpc"
  24 +"bzjjbrcfslnczstzfxxchtrqggddlyccssymmrjcyqzpwwjjyfcrwfdfzqpyddwyxkyjawjffxjbcftzyhhycyswccyxsclcxxwz"
  25 +"cxnbgnnxbxlzsqsbsjpysazdhmdzbqbscwdzzyytzhbtsyyfzgntnxjywqnknphhlxgybfmjnbjhhgqtjcysxstkzglyckglysmz"
  26 +"xyalmeldccxgzyrjxjzlnjzcqkcnnjwhjczccqljststbnhbtyxceqxkkwjyflzqlyhjxspsfxlmpbysxxxytccnylllsjxfhjxp"
  27 +"jbtffyabyxbcczbzyclwlczggbtssmdtjcxpthyqtgjjxcjfzkjzjqnlzwlslhdzbwjncjzyzsqnycqynzcjjwybrtwpyftwexcs"
  28 +"kdzctbyhyzqyyjxzcfbzzmjyxxsdczottbzljwfckscsxfyrlrygmbdthjxsqjccsbxyytswfbjdztnbcnzlcyzzpsacyzzsqqcs"
  29 +"hzqydxlbpjllmqxqydzxsqjtzpxlcglqdcwzfhctdjjsfxjejjtlbgxsxjmyjjqpfzasyjnsydjxkjcdjsznbartcclnjqmwnqnc"
  30 +"lllkbdbzzsyhqcltwlccrshllzntylnewyzyxczxxgdkdmtcedejtsyyssdqdfmxdbjlkrwnqlybglxnlgtgxbqjdznyjsjyjcjm"
  31 +"rnymgrcjczgjmzmgxmmryxkjnymsgmzzymknfxmbdtgfbhcjhkylpfmdxlxjjsmsqgzsjlqdldgjycalcmzcsdjllnxdjffffjcn"
  32 +"fnnffpfkhkgdpqxktacjdhhzdddrrcfqyjkqccwjdxhwjlyllzgcfcqjsmlzpbjjblsbcjggdckkdezsqcckjgcgkdjtjllzycxk"
  33 +"lqccgjcltfpcqczgwbjdqyzjjbyjhsjddwgfsjgzkcjctllfspkjgqjhzzljplgjgjjthjjyjzccmlzlyqbgjwmljkxzdznjqsyz"
  34 +"mljlljkywxmkjlhskjhbmclyymkxjqlbmllkmdxxkwyxwslmlpsjqqjqxyqfjtjdxmxxllcrqbsyjbgwynnggbcnxpjtgpapfgdj"
  35 +"qbhbncfjyzjkjkhxqfgqckfhygkhdkllsdjqxpqyaybnqsxqnszswhbsxwhxwbzzxdmndjbsbkbbzklylxgwxjjwaqzmywsjqlsj"
  36 +"xxjqwjeqxnchetlzalyyyszzpnkyzcptlshtzcfycyxyljsdcjqagyslcllyyysslqqqnldxzsccscadycjysfsgbfrsszqsbxjp"
  37 +"sjysdrckgjlgtkzjzbdktcsyqpyhstcldjnhmymcgxyzhjdctmhltxzhylamoxyjcltyfbqqjpfbdfehthsqhzywwcncxcdwhowg"
  38 +"yjlegmdqcwgfjhcsntmydolbygnqwesqpwnmlrydzszzlyqpzgcwxhnxpyxshmdqjgztdppbfbhzhhjyfdzwkgkzbldnzsxhqeeg"
  39 +"zxylzmmzyjzgszxkhkhtxexxgylyapsthxdwhzydpxagkydxbhnhnkdnjnmyhylpmgecslnzhkxxlbzzlbmlsfbhhgsgyyggbhsc"
  40 +"yajtxglxtzmcwzydqdqmngdnllszhngjzwfyhqswscelqajynytlsxthaznkzzsdhlaxxtwwcjhqqtddwzbcchyqzflxpslzqgpz"
  41 +"sznglydqtbdlxntctajdkywnsyzljhhdzckryyzywmhychhhxhjkzwsxhdnxlyscqydpslyzwmypnkxyjlkchtyhaxqsyshxasmc"
  42 +"hkdscrsgjpwqsgzjlwwschsjhsqnhnsngndantbaalczmsstdqjcjktscjnxplggxhhgoxzcxpdmmhldgtybynjmxhmrzplxjzck"
  43 +"zxshflqxxcdhxwzpckczcdytcjyxqhlxdhypjqxnlsyydzozjnhhqezysjyayxkypdgxddnsppyzndhthrhxydpcjjhtcnnctlhb"
  44 +"ynyhmhzllnnxmylllmdcppxhmxdkycyrdltxjchhznxclcclylnzsxnjzzlnnnnwhyqsnjhxynttdkyjpychhyegkcwtwlgjrlgg"
  45 +"tgtygyhpyhylqyqgcwyqkpyyettttlhyylltyttsylnyzwgywgpydqqzzdqnnkcqnmjjzzbxtqfjkdffbtkhzkbxdjjkdjjtlbwf"
  46 +"zpptkqtztgpdwntpjyfalqmkgxbcclzfhzcllllanpnxtjklcclgyhdzfgyddgcyyfgydxkssendhykdndknnaxxhbpbyyhxccga"
  47 +"pfqyjjdmlxcsjzllpcnbsxgjyndybwjspcwjlzkzddtacsbkzdyzypjzqsjnkktknjdjgyepgtlnyqnacdntcyhblgdzhbbydmjr"
  48 +"egkzyheyybjmcdtafzjzhgcjnlghldwxjjkytcyksssmtwcttqzlpbszdtwcxgzagyktywxlnlcpbclloqmmzsslcmbjcsdzkydc"
  49 +"zjgqjdsmcytzqqlnzqzxssbpkdfqmddzzsddtdmfhtdycnaqjqkypbdjyyxtljhdrqxlmhkydhrnlklytwhllrllrcxylbnsrnzz"
  50 +"symqzzhhkyhxksmzsyzgcxfbnbsqlfzxxnnxkxwymsddyqnggqmmyhcdzttfgyyhgsbttybykjdnkyjbelhdypjqnfxfdnkzhqks"
  51 +"byjtzbxhfdsbdaswpawajldyjsfhblcnndnqjtjnchxfjsrfwhzfmdrfjyxwzpdjkzyjympcyznynxfbytfyfwygdbnzzzdnytxz"
  52 +"emmqbsqehxfznbmflzzsrsyqjgsxwzjsprytjsjgskjjgljjynzjjxhgjkymlpyyycxycgqzswhwlyrjlpxslcxmnsmwklcdnkny"
  53 +"npsjszhdzeptxmwywxyysywlxjqcqxzdclaeelmcpjpclwbxsqhfwrtfnjtnqjhjqdxhwlbyccfjlylkyynldxnhycstyywncjtx"
  54 +"ywtrmdrqnwqcmfjdxzmhmayxnwmyzqtxtlmrspwwjhanbxtgzypxyyrrclmpamgkqjszycymyjsnxtplnbappypylxmyzkynldgy"
  55 +"jzcchnlmzhhanqnbgwqtzmxxmllhgdzxnhxhrxycjmffxywcfsbssqlhnndycannmtcjcypnxnytycnnymnmsxndlylysljnlxys"
  56 +"sqmllyzlzjjjkyzzcsfbzxxmstbjgnxnchlsnmcjscyznfzlxbrnnnylmnrtgzqysatswryhyjzmgdhzgzdwybsscskxsyhytsxg"
  57 +"cqgxzzbhyxjscrhmkkbsczjyjymkqhzjfnbhmqhysnjnzybknqmcjgqhwlsnzswxkhljhyybqcbfcdsxdldspfzfskjjzwzxsddx"
  58 +"jseeegjscssygclxxnwwyllymwwwgydkzjggggggsycknjwnjpcxbjjtqtjwdsspjxcxnzxnmelptfsxtllxcljxjjljsxctnswx"
  59 +"lennlyqrwhsycsqnybyaywjejqfwqcqqcjqgxaldbzzyjgkgxbltqyfxjltpydkyqhpmatlcndnkxmtxynhklefxdllegqtymsaw"
  60 +"hzmljtkynxlyjzljeeyybqqffnlyxhdsctgjhxywlkllxqkcctnhjlqmkkzgcyygllljdcgydhzwypysjbzjdzgyzzhywyfqdtyz"
  61 +"szyezklymgjjhtsmqwyzljyywzcsrkqyqltdxwcdrjalwsqzwbdcqyncjnnszjlncdcdtlzzzacqqzzddxyblxcbqjylzllljddz"
  62 +"jgyqyjzyxnyyyexjxksdaznyrdlzyyynjlslldyxjcykywnqcclddnyyynycgczhjxcclgzqjgnwnncqqjysbzzxyjxjnxjfzbsb"
  63 +"dsfnsfpzxhdwztdmpptflzzbzdmyypqjrsdzsqzsqxbdgcpzswdwcsqzgmdhzxmwwfybpngphdmjthzsmmbgzmbzjcfzhfcbbnmq"
  64 +"dfmbcmcjxlgpnjbbxgyhyyjgptzgzmqbqdcgybjxlwnkydpdymgcftpfxyztzxdzxtgkptybbclbjaskytssqyymscxfjhhlslls"
  65 +"jpqjjqaklyldlycctsxmcwfgngbqxllllnyxtyltyxytdpjhnhgnkbyqnfjyyzbyyessessgdyhfhwtcqbsdzjtfdmxhcnjzymqw"
  66 +"srxjdzjqbdqbbsdjgnfbknbxdkqhmkwjjjgdllthzhhyyyyhhsxztyyyccbdbpypzyccztjpzywcbdlfwzcwjdxxhyhlhwczxjtc"
  67 +"nlcdpxnqczczlyxjjcjbhfxwpywxzpcdzzbdccjwjhmlxbqxxbylrddgjrrctttgqdczwmxfytmmzcwjwxyywzzkybzcccttqnhx"
  68 +"nwxxkhkfhtswoccjybcmpzzykbnnzpbthhjdlszddytyfjpxyngfxbyqxzbhxcpxxtnzdnnycnxsxlhkmzxlthdhkghxxsshqyhh"
  69 +"cjyxglhzxcxnhekdtgqxqypkdhentykcnymyyjmkqyyyjxzlthhqtbyqhxbmyhsqckwwyllhcyylnneqxqwmcfbdccmljggxdqkt"
  70 +"lxkknqcdgcjwyjjlyhhqyttnwchhxcxwherzjydjccdbqcdgdnyxzdhcqrxcbhztqcbxwgqwyybxhmbymykdyecmqkyaqyngyzsl"
  71 +"fnkkqgyssqyshngjctxkzycssbkyxhyylstycxqthysmnscpmmgcccccmnztasmgqzjhklosjylswtmqzyqkdzljqqyplzycztcq"
  72 +"qpbbcjzclpkhqcyyxxdtdddsjcxffllchqxmjlwcjcxtspycxndtjshjwhdqqqckxyamylsjhmlalygxcyydmamdqmlmcznnyybz"
  73 +"xkyflmcncmlhxrcjjhsylnmtjggzgywjxsrxcwjgjqhqzdqjdcjjskjkgdzcgjjyjylxzxxcdqhhheslmhlfsbdjsyyshfyssczq"
  74 +"lpbdrfnztzdkykhsccgkwtqzckmsynbcrxqbjyfaxpzzedzcjykbcjwhyjbqzzywnyszptdkzpfpbaztklqnhbbzptpptyzzybhn"
  75 +"ydcpzmmcycqmcjfzzdcmnlfpbplngqjtbttajzpzbbdnjkljqylnbzqhksjznggqstzkcxchpzsnbcgzkddzqanzgjkdrtlzldwj"
  76 +"njzlywtxndjzjhxnatncbgtzcsskmljpjytsnwxcfjwjjtkhtzplbhsnjssyjbhbjyzlstlsbjhdnwqpslmmfbjdwajyzccjtbnn"
  77 +"nzwxxcdslqgdsdpdzgjtqqpsqlyyjzlgyhsdlctcbjtktyczjtqkbsjlgnnzdncsgpynjzjjyyknhrpwszxmtncszzyshbyhyzax"
  78 +"ywkcjtllckjjtjhgcssxyqyczbynnlwqcglzgjgqyqcczssbcrbcskydznxjsqgxssjmecnstjtpbdlthzwxqwqczexnqczgwesg"
  79 +"ssbybstscslccgbfsdqnzlccglllzghzcthcnmjgyzazcmsksstzmmzckbjygqljyjppldxrkzyxccsnhshhdznlzhzjjcddcbcj"
  80 +"xlbfqbczztpqdnnxljcthqzjgylklszzpcjdscqjhjqkdxgpbajynnsmjtzdxlcjyryynhjbngzjkmjxltbsllrzpylssznxjhll"
  81 +"hyllqqzqlsymrcncxsljmlzltzldwdjjllnzggqxppskyggggbfzbdkmwggcxmcgdxjmcjsdycabxjdlnbcddygskydqdxdjjyxh"
  82 +"saqazdzfslqxxjnqzylblxxwxqqzbjzlfbblylwdsljhxjyzjwtdjcyfqzqzzdzsxzzqlzcdzfxhwspynpqzmlpplffxjjnzzyls"
  83 +"jnyqzfpfzgsywjjjhrdjzzxtxxglghtdxcskyswmmtcwybazbjkshfhgcxmhfqhyxxyzftsjyzbxyxpzlchmzmbxhzzssyfdmncw"
  84 +"dabazlxktcshhxkxjjzjsthygxsxyyhhhjwxkzxssbzzwhhhcwtzzzpjxsyxqqjgzyzawllcwxznxgyxyhfmkhydwsqmnjnaycys"
  85 +"pmjkgwcqhylajgmzxhmmcnzhbhxclxdjpltxyjkdyylttxfqzhyxxsjbjnayrsmxyplckdnyhlxrlnllstycyyqygzhhsccsmcct"
  86 +"zcxhyqfpyyrpbflfqnntszlljmhwtcjqyzwtlnmlmdwmbzzsnzrbpdddlqjjbxtcsnzqqygwcsxfwzlxccrszdzmcyggdyqsgtnn"
  87 +"nlsmymmsyhfbjdgyxccpshxczcsbsjyygjmpbwaffyfnxhydxzylremzgzzyndsznlljcsqfnxxkptxzgxjjgbmyyssnbtylbnlh"
  88 +"bfzdcyfbmgqrrmzszxysjtznnydzzcdgnjafjbdknzblczszpsgcycjszlmnrznbzzldlnllysxsqzqlcxzlsgkbrxbrbzcycxzj"
  89 +"zeeyfgklzlnyhgzcgzlfjhgtgwkraajyzkzqtsshjjxdzyznynnzyrzdqqhgjzxsszbtkjbbfrtjxllfqwjgclqtymblpzdxtzag"
  90 +"bdhzzrbgjhwnjtjxlkscfsmwlldcysjtxkzscfwjlbnntzlljzllqblcqmqqcgcdfpbphzczjlpyyghdtgwdxfczqyyyqysrclqz"
  91 +"fklzzzgffcqnwglhjycjjczlqzzyjbjzzbpdcsnnjgxdqnknlznnnnpsntsdyfwwdjzjysxyyczcyhzwbbyhxrylybhkjksfxtjj"
  92 +"mmchhlltnyymsxxyzpdjjycsycwmdjjkqyrhllngpngtlyycljnnnxjyzfnmlrgjjtyzbsyzmsjyjhgfzqmsyxrszcytlrtqzsst"
  93 +"kxgqkgsptgxdnjsgcqcqhmxggztqydjjznlbznxqlhyqgggthqscbyhjhhkyygkggcmjdzllcclxqsftgjslllmlcskctbljszsz"
  94 +"mmnytpzsxqhjcnnqnyexzqzcpshkzzyzxxdfgmwqrllqxrfztlystctmjcsjjthjnxtnrztzfqrhcgllgcnnnnjdnlnnytsjtlny"
  95 +"xsszxcgjzyqpylfhdjsbbdczgjjjqzjqdybssllcmyttmqnbhjqmnygjyeqyqmzgcjkpdcnmyzgqllslnclmholzgdylfzslncnz"
  96 +"lylzcjeshnyllnxnjxlyjyyyxnbcljsswcqqnnyllzldjnllzllbnylnqchxyyqoxccqkyjxxxyklksxeyqhcqkkkkcsnyxxyqxy"
  97 +"gwtjohthxpxxhsnlcykychzzcbwqbbwjqcscszsslcylgddsjzmmymcytsdsxxscjpqqsqylyfzychdjynywcbtjsydchcyddjlb"
  98 +"djjsodzyqyskkyxdhhgqjyohdyxwgmmmazdybbbppbcmnnpnjzsmtxerxjmhqdntpjdcbsnmssythjtslmltrcplzszmlqdsdmjm"
  99 +"qpnqdxcfrnnfsdqqyxhyaykqyddlqyyysszbydslntfgtzqbzmchdhczcwfdxtmqqsphqwwxsrgjcwnntzcqmgwqjrjhtqjbbgwz"
  100 +"fxjhnqfxxqywyyhyscdydhhqmrmtmwctbszppzzglmzfollcfwhmmsjzttdhlmyffytzzgzyskjjxqyjzqbhmbzclyghgfmshpcf"
  101 +"zsnclpbqsnjyzslxxfpmtyjygbxlldlxpzjyzjyhhzcywhjylsjexfszzywxkzjlnadymlymqjpwxxhxsktqjezrpxxzghmhwqpw"
  102 +"qlyjjqjjzszcnhjlchhnxjlqwzjhbmzyxbdhhypylhlhlgfwlcfyytlhjjcwmscpxstkpnhjxsntyxxtestjctlsslstdlllwwyh"
  103 +"dnrjzsfgxssyczykwhtdhwjglhtzdqdjzxxqgghltzphcsqfclnjtclzpfstpdynylgmjllycqhynspchylhqyqtmzymbywrfqyk"
  104 +"jsyslzdnjmpxyyssrhzjnyqtqdfzbwwdwwrxcwggyhxmkmyyyhmxmzhnksepmlqqmtcwctmxmxjpjjhfxyyzsjzhtybmstsyjznq"
  105 +"jnytlhynbyqclcycnzwsmylknjxlggnnpjgtysylymzskttwlgsmzsylmpwlcwxwqcssyzsyxyrhssntsrwpccpwcmhdhhxzdzyf"
  106 +"jhgzttsbjhgyglzysmyclllxbtyxhbbzjkssdmalhhycfygmqypjyjqxjllljgclzgqlycjcctotyxmtmshllwlqfxymzmklpszz"
  107 +"cxhkjyclctyjcyhxsgyxnnxlzwpyjpxhjwpjpwxqqxlxsdhmrslzzydwdtcxknstzshbsccstplwsscjchjlcgchssphylhfhhxj"
  108 +"sxallnylmzdhzxylsxlmzykcldyahlcmddyspjtqjzlngjfsjshctsdszlblmssmnyymjqbjhrzwtyydchjljapzwbgqxbkfnbjd"
  109 +"llllyylsjydwhxpsbcmljpscgbhxlqhyrljxyswxhhzlldfhlnnymjljyflyjycdrjlfsyzfsllcqyqfgqyhnszlylmdtdjcnhbz"
  110 +"llnwlqxygyyhbmgdhxxnhlzzjzxczzzcyqzfngwpylcpkpykpmclgkdgxzgxwqbdxzzkzfbddlzxjtpjpttbythzzdwslcpnhslt"
  111 +"jxxqlhyxxxywzyswttzkhlxzxzpyhgzhknfsyhntjrnxfjcpjztwhplshfcrhnslxxjxxyhzqdxqwnnhyhmjdbflkhcxcwhjfyjc"
  112 +"fpqcxqxzyyyjygrpynscsnnnnchkzdyhflxxhjjbyzwttxnncyjjymswyxqrmhxzwfqsylznggbhyxnnbwttcsybhxxwxyhhxyxn"
  113 +"knyxmlywrnnqlxbbcljsylfsytjzyhyzawlhorjmnsczjxxxyxchcyqryxqzddsjfslyltsffyxlmtyjmnnyyyxltzcsxqclhzxl"
  114 +"wyxzhnnlrxkxjcdyhlbrlmbrdlaxksnlljlyxxlynrylcjtgncmtlzllcyzlpzpzyawnjjfybdyyzsepckzzqdqpbpsjpdyttbdb"
  115 +"bbyndycncpjmtmlrmfmmrwyfbsjgygsmdqqqztxmkqwgxllpjgzbqrdjjjfpkjkcxbljmswldtsjxldlppbxcwkcqqbfqbccajzg"
  116 +"mykbhyhhzykndqzybpjnspxthlfpnsygyjdbgxnhhjhzjhstrstldxskzysybmxjlxyslbzyslzxjhfybqnbylljqkygzmcyzzym"
  117 +"ccslnlhzhwfwyxzmwyxtynxjhbyymcysbmhysmydyshnyzchmjjmzcaahcbjbbhblytylsxsnxgjdhkxxtxxnbhnmlngsltxmrhn"
  118 +"lxqqxmzllyswqgdlbjhdcgjyqyymhwfmjybbbyjyjwjmdpwhxqldyapdfxxbcgjspckrssyzjmslbzzjfljjjlgxzgyxyxlszqkx"
  119 +"bexyxhgcxbpndyhwectwwcjmbtxchxyqqllxflyxlljlssnwdbzcmyjclwswdczpchqekcqbwlcgydblqppqzqfnqdjhymmcxtxd"
  120 +"rmzwrhxcjzylqxdyynhyyhrslnrsywwjjymtltllgtqcjzyabtckzcjyccqlysqxalmzynywlwdnzxqdllqshgpjfjljnjabcqzd"
  121 +"jgthhsstnyjfbswzlxjxrhgldlzrlzqzgsllllzlymxxgdzhgbdphzpbrlwnjqbpfdwonnnhlypcnjccndmbcpbzzncyqxldomzb"
  122 +"lzwpdwyygdstthcsqsccrsssyslfybnntyjszdfndpdhtqzmbqlxlcmyffgtjjqwftmnpjwdnlbzcmmcngbdzlqlpnfhyymjylsd"
  123 +"chdcjwjcctljcldtljjcbddpndsszycndbjlggjzxsxnlycybjjxxcbylzcfzppgkcxqdzfztjjfjdjxzbnzyjqctyjwhdyczhym"
  124 +"djxttmpxsplzcdwslshxypzgtfmlcjtacbbmgdewycyzxdszjyhflystygwhkjyylsjcxgywjcbllcsnddbtzbsclyzczzssqdll"
  125 +"mjyyhfllqllxfdyhabxggnywyypllsdldllbjcyxjznlhljdxyyqytdlllbngpfdfbbqbzzmdpjhgclgmjjpgaehhbwcqxajhhhz"
  126 +"chxyphjaxhlphjpgpzjqcqzgjjzzgzdmqyybzzphyhybwhazyjhykfgdpfqsdlzmljxjpgalxzdaglmdgxmmzqwtxdxxpfdmmssy"
  127 +"mpfmdmmkxksyzyshdzkjsysmmzzzmdydyzzczxbmlstmdyemxckjmztyymzmzzmsshhdccjewxxkljsthwlsqlyjzllsjssdppmh"
  128 +"nlgjczyhmxxhgncjmdhxtkgrmxfwmckmwkdcksxqmmmszzydkmsclcmpcjmhrpxqpzdsslcxkyxtwlkjyahzjgzjwcjnxyhmmbml"
  129 +"gjxmhlmlgmxctkzmjlyscjsyszhsyjzjcdajzhbsdqjzgwtkqxfkdmsdjlfmnhkzqkjfeypzyszcdpynffmzqykttdzzefmzlbnp"
  130 +"plplpbpszalltnlkckqzkgenjlwalkxydpxnhsxqnwqnkxqclhyxxmlnccwlymqyckynnlcjnszkpyzkcqzqljbdmdjhlasqlbyd"
  131 +"wqlwdgbqcryddztjybkbwszdxdtnpjdtcnqnfxqqmgnseclstbhpwslctxxlpwydzklnqgzcqapllkqcylbqmqczqcnjslqzdjxl"
  132 +"ddhpzqdljjxzqdjyzhhzlkcjqdwjppypqakjyrmpzbnmcxkllzllfqpylllmbsglzysslrsysqtmxyxzqzbscnysyztffmzzsmzq"
  133 +"hzssccmlyxwtpzgxzjgzgsjzgkddhtqggzllbjdzlsbzhyxyzhzfywxytymsdnzzyjgtcmtnxqyxjscxhslnndlrytzlryylxqht"
  134 +"xsrtzcgyxbnqqzfhykmzjbzymkbpnlyzpblmcnqyzzzsjztjctzhhyzzjrdyzhnfxklfzslkgjtctssyllgzrzbbjzzklpkbczys"
  135 +"nnyxbjfbnjzzxcdwlzyjxzzdjjgggrsnjkmsmzjlsjywqsnyhqjsxpjztnlsnshrnynjtwchglbnrjlzxwjqxqkysjycztlqzybb"
  136 +"ybyzjqdwgyzcytjcjxckcwdkkzxsnkdnywwyyjqyytlytdjlxwkcjnklccpzcqqdzzqlcsfqchqqgssmjzzllbjjzysjhtsjdysj"
  137 +"qjpdszcdchjkjzzlpycgmzndjxbsjzzsyzyhgxcpbjydssxdzncglqmbtsfcbfdzdlznfgfjgfsmpnjqlnblgqcyyxbqgdjjqsrf"
  138 +"kztjdhczklbsdzcfytplljgjhtxzcsszzxstjygkgckgynqxjplzbbbgcgyjzgczqszlbjlsjfzgkqqjcgycjbzqtldxrjnbsxxp"
  139 +"zshszycfwdsjjhxmfczpfzhqhqmqnknlyhtycgfrzgnqxcgpdlbzcsczqlljblhbdcypscppdymzzxgyhckcpzjgslzlnscnsldl"
  140 +"xbmsdlddfjmkdqdhslzxlsznpqpgjdlybdskgqlbzlnlkyyhzttmcjnqtzzfszqktlljtyyllnllqyzqlbdzlslyyzxmdfszsnxl"
  141 +"xznczqnbbwskrfbcylctnblgjpmczzlstlxshtzcyzlzbnfmqnlxflcjlyljqcbclzjgnsstbrmhxzhjzclxfnbgxgtqncztmsfz"
  142 +"kjmssncljkbhszjntnlzdntlmmjxgzjyjczxyhyhwrwwqnztnfjscpyshzjfyrdjsfscjzbjfzqzchzlxfxsbzqlzsgyftzdcszx"
  143 +"zjbjpszkjrhxjzcgbjkhcggtxkjqglxbxfgtrtylxqxhdtsjxhjzjjcmzlcqsbtxwqgxtxxhxftsdkfjhzyjfjxnzldlllcqsqqz"
  144 +"qwqxswqtwgwbzcgcllqzbclmqjtzgzyzxljfrmyzflxnsnxxjkxrmjdzdmmyxbsqbhgzmwfwygmjlzbyytgzyccdjyzxsngnyjyz"
  145 +"nbgpzjcqsyxsxrtfyzgrhztxszzthcbfclsyxzlzqmzlmplmxzjssfsbysmzqhxxnxrxhqzzzsslyflczjrcrxhhzxqndshxsjjh"
  146 +"qcjjbcynsysxjbqjpxzqplmlxzkyxlxcnlcycxxzzlxdlllmjyhzxhyjwkjrwyhcpsgnrzlfzwfzznsxgxflzsxzzzbfcsyjdbrj"
  147 +"krdhhjxjljjtgxjxxstjtjxlyxqfcsgswmsbctlqzzwlzzkxjmltmjyhsddbxgzhdlbmyjfrzfcgclyjbpmlysmsxlszjqqhjzfx"
  148 +"gfqfqbphngyyqxgztnqwyltlgwgwwhnlfmfgzjmgmgbgtjflyzzgzyzaflsspmlbflcwbjztljjmzlpjjlymqtmyyyfbgygqzgly"
  149 +"zdxqyxrqqqhsxyyqxygjtyxfsfsllgnqcygycwfhcccfxpylypllzqxxxxxqqhhsshjzcftsczjxspzwhhhhhapylqnlpqafyhxd"
  150 +"ylnkmzqgggddesrenzltzgchyppcsqjjhclljtolnjpzljlhymhezdydsqycddhgznndzclzywllznteydgnlhslpjjbdgwxpcnn"
  151 +"tycklkclwkllcasstknzdnnjttlyyzssysszzryljqkcgdhhyrxrzydgrgcwcgzqffbppjfzynakrgywyjpqxxfkjtszzxswzddf"
  152 +"bbqtbgtzkznpzfpzxzpjszbmqhkyyxyldkljnypkyghgdzjxxeaxpnznctzcmxcxmmjxnkszqnmnlwbwwqjjyhclstmcsxnjcxxt"
  153 +"pcnfdtnnpglllzcjlspblpgjcdtnjjlyarscffjfqwdpgzdwmrzzcgodaxnssnyzrestyjwjyjdbcfxnmwttbqlwstszgybljpxg"
  154 +"lbnclgpcbjftmxzljylzxcltpnclcgxtfzjshcrxsfysgdkntlbyjcyjllstgqcbxnhzxbxklylhzlqzlnzcqwgzlgzjncjgcmnz"
  155 +"zgjdzxtzjxycyycxxjyyxjjxsssjstsstdppghtcsxwzdcsynptfbchfbblzjclzzdbxgcjlhpxnfzflsyltnwbmnjhszbmdnbcy"
  156 +"sccldnycndqlyjjhmqllcsgljjsyfpyyccyltjantjjpwycmmgqyysxdxqmzhszxbftwwzqswqrfkjlzjqqyfbrxjhhfwjgzyqac"
  157 +"myfrhcyybynwlpexcczsyyrlttdmqlrkmpbgmyyjprkznbbsqyxbhyzdjdnghpmfsgbwfzmfqmmbzmzdcgjlnnnxyqgmlrygqccy"
  158 +"xzlwdkcjcggmcjjfyzzjhycfrrcmtznzxhkqgdjxccjeascrjthpljlrzdjrbcqhjdnrhylyqjsymhzydwcdfryhbbydtssccwbx"
  159 +"glpzmlzjdqsscfjmmxjcxjytycghycjwynsxlfemwjnmkllswtxhyyyncmmcyjdqdjzglljwjnkhpzggflccsczmcbltbhbqjxqd"
  160 +"jpdjztghglfjawbzyzjltstdhjhctcbchflqmpwdshyytqwcnntjtlnnmnndyyyxsqkxwyyflxxnzwcxypmaelyhgjwzzjbrxxaq"
  161 +"jfllpfhhhytzzxsgqjmhspgdzqwbwpjhzjdyjcqwxkthxsqlzyymysdzgnqckknjlwpnsyscsyzlnmhqsyljxbcxtlhzqzpcycyk"
  162 +"pppnsxfyzjjrcemhszmnxlxglrwgcstlrsxbygbzgnxcnlnjlclynymdxwtzpalcxpqjcjwtcyyjlblxbzlqmyljbghdslssdmxm"
  163 +"bdczsxyhamlczcpjmcnhjyjnsykchskqmczqdllkablwjqsfmocdxjrrlyqchjmybyqlrhetfjzfrfksryxfjdwtsxxywsqjysly"
  164 +"xwjhsdlxyyxhbhawhwjcxlmyljcsqlkydttxbzslfdxgxsjkhsxxybssxdpwncmrptqzczenygcxqfjxkjbdmljzmqqxnoxslyxx"
  165 +"lylljdzptymhbfsttqqwlhsgynlzzalzxclhtwrrqhlstmypyxjjxmnsjnnbryxyjllyqyltwylqyfmlkljdnlltfzwkzhljmlhl"
  166 +"jnljnnlqxylmbhhlnlzxqchxcfxxlhyhjjgbyzzkbxscqdjqdsndzsygzhhmgsxcsymxfepcqwwrbpyyjqryqcyjhqqzyhmwffhg"
  167 +"zfrjfcdbxntqyzpcyhhjlfrzgpbxzdbbgrqstlgdgylcqmgchhmfywlzyxkjlypjhsywmqqggzmnzjnsqxlqsyjtcbehsxfszfxz"
  168 +"wfllbcyyjdytdthwzsfjmqqyjlmqsxlldttkghybfpwdyysqqrnqwlgwdebzwcyygcnlkjxtmxmyjsxhybrwfymwfrxyymxysctz"
  169 +"ztfykmldhqdlgyjnlcryjtlpsxxxywlsbrrjwxhqybhtydnhhxmmywytycnnmnssccdalwztcpqpyjllqzyjswjwzzmmglmxclmx"
  170 +"nzmxmzsqtzppjqblpgxjzhfljjhycjsrxwcxsncdlxsyjdcqzxslqyclzxlzzxmxqrjmhrhzjbhmfljlmlclqnldxzlllfyprgjy"
  171 +"nxcqqdcmqjzzxhnpnxzmemmsxykynlxsxtljxyhwdcwdzhqyybgybcyscfgfsjnzdrzzxqxrzrqjjymcanhrjtldbpyzbstjhxxz"
  172 +"ypbdwfgzzrpymnnkxcqbyxnbnfyckrjjcmjegrzgyclnnzdnkknsjkcljspgyyclqqjybzssqlllkjftbgtylcccdblsppfylgyd"
  173 +"tzjqjzgkntsfcxbdkdxxhybbfytyhbclnnytgdhryrnjsbtcsnyjqhklllzslydxxwbcjqsbxnpjzjzjdzfbxxbrmladhcsnclbj"
  174 +"dstblprznswsbxbcllxxlzdnzsjpynyxxyftnnfbhjjjgbygjpmmmmsszljmtlyzjxswxtyledqpjmpgqzjgdjlqjwjqllsdgjgy"
  175 +"gmscljjxdtygjqjjjcjzcjgdzdshqgzjggcjhqxsnjlzzbxhsgzxcxyljxyxyydfqqjhjfxdhctxjyrxysqtjxyefyyssyxjxncy"
  176 +"zxfxcsxszxyyschshxzzzgzzzgfjdldylnpzgsjaztyqzpbxcbdztzczyxxyhhscjshcggqhjhgxhsctmzmehyxgebtclzkkwytj"
  177 +"zrslekestdbcyhqqsayxcjxwwgsphjszsdncsjkqcxswxfctynydpccczjqtcwjqjzzzqzljzhlsbhpydxpsxshhezdxfptjqyzc"
  178 +"xhyaxncfzyyhxgnqmywntzsjbnhhgymxmxqcnssbcqsjyxxtyyhybcqlmmszmjzzllcogxzaajzyhjmchhcxzsxsdznleyjjzjbh"
  179 +"zwjzsqtzpsxzzdsqjjjlnyazphhyysrnqzthzhnyjyjhdzxzlswclybzyecwcycrylchzhzydzydyjdfrjjhtrsqtxyxjrjhojyn"
  180 +"xelxsfsfjzghpzsxzszdzcqzbyyklsgsjhczshdgqgxyzgxchxzjwyqwgyhksseqzzndzfkwyssdclzstsymcdhjxxyweyxczayd"
  181 +"mpxmdsxybsqmjmzjmtjqlpjyqzcgqhyjhhhqxhlhdldjqcfdwbsxfzzyyschtytyjbhecxhjkgqfxbhyzjfxhwhbdzfyzbchpnpg"
  182 +"dydmsxhkhhmamlnbyjtmpxejmcthqbzyfcgtyhwphftgzzezsbzegpbmdskftycmhbllhgpzjxzjgzjyxzsbbqsczzlzscstpgxm"
  183 +"jsfdcczjzdjxsybzlfcjsazfgszlwbczzzbyztzynswyjgxzbdsynxlgzbzfygczxbzhzftpbgzgejbstgkdmfhyzzjhzllzzgjq"
  184 +"zlsfdjsscbzgpdlfzfzszyzyzsygcxsnxxchczxtzzljfzgqsqqxcjqccccdjcdszzyqjccgxztdlgscxzsyjjqtcclqdqztqchq"
  185 +"qyzynzzzpbkhdjfcjfztypqyqttynlmbdktjcpqzjdzfpjsbnjlgyjdxjdcqkzgqkxclbzjtcjdqbxdjjjstcxnxbxqmslyjcxnt"
  186 +"jqwwcjjnjjlllhjcwqtbzqqczczpzzdzyddcyzdzccjgtjfzdprntctjdcxtqzdtjnplzbcllctdsxkjzqdmzlbznbtjdcxfczdb"
  187 +"czjjltqqpldckztbbzjcqdcjwynllzlzccdwllxwzlxrxntqjczxkjlsgdnqtddglnlajjtnnynkqlldzntdnycygjwyxdxfrsqs"
  188 +"tcdenqmrrqzhhqhdldazfkapbggpzrebzzykyqspeqjjglkqzzzjlysyhyzwfqznlzzlzhwcgkypqgnpgblplrrjyxcccgyhsfzf"
  189 +"wbzywtgzxyljczwhncjzplfflgskhyjdeyxhlpllllcygxdrzelrhgklzzyhzlyqszzjzqljzflnbhgwlczcfjwspyxzlzlxgccp"
  190 +"zbllcxbbbbnbbcbbcrnnzccnrbbnnldcgqyyqxygmqzwnzytyjhyfwtehznjywlccntzyjjcdedpwdztstnjhtymbjnyjzlxtsst"
  191 +"phndjxxbyxqtzqddtjtdyztgwscszqflshlnzbcjbhdlyzjyckwtydylbnydsdsycctyszyyebgexhqddwnygyclxtdcystqnygz"
  192 +"ascsszzdzlcclzrqxyywljsbymxshzdembbllyyllytdqyshymrqnkfkbfxnnsbychxbwjyhtqbpbsbwdzylkgzskyghqzjxhxjx"
  193 +"gnljkzlyycdxlfwfghljgjybxblybxqpqgntzplncybxdjyqydymrbeyjyyhkxxstmxrczzjwxyhybmcflyzhqyzfwxdbxbcwzms"
  194 +"lpdmyckfmzklzcyqycclhxfzlydqzpzygyjyzmdxtzfnnyttqtzhgsfcdmlccytzxjcytjmkslpzhysnwllytpzctzccktxdhxxt"
  195 +"qcyfksmqccyyazhtjplylzlyjbjxtfnyljyynrxcylmmnxjsmybcsysslzylljjgyldzdlqhfzzblfndsqkczfyhhgqmjdsxyctt"
  196 +"xnqnjpyybfcjtyyfbnxejdgyqbjrcnfyyqpghyjsyzngrhtknlnndzntsmgklbygbpyszbydjzsstjztsxzbhbscsbzczptqfzlq"
  197 +"flypybbjgszmnxdjmtsyskkbjtxhjcegbsmjyjzcstmljyxrczqscxxqpyzhmkyxxxjcljyrmyygadyskqlnadhrskqxzxztcggz"
  198 +"dlmlwxybwsyctbhjhcfcwzsxwwtgzlxqshnyczjxemplsrcgltnzntlzjcyjgdtclglbllqpjmzpapxyzlaktkdwczzbncctdqqz"
  199 +"qyjgmcdxltgcszlmlhbglkznnwzndxnhlnmkydlgxdtwcfrjerctzhydxykxhwfzcqshknmqqhzhhymjdjskhxzjzbzzxympajnm"
  200 +"ctbxlsxlzynwrtsqgscbptbsgzwyhtlkssswhzzlyytnxjgmjrnsnnnnlskztxgxlsammlbwldqhylakqcqctmycfjbslxclzjcl"
  201 +"xxknbnnzlhjphqplsxsckslnhpsfqcytxjjzljldtzjjzdlydjntptnndskjfsljhylzqqzlbthydgdjfdbyadxdzhzjnthqbykn"
  202 +"xjjqczmlljzkspldsclbblnnlelxjlbjycxjxgcnlcqplzlznjtsljgyzdzpltqcssfdmnycxgbtjdcznbgbqyqjwgkfhtnbyqzq"
  203 +"gbkpbbyzmtjdytblsqmbsxtbnpdxklemyycjynzdtldykzzxtdxhqshygmzsjycctayrzlpwltlkxslzcggexclfxlkjrtlqjaqz"
  204 +"ncmbqdkkcxglczjzxjhptdjjmzqykqsecqzdshhadmlzfmmzbgntjnnlhbyjbrbtmlbyjdzxlcjlpldlpcqdhlhzlycblcxccjad"
  205 +"qlmzmmsshmybhbnkkbhrsxxjmxmdznnpklbbrhgghfchgmnklltsyyycqlcskymyehywxnxqywbawykqldnntndkhqcgdqktgpkx"
  206 +"hcpdhtwnmssyhbwcrwxhjmkmzngwtmlkfghkjyldyycxwhyyclqhkqhtdqkhffldxqwytyydesbpkyrzpjfyyzjceqdzzdlattpb"
  207 +"fjllcxdlmjsdxegwgsjqxcfbssszpdyzcxznyxppzydlyjccpltxlnxyzyrscyyytylwwndsahjsygyhgywwaxtjzdaxysrltdps"
  208 +"syxfnejdxyzhlxlllzhzsjnyqyqyxyjghzgjcyjchzlycdshhsgczyjscllnxzjjyyxnfsmwfpyllyllabmddhwzxjmcxztzpmlq"
  209 +"chsfwzynctlndywlslxhymmylmbwwkyxyaddxylldjpybpwnxjmmmllhafdllaflbnhhbqqjqzjcqjjdjtffkmmmpythygdrjrdd"
  210 +"wrqjxnbysrmzdbyytbjhpymyjtjxaahggdqtmystqxkbtzbkjlxrbyqqhxmjjbdjntgtbxpgbktlgqxjjjcdhxqdwjlwrfmjgwqh"
  211 +"cnrxswgbtgygbwhswdwrfhwytjjxxxjyzyslphyypyyxhydqpxshxyxgskqhywbdddpplcjlhqeewjgsyykdpplfjthkjltcyjhh"
  212 +"jttpltzzcdlyhqkcjqysteeyhkyzyxxyysddjkllpymqyhqgxqhzrhbxpllnqydqhxsxxwgdqbshyllpjjjthyjkyphthyyktyez"
  213 +"yenmdshlzrpqfbnfxzbsftlgxsjbswyysksflxlpplbbblnsfbfyzbsjssylpbbffffsscjdstjsxtryjcyffsyzyzbjtlctsbsd"
  214 +"hrtjjbytcxyyeylycbnebjdsysyhgsjzbxbytfzwgenhhhthjhhxfwgcstbgxklstyymtmbyxjskzscdyjrcythxzfhmymcxlzns"
  215 +"djtxtxrycfyjsbsdyerxhljxbbdeynjghxgckgscymblxjmsznskgxfbnbbthfjyafxwxfbxmyfhdttcxzzpxrsywzdlybbktyqw"
  216 +"qjbzypzjznjpzjlztfysbttslmptzrtdxqsjehbnylndxljsqmlhtxtjecxalzzspktlzkqqyfsyjywpcpqfhjhytqxzkrsgtksq"
  217 +"czlptxcdyyzsslzslxlzmacpcqbzyxhbsxlzdltztjtylzjyytbzypltxjsjxhlbmytxcqrblzssfjzztnjytxmyjhlhpblcyxqj"
  218 +"qqkzzscpzkswalqsplczzjsxgwwwygyatjbbctdkhqhkgtgpbkqyslbxbbckbmllndzstbklggqkqlzbkktfxrmdkbftpzfrtppm"
  219 +"ferqnxgjpzsstlbztpszqzsjdhljqlzbpmsmmsxlqqnhknblrddnhxdkddjcyyljfqgzlgsygmjqjkhbpmxyxlytqwlwjcpbmjxc"
  220 +"yzydrjbhtdjyeqshtmgsfyplwhlzffnynnhxqhpltbqpfbjwjdbygpnxtbfzjgnnntjshxeawtzylltyqbwjpgxghnnkndjtmszs"
  221 +"qynzggnwqtfhclssgmnnnnynzqqxncjdqgzdlfnykljcjllzlmzznnnnsshthxjlzjbbhqjwwycrdhlyqqjbeyfsjhthnrnwjhwp"
  222 +"slmssgzttygrqqwrnlalhmjtqjsmxqbjjzjqzyzkxbjqxbjxshzssfglxmxnxfghkzszggslcnnarjxhnlllmzxelglxydjytlfb"
  223 +"kbpnlyzfbbhptgjkwetzhkjjxzxxglljlstgshjjyqlqzfkcgnndjsszfdbctwwseqfhqjbsaqtgypjlbxbmmywxgslzhglsgnyf"
  224 +"ljbyfdjfngsfmbyzhqffwjsyfyjjphzbyyzffwotjnlmftwlbzgyzqxcdjygzyyryzynyzwegazyhjjlzrthlrmgrjxzclnnnljj"
  225 +"yhtbwjybxxbxjjtjteekhwslnnlbsfazpqqbdlqjjtyyqlyzkdksqjnejzldqcgjqnnjsncmrfqthtejmfctyhypymhydmjncfgy"
  226 +"yxwshctxrljgjzhzcyyyjltkttntmjlzclzzayyoczlrlbszywjytsjyhbyshfjlykjxxtmzyyltxxypslqyjzyzyypnhmymdyyl"
  227 +"blhlsyygqllnjjymsoycbzgdlyxylcqyxtszegxhzglhwbljheyxtwqmakbpqcgyshhegqcmwyywljyjhyyzlljjylhzyhmgsljl"
  228 +"jxcjjyclycjbcpzjzjmmwlcjlnqljjjlxyjmlszljqlycmmgcfmmfpqqmfxlqmcffqmmmmhnznfhhjgtthxkhslnchhyqzxtmmqd"
  229 +"cydyxyqmyqylddcyaytazdcymdydlzfffmmycqcwzzmabtbyctdmndzggdftypcgqyttssffwbdttqssystwnjhjytsxxylbyyhh"
  230 +"whxgzxwznnqzjzjjqjccchykxbzszcnjtllcqxynjnckycynccqnxyewyczdcjycchyjlbtzyycqwlpgpyllgktltlgkgqbgychj"
  231 +"xy";
  232 +
  233 +char pinyinFirstLetter(unsigned short hanzi)
  234 +{
  235 + int index = hanzi - HANZI_START;
  236 + if (index >= 0 && index <= HANZI_COUNT)
  237 + {
  238 + return firstLetterArray[index];
  239 + }
  240 + else
  241 + {
  242 + return '[';
  243 + }
  244 +}
  245 +
  246 +
  247 +
  248 +@implementation NSString (Common)
  249 +
  250 ++ (NSString *)md5String:(NSString *)str;
  251 +{
  252 + const char *cStr = [str UTF8String];
  253 + unsigned char result[CC_MD5_DIGEST_LENGTH];
  254 + CC_MD5(cStr, (uint32_t)strlen(cStr), result);
  255 + return [NSString stringWithFormat:
  256 + @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
  257 + result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7],
  258 + result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15]
  259 + ];
  260 +
  261 +}
  262 +
  263 +- (NSString *)md5
  264 +{
  265 + return [NSString md5String:self];
  266 +}
  267 +
  268 +-(NSString*)firstPinYin
  269 +{
  270 + if ([self length] == 0) {
  271 + return [NSString stringWithFormat:@"%c",'['];
  272 + }
  273 +
  274 + if ([self canBeConvertedToEncoding:NSASCIIStringEncoding]) {//it is english words
  275 + return [self substringToIndex:1];
  276 + }
  277 +
  278 + unichar ch = [self characterAtIndex:0];
  279 + char firstPinYin = ch;
  280 + if (ch < 'A' || ch > 'z' || (ch > 'Z' && ch < 'a') ) {
  281 + firstPinYin = pinyinFirstLetter(ch);
  282 + }
  283 +
  284 + return [NSString stringWithFormat:@"%c",firstPinYin];
  285 +}
  286 +
  287 +
  288 +#pragma mark - Utils
  289 +- (BOOL)isValidUrl
  290 +{
  291 + NSString *regex =@"[a-zA-z]+://[^\\s]*";
  292 + NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];
  293 + return [urlTest evaluateWithObject:self];
  294 +}
  295 ++ (BOOL)isEmpty:(NSString *)string
  296 +{
  297 + return string == nil || string.length == 0;
  298 +}
  299 +
  300 +- (BOOL)isWhitespaceAndNewlines
  301 +{
  302 + NSCharacterSet* whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
  303 + for (NSInteger i = 0; i < self.length; ++i)
  304 + {
  305 + unichar c = [self characterAtIndex:i];
  306 + if (![whitespace characterIsMember:c])
  307 + {
  308 + return NO;
  309 + }
  310 + }
  311 + return YES;
  312 +}
  313 +
  314 +- (NSString *)trim
  315 +{
  316 + return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
  317 +}
  318 +
  319 +- (NSString *)removeWhiteSpace
  320 +{
  321 + return [[self componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] componentsJoinedByString:@""];
  322 +}
  323 +
  324 +- (NSString *)removeNewLine
  325 +{
  326 + return [[self componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] componentsJoinedByString:@""];
  327 +}
  328 +
  329 +- (NSString *)stringByUrlEncoding {
  330 + NSMutableCharacterSet *charset = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy];
  331 + [charset removeCharactersInString:@"!*'();:@&=+$,/?%#[]"];
  332 + NSString *encodedValue = [self stringByAddingPercentEncodingWithAllowedCharacters:charset];
  333 + return encodedValue;
  334 +}
  335 +
  336 +- (NSString *)capitalize
  337 +{
  338 + if (self == nil || [self length] == 0) return self;
  339 + return [[self substringToIndex:1].uppercaseString stringByAppendingString:[self substringFromIndex:1]];
  340 +}
  341 +
  342 +- (BOOL)startsWith:(NSString *)str
  343 +{
  344 + return [self startsWith:str Options:NSCaseInsensitiveSearch];
  345 +}
  346 +
  347 +- (BOOL)startsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions
  348 +{
  349 + return (str != nil) && ([str length] > 0) && ([self length] >= [str length])
  350 + && ([self rangeOfString:str options:compareOptions].location == 0);
  351 +}
  352 +
  353 +- (BOOL)endsWith:(NSString *)str
  354 +{
  355 + return [self endsWith:str Options:NSCaseInsensitiveSearch];
  356 +}
  357 +
  358 +- (BOOL)endsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions
  359 +{
  360 + return (str != nil) && ([str length] > 0) && ([self length] >= [str length])
  361 + && ([self rangeOfString:str options:(compareOptions | NSBackwardsSearch)].location == ([self length] - [str length]));
  362 +}
  363 +
  364 +- (BOOL)containsString:(NSString *)str
  365 +{
  366 + return [self containsString:str Options:NSCaseInsensitiveSearch];
  367 +}
  368 +
  369 +- (BOOL)containsString:(NSString *)str Options:(NSStringCompareOptions)compareOptions
  370 +{
  371 + return (str != nil) && ([str length] > 0) && ([self length] >= [str length]) && ([self rangeOfString:str options:compareOptions].location != NSNotFound);
  372 +}
  373 +
  374 +- (BOOL)equalsString:(NSString *)str
  375 +{
  376 + return (str != nil) && ([self length] == [str length]) && ([self rangeOfString:str options:NSCaseInsensitiveSearch].location == 0);
  377 +}
  378 +
  379 +#pragma mark XML Extensions
  380 ++ (NSString *)encodeXMLCharactersIn:(NSString *)source
  381 +{
  382 + if (![source isKindOfClass:[NSString class]] || !source)
  383 + {
  384 + return @"";
  385 + }
  386 +
  387 + NSString *result = [NSString stringWithString:source];
  388 +
  389 + if ([result rangeOfString:@"&"].location != NSNotFound)
  390 + {
  391 + result = [[result componentsSeparatedByString:@"&"] componentsJoinedByString:@"&amp;"];
  392 + }
  393 +
  394 + if ([result rangeOfString:@"<"].location != NSNotFound)
  395 + {
  396 + result = [[result componentsSeparatedByString:@"<"] componentsJoinedByString:@"&lt;"];
  397 + }
  398 +
  399 + if ([result rangeOfString:@">"].location != NSNotFound)
  400 + {
  401 + result = [[result componentsSeparatedByString:@">"] componentsJoinedByString:@"&gt;"];
  402 + }
  403 +
  404 + if ([result rangeOfString:@"\""].location != NSNotFound)
  405 + {
  406 + result = [[result componentsSeparatedByString:@"\""] componentsJoinedByString:@"&quot;"];
  407 + }
  408 +
  409 + if ([result rangeOfString:@"'"].location != NSNotFound)
  410 + {
  411 + result = [[result componentsSeparatedByString:@"'"] componentsJoinedByString:@"&apos;"];
  412 + }
  413 +
  414 + return result;
  415 +}
  416 +
  417 ++ (NSString *)decodeXMLCharactersIn:(NSString *)source
  418 +{
  419 + if (![source isKindOfClass:[NSString class]] || !source)
  420 + {
  421 + return @"";
  422 + }
  423 +
  424 + NSString *result = [NSString stringWithString:source];
  425 +
  426 + if ([result rangeOfString:@"&amp;"].location != NSNotFound)
  427 + {
  428 + result = [[result componentsSeparatedByString:@"&amp;"] componentsJoinedByString:@"&"];
  429 + }
  430 +
  431 + if ([result rangeOfString:@"&lt;"].location != NSNotFound)
  432 + {
  433 + result = [[result componentsSeparatedByString:@"&lt;"] componentsJoinedByString:@"<"];
  434 + }
  435 +
  436 + if ([result rangeOfString:@"&gt;"].location != NSNotFound)
  437 + {
  438 + result = [[result componentsSeparatedByString:@"&gt;"] componentsJoinedByString:@">"];
  439 + }
  440 +
  441 + if ([result rangeOfString:@"&quot;"].location != NSNotFound)
  442 + {
  443 + result = [[result componentsSeparatedByString:@"&quot;"] componentsJoinedByString:@"\""];
  444 + }
  445 +
  446 + if ([result rangeOfString:@"&apos;"].location != NSNotFound)
  447 + {
  448 + result = [[result componentsSeparatedByString:@"&apos;"] componentsJoinedByString:@"'"];
  449 + }
  450 +
  451 + if ([result rangeOfString:@"&nbsp;"].location != NSNotFound)
  452 + {
  453 + result = [[result componentsSeparatedByString:@"&nbsp;"] componentsJoinedByString:@" "];
  454 + }
  455 +
  456 + if ([result rangeOfString:@"&#8220;"].location != NSNotFound)
  457 + {
  458 + result = [[result componentsSeparatedByString:@"&#8220;"] componentsJoinedByString:@"\""];
  459 + }
  460 +
  461 + if ([result rangeOfString:@"&#8221;"].location != NSNotFound)
  462 + {
  463 + result = [[result componentsSeparatedByString:@"&#8221;"] componentsJoinedByString:@"\""];
  464 + }
  465 +
  466 + if ([result rangeOfString:@"&#039;"].location != NSNotFound)
  467 + {
  468 + result = [[result componentsSeparatedByString:@"&#039;"] componentsJoinedByString:@"'"];
  469 + }
  470 + return result;
  471 +}
  472 +
  473 +/**
  474 + compare two version
  475 + @param sourVersion *.*.*.*
  476 + @param desVersion *.*.*.*
  477 + @returns No,sourVersion is less than desVersion; YES, the statue is opposed
  478 + */
  479 ++(BOOL)compareVerison:(NSString *)sourVersion withDes:(NSString *)desVersion
  480 +{
  481 + NSArray * sourArr = [sourVersion componentsSeparatedByString:@"."];
  482 + NSArray * desArr = [desVersion componentsSeparatedByString:@"."];
  483 + int sourInt, desInt;
  484 + NSMutableString * sourStr = [[NSMutableString alloc] init];
  485 + NSMutableString * desStr = [[NSMutableString alloc] init];
  486 +
  487 + if ([sourArr count] < [desArr count])
  488 + {
  489 + return YES;
  490 + }
  491 + else
  492 + {
  493 +
  494 + }
  495 +
  496 + for (int i = 0; i < [sourArr count]; i ++)
  497 + {
  498 + [sourStr appendFormat:@"%@", [sourArr objectAtIndex:i]];
  499 + [desStr appendFormat:@"%@", [desArr objectAtIndex:i]];
  500 + }
  501 + sourInt = [sourStr intValue];
  502 + desInt = [desStr intValue];
  503 + if (sourInt < desInt)
  504 + {
  505 + return YES;
  506 + }
  507 + else
  508 + {
  509 + return NO;
  510 + }
  511 + return NO;
  512 +
  513 +}
  514 +
  515 +#pragma mark - hashing
  516 +- (NSString *)base64Encoding
  517 +{
  518 + NSData *stringData = [self dataUsingEncoding:NSUTF8StringEncoding];
  519 + NSString *encodedString = [GTMBase64 stringByEncodingData:stringData];
  520 +
  521 + return encodedString;
  522 +}
  523 +
  524 +#if kSupportNSDataCommon
  525 +///////////////////////////////////////////////////////////////////////////////////////////////////
  526 +/**
  527 + * Calculate the md5 hash using CC_MD5.
  528 + *
  529 + * @returns md5 hash of this string.
  530 + */
  531 +- (NSString*)md5Hash
  532 +{
  533 + return [[self dataUsingEncoding:NSUTF8StringEncoding] md5Hash];
  534 +}
  535 +
  536 +
  537 +///////////////////////////////////////////////////////////////////////////////////////////////////
  538 +/**
  539 + * Calculate the SHA1 hash using CommonCrypto CC_SHA1.
  540 + *
  541 + * @returns SHA1 hash of this string.
  542 + */
  543 +- (NSString*)sha1Hash
  544 +{
  545 + return [[self dataUsingEncoding:NSUTF8StringEncoding] sha1Hash];
  546 +}
  547 +#endif
  548 +
  549 +- (NSString *)valueOfLabel:(NSString *)label
  550 +{
  551 + NSError *error = nil;
  552 +
  553 + NSString *reg = [NSString stringWithFormat:@"(?<=%@\\>).*(?=</%@)", label, label];
  554 + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:reg options:0 error:&error];
  555 +
  556 + if (regex != nil)
  557 + {
  558 + NSTextCheckingResult *firstMatch = [regex firstMatchInString:self options:0 range:NSMakeRange(0, [self length])];
  559 +
  560 + if (firstMatch)
  561 + {
  562 + NSRange resultRange = [firstMatch rangeAtIndex:0];
  563 +
  564 + //从urlString当中截取数据
  565 + NSString *result = [self substringAtRange:resultRange];
  566 + return result;
  567 + }
  568 + }
  569 +
  570 + return nil;
  571 +}
  572 +
  573 +- (NSString *)substringAtRange:(NSRange)rang
  574 +{
  575 + if ([NSString isEmpty:self])
  576 + {
  577 + return nil;
  578 + }
  579 +
  580 + if (rang.location > self.length)
  581 + {
  582 + return nil;
  583 + }
  584 +
  585 + if (rang.location + rang.length > self.length)
  586 + {
  587 + return nil;
  588 + }
  589 +
  590 + return [self substringWithRange:rang];
  591 +}
  592 +
  593 +- (NSString *)emjoiText
  594 +{
  595 + if (self.length)
  596 + {
  597 +
  598 + NSData *data = [self dataUsingEncoding:NSNonLossyASCIIStringEncoding];
  599 + NSString *valueUnicode = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  600 + NSData *dataa = [valueUnicode dataUsingEncoding:NSUTF8StringEncoding];
  601 + NSString *valueEmoj = [[NSString alloc] initWithData:dataa encoding:NSNonLossyASCIIStringEncoding];
  602 + return valueEmoj;
  603 + }
  604 + else
  605 + {
  606 + return self;
  607 + }
  608 +
  609 +}
  610 +
  611 +- (NSUInteger)utf8Length
  612 +{
  613 + size_t length = strlen([self UTF8String]);
  614 + return length;
  615 +}
  616 +
  617 +- (BOOL)isContainsEmoji;
  618 +{
  619 + __block BOOL returnValue = NO;
  620 +
  621 + [self enumerateSubstringsInRange:NSMakeRange(0, [self length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
  622 + const unichar hs = [substring characterAtIndex:0];
  623 + if (0xd800 <= hs && hs <= 0xdbff)
  624 + {
  625 + if (substring.length > 1)
  626 + {
  627 + const unichar ls = [substring characterAtIndex:1];
  628 + const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
  629 + if (0x1d000 <= uc && uc <= 0x1f77f)
  630 + {
  631 + returnValue = YES;
  632 + }
  633 + }
  634 + }
  635 + else if (substring.length > 1)
  636 + {
  637 + const unichar ls = [substring characterAtIndex:1];
  638 + if (ls == 0x20e3)
  639 + {
  640 + returnValue = YES;
  641 + }
  642 + }
  643 + else
  644 + {
  645 + if (0x2100 <= hs && hs <= 0x27ff)
  646 + {
  647 + returnValue = YES;
  648 + }
  649 + else if (0x2B05 <= hs && hs <= 0x2b07)
  650 + {
  651 + returnValue = YES;
  652 + }
  653 + else if (0x2934 <= hs && hs <= 0x2935)
  654 + {
  655 + returnValue = YES;
  656 + }
  657 + else if (0x3297 <= hs && hs <= 0x3299)
  658 + {
  659 + returnValue = YES;
  660 + }
  661 + else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50)
  662 + {
  663 + returnValue = YES;
  664 + }
  665 + }
  666 +
  667 + *stop = returnValue;
  668 + }];
  669 +
  670 + return returnValue;
  671 +}
  672 +
  673 +//递归计算符合规定的文本长度
  674 +- (NSString *)cutBeyondTextInLength:(NSInteger)maxLenth
  675 +{
  676 + size_t length = strlen([self UTF8String]);
  677 + if (length > maxLenth)
  678 + {
  679 + NSString *text = [self substringToIndex:self.length - 1];
  680 + return [text cutBeyondTextInLength:maxLenth];
  681 + }
  682 + else
  683 + {
  684 + return self;
  685 + }
  686 +}
  687 +
  688 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font
  689 +{
  690 + return [self textSizeIn:size font:font breakMode:NSLineBreakByWordWrapping];
  691 +}
  692 +
  693 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)afont breakMode:(NSLineBreakMode)breakMode
  694 +{
  695 + return [self textSizeIn:size font:afont breakMode:NSLineBreakByWordWrapping align:NSTextAlignmentLeft];
  696 +}
  697 +
  698 +- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)afont breakMode:(NSLineBreakMode)abreakMode align:(NSTextAlignment)alignment
  699 +{
  700 + NSLineBreakMode breakMode = abreakMode;
  701 + UIFont *font = (afont != nil) ? afont : UIFontCNMake(14);
  702 +
  703 + CGSize contentSize = CGSizeZero;
  704 +
  705 + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
  706 + paragraphStyle.lineBreakMode = breakMode;
  707 + paragraphStyle.alignment = alignment;
  708 +
  709 + NSDictionary* attributes = @{NSFontAttributeName:font, NSParagraphStyleAttributeName:paragraphStyle};
  710 + contentSize = [self boundingRectWithSize:size options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) attributes:attributes context:nil].size;
  711 + contentSize = CGSizeMake((int)contentSize.width + 1, (int)contentSize.height + 1);
  712 + return contentSize;
  713 +}
  714 +
  715 +#pragma mark 正则表达式验证手机号
  716 ++ (BOOL)isMobileNumber:(NSString *)mobileNum
  717 +{
  718 + /*
  719 + // NSString * MOBILE = @"^0?(13[0-9]|15[012356789]|18[02356789]|14[57])[0-9]{8}$";
  720 + NSString * MOBILE = @"^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8]))[0-9]{8}$";
  721 + NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", MOBILE];
  722 +
  723 + if ([regextestmobile evaluateWithObject:mobileNum])
  724 + {
  725 + return YES;
  726 + }
  727 + else
  728 + {
  729 + return NO;
  730 + }
  731 + */
  732 +
  733 + NSString *phoneRegex = @"^((13[0-9])|(15[^4,\\D])|(18[0-9])|(14[57])|(17[013678]))\\d{8}$";
  734 + NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",phoneRegex];
  735 + return [phoneTest evaluateWithObject:mobileNum];
  736 +}
  737 +
  738 ++ (BOOL)validateCellPhoneNumber:(NSString *)cellNum{
  739 + /**
  740 + * 手机号码
  741 + * 移动:134[0-8],135,136,137,138,139,150,151,157,158,159,182,187,188
  742 + * 联通:130,131,132,152,155,156,185,186
  743 + * 电信:133,1349,153,180,189
  744 + */
  745 + NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";
  746 +
  747 + /**
  748 + 10 * 中国移动:China Mobile
  749 + 11 * 134[0-8],135,136,137,138,139,150,151,157,158,159,182,183,187,188
  750 + 12 */
  751 + NSString * CM = @"^1(34[0-8]|(3[5-9]|5[017-9]|8[2378])\\d)\\d{7}$";
  752 +
  753 + /**
  754 + 15 * 中国联通:China Unicom
  755 + 16 * 130,131,132,152,155,156,166,185,186
  756 + 17 */
  757 + NSString * CU = @"^1(3[0-2]|5[256]|66|8[56])\\d{8}$";
  758 +
  759 + /**
  760 + 20 * 中国电信:China Telecom
  761 + 21 * 133,1349,153,177,180,189
  762 + 22 */
  763 + NSString * CT = @"^1((33|53|77|8[09])[0-9]|349)\\d{7}$";
  764 +
  765 + /**
  766 + 25 * 大陆地区固话及小灵通
  767 + 26 * 区号:010,020,021,022,023,024,025,027,028,029
  768 + 27 * 号码:七位或八位
  769 + 28 */
  770 + // NSString * PHS = @"^0(10|2[0-5789]|\\d{3})\\d{7,8}$";
  771 +
  772 + NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", MOBILE];
  773 + NSPredicate *regextestcm = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CM];
  774 + NSPredicate *regextestcu = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CU];
  775 + NSPredicate *regextestct = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CT];
  776 + // NSPredicate *regextestPHS = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", PHS];
  777 +
  778 + if(([regextestmobile evaluateWithObject:cellNum] == YES)
  779 + || ([regextestcm evaluateWithObject:cellNum] == YES)
  780 + || ([regextestct evaluateWithObject:cellNum] == YES)
  781 + || ([regextestcu evaluateWithObject:cellNum] == YES)){
  782 + return YES;
  783 + }else{
  784 + return NO;
  785 + }
  786 +}
  787 +
  788 ++ (BOOL)stringContainsEmoji:(NSString *)string{
  789 +
  790 + __block BOOL returnValue = NO;
  791 + [string enumerateSubstringsInRange:NSMakeRange(0, [string length])
  792 +
  793 + options:NSStringEnumerationByComposedCharacterSequences
  794 +
  795 + usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
  796 +
  797 + const unichar hs = [substring characterAtIndex:0];
  798 +
  799 + if (0xd800 <= hs && hs <= 0xdbff) {
  800 +
  801 + if (substring.length > 1) {
  802 +
  803 + const unichar ls = [substring characterAtIndex:1];
  804 + const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
  805 + if (0x1d000 <= uc && uc <= 0x1f77f) {
  806 + returnValue = YES;
  807 + }
  808 +
  809 + }
  810 +
  811 + } else if (substring.length > 1) {
  812 +
  813 + const unichar ls = [substring characterAtIndex:1];
  814 + if (ls == 0x20e3) {
  815 + returnValue = YES;
  816 + }
  817 +
  818 + } else {
  819 +
  820 + if (0x2100 <= hs && hs <= 0x27ff) {
  821 + returnValue = YES;
  822 + } else if (0x2B05 <= hs && hs <= 0x2b07) {
  823 + returnValue = YES;
  824 + } else if (0x2934 <= hs && hs <= 0x2935) {
  825 + returnValue = YES;
  826 + } else if (0x3297 <= hs && hs <= 0x3299) {
  827 + returnValue = YES;
  828 + } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b || hs == 0x2b50) {
  829 + returnValue = YES;
  830 + }else if (hs == 0x200d){
  831 + returnValue = YES;
  832 + }
  833 +
  834 + }
  835 +
  836 + }];
  837 +
  838 + return returnValue;
  839 +
  840 +}
  841 +
  842 ++ (NSString *)disable_emoji:(NSString *)text
  843 +
  844 +{
  845 +
  846 + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^\\u0020-\\u007E\\u00A0-\\u00BE\\u2E80-\\uA4CF\\uF900-\\uFAFF\\uFE30-\\uFE4F\\uFF00-\\uFFEF\\u0080-\\u009F\\u2000-\\u201f\r\n]" options:NSRegularExpressionCaseInsensitive error:nil];
  847 +
  848 + NSString *modifiedString = [regex stringByReplacingMatchesInString:text
  849 +
  850 + options:0
  851 +
  852 + range:NSMakeRange(0, [text length])
  853 +
  854 + withTemplate:@""];
  855 +
  856 + return modifiedString;
  857 +
  858 +}
  859 +
  860 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIButton+CNCreateButton.h 0 → 100644
  1 +//
  2 +// UIButton+CNCreateButton.h
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by cnliveJunBo on 2018/5/30.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface UIButton (CNCreateButton)
  12 +
  13 ++ (instancetype)jb_textButton:(NSString *)title fontSize:(CGFloat)fontSize normalColor:(UIColor *)normalColor selectedColor:(UIColor *)selectedColor;
  14 +
  15 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIButton+CNCreateButton.m 0 → 100644
  1 +//
  2 +// UIButton+CNCreateButton.m
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by cnliveJunBo on 2018/5/30.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "UIButton+CNCreateButton.h"
  10 +#import "UIFont+CNLiveExtension.h"
  11 +
  12 +@implementation UIButton (CNCreateButton)
  13 +
  14 ++ (instancetype)jb_textButton:(NSString *)title fontSize:(CGFloat)fontSize normalColor:(UIColor *)normalColor selectedColor:(UIColor *)selectedColor {
  15 +
  16 + UIButton *button = [[self alloc] init];
  17 + [button setTitle:title forState:UIControlStateNormal];
  18 + [button setTitleColor:normalColor forState:UIControlStateNormal];
  19 + [button setTitleColor:selectedColor forState:UIControlStateSelected];
  20 + button.titleLabel.font = UIFontCNMake(fontSize);
  21 + [button sizeToFit];
  22 +
  23 + return button;
  24 +}
  25 +
  26 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIFont+TLChat.h 0 → 100644
  1 +//
  2 +// UIFont+TLChat.h
  3 +// TLChat
  4 +//
  5 +// Created by 李伯坤 on 16/1/27.
  6 +// Copyright © 2016年 李伯坤. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface UIFont (TLChat)
  12 +
  13 +#pragma mark - Common
  14 ++ (UIFont *)fontNavBarTitle;
  15 +
  16 +#pragma mark - Conversation
  17 ++ (UIFont *)fontConversationUsername;
  18 ++ (UIFont *)fontConversationDetail;
  19 ++ (UIFont *)fontConversationTime;
  20 +
  21 +#pragma mark - Friends
  22 ++ (UIFont *)fontFriendsUsername;
  23 +
  24 +#pragma mark - Mine
  25 ++ (UIFont *)fontMineNikename;
  26 ++ (UIFont *)fontMineUsername;
  27 +
  28 +#pragma mark - Setting
  29 ++ (UIFont *)fontSettingHeaderAndFooterTitle;
  30 +
  31 +
  32 +#pragma mark - Chat
  33 ++ (UIFont *)fontTextMessageText;
  34 +
  35 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIFont+TLChat.m 0 → 100644
  1 +//
  2 +// UIFont+TLChat.m
  3 +// TLChat
  4 +//
  5 +// Created by 李伯坤 on 16/1/27.
  6 +// Copyright © 2016年 李伯坤. All rights reserved.
  7 +//
  8 +
  9 +#import "UIFont+TLChat.h"
  10 +#import "UIFont+CNLiveExtension.h"
  11 +
  12 +@implementation UIFont (TLChat)
  13 +
  14 ++ (UIFont *) fontNavBarTitle
  15 +{
  16 + return [UIFont boldSystemFontOfSize:17.5f];
  17 +}
  18 +
  19 ++ (UIFont *) fontConversationUsername
  20 +{
  21 + return UIFontCNMake(17.0f);
  22 +}
  23 +
  24 ++ (UIFont *) fontConversationDetail
  25 +{
  26 + return UIFontCNMake(14.0f);
  27 +}
  28 +
  29 ++ (UIFont *) fontConversationTime
  30 +{
  31 + return UIFontCNMake(12.5f);
  32 +}
  33 +
  34 ++ (UIFont *) fontFriendsUsername
  35 +{
  36 + return UIFontCNMake(17.0f);
  37 +}
  38 +
  39 ++ (UIFont *) fontMineNikename
  40 +{
  41 + return UIFontCNMake(17.0f);
  42 +}
  43 +
  44 ++ (UIFont *) fontMineUsername
  45 +{
  46 + return UIFontCNMake(14.0f);
  47 +}
  48 +
  49 ++ (UIFont *) fontSettingHeaderAndFooterTitle
  50 +{
  51 + return UIFontCNMake(14.0f);
  52 +}
  53 +
  54 ++ (UIFont *)fontTextMessageText
  55 +{
  56 + CGFloat size = [[NSUserDefaults standardUserDefaults] doubleForKey:@"CHAT_FONT_SIZE"];
  57 + if (size == 0) {
  58 + size = 16.0f;
  59 + }
  60 + return UIFontCNMake(size);
  61 +}
  62 +
  63 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIImage+CNLiveBaseExtension.h 0 → 100644
  1 +//
  2 +// UIImage+CNLiveBaseExtension.h
  3 +// CNLiveBaseKit
  4 +//
  5 +// Created by 张旭 on 2018/12/13.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface UIImage (CNLiveBaseExtension)
  13 +
  14 +- (void)saveToCacheWithKey:(NSString *)key;
  15 +
  16 ++ (UIImage *)loadFromCacheWithKey:(NSString *)key;
  17 +
  18 ++ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
  19 +
  20 ++ (UIImage *)randomColorImageWith:(CGSize)size;
  21 +@end
  22 +
  23 +NS_ASSUME_NONNULL_END
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIImage+CNLiveBaseExtension.m 0 → 100644
  1 +//
  2 +// UIImage+CNLiveBaseExtension.m
  3 +// CNLiveBaseKit
  4 +//
  5 +// Created by 张旭 on 2018/12/13.
  6 +//
  7 +
  8 +#import "UIImage+CNLiveBaseExtension.h"
  9 +#import "PathHeaders.h"
  10 +#import "NSString+Common.h"
  11 +#import "UIColor+MLPFlatColors.h"
  12 +
  13 +@implementation UIImage (CNLiveBaseExtension)
  14 +
  15 +- (void)saveToCacheWithKey:(NSString *)key
  16 +{
  17 + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  18 +
  19 + NSString *tmpPath = [PathUtility imageCachePath];
  20 + NSString *imagePath = [NSString stringWithFormat:@"%@/%@", tmpPath, [key md5]];
  21 +
  22 + NSData *data = nil;
  23 + if (UIImagePNGRepresentation(self) == nil)
  24 + {
  25 + data = UIImageJPEGRepresentation(self, 1);
  26 + }
  27 + else
  28 + {
  29 + data = UIImagePNGRepresentation(self);
  30 + }
  31 + [data writeToFile:imagePath atomically:YES];
  32 + });
  33 +}
  34 +
  35 ++ (UIImage *)loadFromCacheWithKey:(NSString *)key
  36 +{
  37 + NSString *tmpPath = [PathUtility imageCachePath];
  38 + NSString *imagePath = [NSString stringWithFormat:@"%@/%@", tmpPath, [key md5]];
  39 + return [UIImage imageWithContentsOfFile:imagePath];
  40 +}
  41 +
  42 ++ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size
  43 +{
  44 + if (color == nil) {
  45 + return nil;
  46 + }
  47 +
  48 + CGRect rect=CGRectMake(0.0f, 0.0f, size.width, size.height);
  49 + UIGraphicsBeginImageContext(rect.size);
  50 + CGContextRef context = UIGraphicsGetCurrentContext();
  51 + CGContextSetFillColorWithColor(context, [color CGColor]);
  52 + CGContextFillRect(context, rect);
  53 + UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
  54 + UIGraphicsEndImageContext();
  55 + return theImage;
  56 +}
  57 +
  58 ++ (UIImage *)randomColorImageWith:(CGSize)size
  59 +{
  60 + UIColor *randomColor = [UIColor randomFlatColor];
  61 + return [UIImage imageWithColor:randomColor size:size];
  62 +}
  63 +
  64 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIView+CNAlertView.h 0 → 100644
  1 +//
  2 +// UIView+CNAlertView.h
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 流诗语 on 2018/3/20.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +typedef void (^CNAlertBlock)(UIButton * button,NSInteger didRow);
  12 +
  13 +@interface UIView (CNAlertView)
  14 +
  15 +/**
  16 + 文字弹出框
  17 +
  18 + @param array 文字数组
  19 + @param color 文字颜色
  20 + @param font 文字大小
  21 + @param actionBlock 点击方法返回
  22 + */
  23 +-(void)createAlertViewTitleArray:(NSArray* )array textColor:(id )color font:(UIFont*)font actionBlock:(CNAlertBlock)actionBlock;
  24 +/**
  25 + 文字弹出框,用于自定义文字颜色 和 大小
  26 + @param array 文字数组
  27 + @param colorArray 文字颜色数组
  28 + @param fontArray 文字大小数组
  29 + @param actionBlock 点击方法返回
  30 + */
  31 +- (void)createAlertViewTitleArray:(NSArray* )array textColorArray:(NSArray<UIColor*>*)colorArray font:(NSArray <UIFont *>*)fontArray actionBlock:(CNAlertBlock)actionBlock;
  32 +/**
  33 + 底部弹出框视图
  34 +
  35 + @param array 主标题arr
  36 + @param subTitleArr 子标题arr
  37 + @param color 主标题颜色
  38 + @param subTitleColor 子标题颜色
  39 + @param font 主标题字体
  40 + @param subFont 子标题字体
  41 + @param actionBlock 点击回调
  42 + */
  43 +- (void)createAlertViewTitleArray:(NSArray <NSString *>* )array subTitleArr:(NSArray <NSString *>*)subTitleArr textColor:(id)color subTitleColor:(id)subTitleColor font:(UIFont*)font subFont:(UIFont *)subFont actionBlock:(CNAlertBlock)actionBlock;
  44 +
  45 +- (void)createAlertViewTitleArray:(NSArray <NSString *>* )array subTitleArr:(NSArray <NSString *>*)subTitleArr textColor:(id)color subTitleColor:(id)subTitleColor firstFont:(UIFont *)firstFont font:(UIFont*)font subFont:(UIFont *)subFont cancelTitle:(NSString *)cancelTitle cancelFont:(UIFont *)cancelFont cancelTitleColor:(UIColor *)cancelTitleColor actionBlock:(CNAlertBlock)actionBlock;
  46 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIView+CNAlertView.m 0 → 100644
  1 +//
  2 +// UIView+CNAlertView.m
  3 +// CNLiveNetAdd
  4 +//
  5 +// Created by 流诗语 on 2018/3/20.
  6 +// Copyright © 2018年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "UIView+CNAlertView.h"
  10 +#import <objc/runtime.h>
  11 +#import "NSString+CNLiveExtension.h"
  12 +#import "CNLiveDefinesHeader.h"
  13 +#import "UIView+Extension.h"
  14 +
  15 +#define APPSIZE [[UIScreen mainScreen] bounds].size
  16 +
  17 +@implementation UIView (CNAlertView)
  18 +UIView *backgroundV;
  19 +UIView *bottomView;
  20 +float height;
  21 +
  22 +static NSString *keyOfMethod;
  23 +
  24 +//方法实现
  25 +-(void)createAlertViewTitleArray:(NSArray* )array textColor:(id )color font:(UIFont*)font actionBlock:(CNAlertBlock)actionBlock
  26 +{
  27 + if (backgroundV != nil && bottomView != nil) return;
  28 +
  29 + UIWindow *window = [UIApplication sharedApplication].keyWindow;
  30 +
  31 + backgroundV = [[UIView alloc]initWithFrame:window.bounds];
  32 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0);
  33 +
  34 + [window addSubview:backgroundV];
  35 +
  36 + //点击手势
  37 + UITapGestureRecognizer *touchDown = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(didMiss)];
  38 + touchDown.numberOfTapsRequired = 1;
  39 + [backgroundV addGestureRecognizer:touchDown];
  40 +
  41 + height = array.count*50+array.count*0.5+57.5+kVerticalBottomSafeHeight;
  42 +
  43 + bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, APPSIZE.height, APPSIZE.width, height+50)];
  44 + bottomView.backgroundColor = [UIColor whiteColor];
  45 + [window addSubview:bottomView];
  46 +
  47 + NSArray *arrayColor;
  48 + UIColor *colors;
  49 +
  50 + for (int i=0; i<array.count; i++) {
  51 +
  52 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, i*50+i*0.5, APPSIZE.width, 50)];
  53 +
  54 + [btn setTitle:array[i] forState:UIControlStateNormal];
  55 +
  56 +// if (arrayImage) {
  57 +// if (i>=arrayImage.count) {
  58 +// DebugLog(@"数组越界-数组图片数量有误,请仔细检查");
  59 +// return;
  60 +// }
  61 +// [btn setImage:[UIImage imageNamed:arrayImage[i]] forState:UIControlStateNormal];
  62 +// btn.imageView.contentMode = UIViewContentModeScaleAspectFit;
  63 +// btn.imageEdgeInsets = UIEdgeInsetsMake(12, - 0.5 * spacing, 12, 0.5 * spacing);
  64 +// btn.titleEdgeInsets = UIEdgeInsetsMake(0, 0.5 * spacing, 0, - 0.5 * spacing);
  65 +// }
  66 +
  67 +
  68 + btn.tag = 10000+i;
  69 + btn.titleLabel.font = font;
  70 + [bottomView addSubview:btn];
  71 + [btn addTarget:self action:@selector(didTitleBtn:) forControlEvents:UIControlEventTouchUpInside];
  72 + [btn addTarget:self action:@selector(didTitleBtnTouchDragInside:) forControlEvents:UIControlEventTouchDragInside];
  73 + [btn addTarget:self action:@selector(didTitleBtnTouchDragOutsid:) forControlEvents:UIControlEventTouchDragOutside];
  74 +
  75 +
  76 + //关联 block
  77 + objc_setAssociatedObject (btn , &keyOfMethod, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
  78 + if (i!=array.count-1) {
  79 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(btn.frame), APPSIZE.width, 0.5)];
  80 + line.backgroundColor = RGBA(230, 230, 230, 1);
  81 + [bottomView addSubview:line];
  82 + }
  83 + //如果是数组颜色
  84 + if ([color isKindOfClass:[NSArray class]]) {
  85 + arrayColor = [NSArray arrayWithArray:color];
  86 + if (i>=arrayColor.count) {
  87 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  88 + return;
  89 + }
  90 + colors = arrayColor[i];
  91 + }else{
  92 + colors = (UIColor*)color;
  93 + }
  94 + [btn setTitleColor:colors forState:UIControlStateNormal];
  95 +
  96 + }
  97 +
  98 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, array.count*50.5-0.5, APPSIZE.width, 8)];
  99 + line.backgroundColor = RGBA(239, 239, 239, 1);
  100 + [bottomView addSubview:line];
  101 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(line.frame), APPSIZE.width, 50)];
  102 + [btn setTitle:@"取消" forState:UIControlStateNormal];
  103 + [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
  104 + btn.titleLabel.font = [UIFont systemFontOfSize:16];
  105 + [bottomView addSubview:btn];
  106 + [btn addTarget:self action:@selector(didMiss) forControlEvents:UIControlEventTouchUpInside];
  107 +
  108 + [UIView animateWithDuration:0.3 animations:^{
  109 + bottomView.frame = CGRectMake(0, APPSIZE.height-height, APPSIZE.width, height);
  110 + }];
  111 +
  112 + [UIView animateWithDuration:0.3 animations:^{
  113 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0.3);
  114 + } completion:^(BOOL finished) {
  115 +
  116 + }];
  117 +}
  118 +- (void)createAlertViewTitleArray:(NSArray* )array textColorArray:(NSArray<UIColor*>*)colorArray font:(NSArray <UIFont *>*)fontArray actionBlock:(CNAlertBlock)actionBlock
  119 +{
  120 + if (backgroundV != nil && bottomView != nil) return;
  121 +
  122 + UIWindow *window = [UIApplication sharedApplication].keyWindow;
  123 +
  124 + backgroundV = [[UIView alloc]initWithFrame:window.bounds];
  125 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0);
  126 +
  127 + [window addSubview:backgroundV];
  128 +
  129 + //点击手势
  130 + UITapGestureRecognizer *touchDown = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(didMiss)];
  131 + touchDown.numberOfTapsRequired = 1;
  132 + [backgroundV addGestureRecognizer:touchDown];
  133 +
  134 + height = array.count*50+array.count*0.5+57.5+kVerticalBottomSafeHeight;
  135 +
  136 + bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, APPSIZE.height, APPSIZE.width, height+50)];
  137 + bottomView.backgroundColor = [UIColor whiteColor];
  138 + [window addSubview:bottomView];
  139 +
  140 +
  141 + for (int i=0; i<array.count; i++) {
  142 +
  143 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, i*50+i*0.5, APPSIZE.width, 50)];
  144 +
  145 + [btn setTitle:array[i] forState:UIControlStateNormal];
  146 +
  147 + // if (arrayImage) {
  148 + // if (i>=arrayImage.count) {
  149 + // DebugLog(@"数组越界-数组图片数量有误,请仔细检查");
  150 + // return;
  151 + // }
  152 + // [btn setImage:[UIImage imageNamed:arrayImage[i]] forState:UIControlStateNormal];
  153 + // btn.imageView.contentMode = UIViewContentModeScaleAspectFit;
  154 + // btn.imageEdgeInsets = UIEdgeInsetsMake(12, - 0.5 * spacing, 12, 0.5 * spacing);
  155 + // btn.titleEdgeInsets = UIEdgeInsetsMake(0, 0.5 * spacing, 0, - 0.5 * spacing);
  156 + // }
  157 +
  158 +
  159 + btn.tag = 10000+i;
  160 +
  161 + [bottomView addSubview:btn];
  162 + [btn addTarget:self action:@selector(didTitleBtn:) forControlEvents:UIControlEventTouchUpInside];
  163 + [btn addTarget:self action:@selector(didTitleBtnTouchDragInside:) forControlEvents:UIControlEventTouchDragInside];
  164 + [btn addTarget:self action:@selector(didTitleBtnTouchDragOutsid:) forControlEvents:UIControlEventTouchDragOutside];
  165 +
  166 +
  167 + //关联 block
  168 + objc_setAssociatedObject (btn , &keyOfMethod, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
  169 + if (i!=array.count-1) {
  170 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(btn.frame), APPSIZE.width, 0.5)];
  171 + line.backgroundColor = RGBA(230, 230, 230, 1);
  172 + [bottomView addSubview:line];
  173 + }
  174 + if (i>=fontArray.count) {
  175 + DebugLog(@"数组越界-数组字体大小 数量有误,请仔细检查");
  176 + return;
  177 + }
  178 + btn.titleLabel.font = fontArray[i];
  179 + if (i>=colorArray.count) {
  180 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  181 + return;
  182 + }
  183 +
  184 + [btn setTitleColor:colorArray[i] forState:UIControlStateNormal];
  185 +
  186 + }
  187 +
  188 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, array.count*50.5-0.5, APPSIZE.width, 8)];
  189 + line.backgroundColor = RGBA(239, 239, 239, 1);
  190 + [bottomView addSubview:line];
  191 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(line.frame), APPSIZE.width, 50)];
  192 + [btn setTitle:@"取消" forState:UIControlStateNormal];
  193 + [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
  194 + btn.titleLabel.font = [UIFont systemFontOfSize:16];
  195 + [bottomView addSubview:btn];
  196 + [btn addTarget:self action:@selector(didMiss) forControlEvents:UIControlEventTouchUpInside];
  197 +
  198 + [UIView animateWithDuration:0.3 animations:^{
  199 + bottomView.frame = CGRectMake(0, APPSIZE.height-height, APPSIZE.width, height);
  200 + }];
  201 +
  202 + [UIView animateWithDuration:0.3 animations:^{
  203 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0.3);
  204 + } completion:^(BOOL finished) {
  205 +
  206 + }];
  207 +}
  208 +- (void)createAlertViewTitleArray:(NSArray <NSString *>* )array subTitleArr:(NSArray <NSString *>*)subTitleArr textColor:(id)color subTitleColor:(id)subTitleColor font:(UIFont*)font subFont:(UIFont *)subFont actionBlock:(CNAlertBlock)actionBlock
  209 +{
  210 + UIWindow *window = [UIApplication sharedApplication].keyWindow;
  211 + backgroundV = [[UIView alloc]initWithFrame:window.bounds];
  212 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0);
  213 + [window addSubview:backgroundV];
  214 +
  215 + //点击手势
  216 + UITapGestureRecognizer *touchDown = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(didMiss)];
  217 + touchDown.numberOfTapsRequired = 1;
  218 + [backgroundV addGestureRecognizer:touchDown];
  219 +
  220 + height = array.count*50+array.count*0.5+57.5+kVerticalBottomSafeHeight;
  221 + bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, APPSIZE.height, APPSIZE.width, height+50)];
  222 + bottomView.backgroundColor = [UIColor whiteColor];
  223 + [window addSubview:bottomView];
  224 +
  225 + NSArray *arrayColor;
  226 + UIColor *colors;
  227 +
  228 + NSArray *subArrayColor = [NSArray array];
  229 + UIColor *subColors;
  230 + CGFloat totalHeight = 0;
  231 +
  232 + for (int i=0; i<array.count; i++) {
  233 + UIButton *btn;
  234 + NSString *subTitle = [subTitleArr objectAtIndex:i];
  235 + if ([subTitle isEmptyString]) {
  236 + btn = [[UIButton alloc]initWithFrame:CGRectMake(0, totalHeight+i*0.5, APPSIZE.width, 50)];
  237 + [btn setTitle:array[i] forState:UIControlStateNormal];
  238 + //如果是数组颜色
  239 + if ([color isKindOfClass:[NSArray class]]) {
  240 + arrayColor = [NSArray arrayWithArray:color];
  241 + if (i>=arrayColor.count) {
  242 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  243 + return;
  244 + }
  245 + colors = arrayColor[i];
  246 + }else{
  247 + colors = (UIColor*)color;
  248 + }
  249 + [btn setTitleColor:colors forState:UIControlStateNormal];
  250 + }else{
  251 + height += 17;
  252 + btn = [[UIButton alloc]initWithFrame:CGRectMake(0, totalHeight+i*0.5, APPSIZE.width, 67)];
  253 + UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, btn.width, 15)];
  254 + titleLabel.text = array[i];
  255 + titleLabel.font = font;
  256 + //如果是数组颜色
  257 + if ([subTitleColor isKindOfClass:[NSArray class]]) {
  258 + subArrayColor = [NSArray arrayWithArray:subTitleColor];
  259 + if (i >= subArrayColor.count) {
  260 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  261 + return;
  262 + }
  263 + subColors = subArrayColor[i];
  264 + }else{
  265 + subColors = (UIColor*)subArrayColor;
  266 + }
  267 + titleLabel.textColor = subColors;
  268 + titleLabel.textAlignment = NSTextAlignmentCenter;
  269 + [btn addSubview:titleLabel];
  270 +
  271 + UILabel *subTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLabel.bottom+5, btn.width, 12)];
  272 + subTitleLabel.text = subTitle;
  273 + subTitleLabel.font = subFont;
  274 + subTitleLabel.textAlignment = NSTextAlignmentCenter;
  275 + [btn addSubview:subTitleLabel];
  276 + //如果是数组颜色
  277 + if ([subTitleColor isKindOfClass:[NSArray class]]) {
  278 + subArrayColor = [NSArray arrayWithArray:subTitleColor];
  279 + if (i>=subArrayColor.count) {
  280 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  281 + return;
  282 + }
  283 + subColors = subArrayColor[i];
  284 + }else{
  285 + subColors = (UIColor*)color;
  286 + }
  287 + [subTitleLabel setTextColor:subColors];
  288 + }
  289 + totalHeight += btn.height;
  290 +
  291 + btn.tag = 10000+i;
  292 + btn.titleLabel.font = font;
  293 + [bottomView addSubview:btn];
  294 + [btn addTarget:self action:@selector(didTitleBtn:) forControlEvents:UIControlEventTouchUpInside];
  295 + [btn addTarget:self action:@selector(didTitleBtnTouchDragInside:) forControlEvents:UIControlEventTouchDragInside];
  296 + [btn addTarget:self action:@selector(didTitleBtnTouchDragOutsid:) forControlEvents:UIControlEventTouchDragOutside];
  297 +
  298 +
  299 + //关联 block
  300 + objc_setAssociatedObject (btn , &keyOfMethod, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
  301 + if (i!=array.count-1) {
  302 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(btn.frame), APPSIZE.width, 0.5)];
  303 + line.backgroundColor = RGBA(230, 230, 230, 1);
  304 + [bottomView addSubview:line];
  305 + }
  306 + }
  307 +
  308 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, totalHeight-0.5, APPSIZE.width, 8)];
  309 + line.backgroundColor = RGBA(239, 239, 239, 1);
  310 + [bottomView addSubview:line];
  311 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(line.frame), APPSIZE.width, 50)];
  312 + [btn setTitle:@"取消" forState:UIControlStateNormal];
  313 + [btn setTitleColor:color forState:UIControlStateNormal];
  314 + btn.titleLabel.font = font;
  315 + [bottomView addSubview:btn];
  316 + [btn addTarget:self action:@selector(didMiss:) forControlEvents:UIControlEventTouchUpInside];
  317 + [UIView animateWithDuration:0.3 animations:^{
  318 + bottomView.frame = CGRectMake(0, APPSIZE.height-height, APPSIZE.width, height);
  319 + }];
  320 +
  321 + [UIView animateWithDuration:0.3 animations:^{
  322 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0.3);
  323 + } completion:^(BOOL finished) {
  324 +
  325 + }];
  326 +}
  327 +
  328 +- (void)createAlertViewTitleArray:(NSArray <NSString *>* )array subTitleArr:(NSArray <NSString *>*)subTitleArr textColor:(id)color subTitleColor:(id)subTitleColor firstFont:(UIFont *)firstFont font:(UIFont*)font subFont:(UIFont *)subFont cancelTitle:(NSString *)cancelTitle cancelFont:(UIFont *)cancelFont cancelTitleColor:(UIColor *)cancelTitleColor actionBlock:(CNAlertBlock)actionBlock
  329 +{
  330 + UIWindow *window = [UIApplication sharedApplication].keyWindow;
  331 + backgroundV = [[UIView alloc]initWithFrame:window.bounds];
  332 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0);
  333 + [window addSubview:backgroundV];
  334 +
  335 + //点击手势
  336 + UITapGestureRecognizer *touchDown = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(didMiss)];
  337 + touchDown.numberOfTapsRequired = 1;
  338 + [backgroundV addGestureRecognizer:touchDown];
  339 +
  340 +// height = array.count*50+array.count*0.5+57.5;
  341 + height = array.count*50+array.count*0.5+57.5+kVerticalBottomSafeHeight;
  342 +
  343 + bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, APPSIZE.height, APPSIZE.width, height+50)];
  344 + bottomView.backgroundColor = [UIColor whiteColor];
  345 + [window addSubview:bottomView];
  346 +
  347 + NSArray *arrayColor;
  348 + UIColor *colors;
  349 +
  350 + NSArray *subArrayColor = [NSArray array];
  351 + UIColor *subColors;
  352 + CGFloat totalHeight = 0;
  353 +
  354 + for (int i=0; i<array.count; i++) {
  355 + UIButton *btn;
  356 + NSString *subTitle = [subTitleArr objectAtIndex:i];
  357 + if ([subTitle isEmptyString]) {
  358 + btn = [[UIButton alloc]initWithFrame:CGRectMake(0, totalHeight+i*0.5, APPSIZE.width, 50)];
  359 + [btn setTitle:array[i] forState:UIControlStateNormal];
  360 + //如果是数组颜色
  361 + if ([color isKindOfClass:[NSArray class]]) {
  362 + arrayColor = [NSArray arrayWithArray:color];
  363 + if (i>=arrayColor.count) {
  364 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  365 + return;
  366 + }
  367 + colors = arrayColor[i];
  368 + }else{
  369 + colors = (UIColor*)color;
  370 + }
  371 + [btn setTitleColor:colors forState:UIControlStateNormal];
  372 + if (i == 0) {
  373 + [btn.titleLabel setFont:firstFont];
  374 + }else
  375 + {
  376 + [btn.titleLabel setFont:font];
  377 + }
  378 + }else{
  379 + height += 17;
  380 + btn = [[UIButton alloc]initWithFrame:CGRectMake(0, totalHeight+i*0.5, APPSIZE.width, 67)];
  381 + UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, btn.width, 15)];
  382 + titleLabel.text = array[i];
  383 + titleLabel.font = font;
  384 + if (i == 0) {
  385 + titleLabel.font = firstFont;
  386 + }
  387 + //如果是数组颜色
  388 + if ([subTitleColor isKindOfClass:[NSArray class]]) {
  389 + subArrayColor = [NSArray arrayWithArray:subTitleColor];
  390 + if (i >= subArrayColor.count) {
  391 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  392 + return;
  393 + }
  394 + subColors = subArrayColor[i];
  395 + }else{
  396 + subColors = (UIColor*)subArrayColor;
  397 + }
  398 + titleLabel.textColor = subColors;
  399 + titleLabel.textAlignment = NSTextAlignmentCenter;
  400 + [btn addSubview:titleLabel];
  401 +
  402 + UILabel *subTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, titleLabel.bottom+5, btn.width, 12)];
  403 + subTitleLabel.text = subTitle;
  404 + subTitleLabel.font = subFont;
  405 + subTitleLabel.textAlignment = NSTextAlignmentCenter;
  406 + [btn addSubview:subTitleLabel];
  407 + //如果是数组颜色
  408 + if ([subTitleColor isKindOfClass:[NSArray class]]) {
  409 + subArrayColor = [NSArray arrayWithArray:subTitleColor];
  410 + if (i>=subArrayColor.count) {
  411 + DebugLog(@"数组越界-数组图片颜色数量有误,请仔细检查");
  412 + return;
  413 + }
  414 + subColors = subArrayColor[i];
  415 + }else{
  416 + subColors = (UIColor*)color;
  417 + }
  418 + [subTitleLabel setTextColor:subColors];
  419 + }
  420 + totalHeight += btn.height;
  421 +
  422 + btn.tag = 10000+i;
  423 + [bottomView addSubview:btn];
  424 + [btn addTarget:self action:@selector(didTitleBtn:) forControlEvents:UIControlEventTouchUpInside];
  425 + [btn addTarget:self action:@selector(didTitleBtnTouchDragInside:) forControlEvents:UIControlEventTouchDragInside];
  426 + [btn addTarget:self action:@selector(didTitleBtnTouchDragOutsid:) forControlEvents:UIControlEventTouchDragOutside];
  427 +
  428 +
  429 + //关联 block
  430 + objc_setAssociatedObject (btn , &keyOfMethod, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
  431 + if (i!=array.count-1) {
  432 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(btn.frame), APPSIZE.width, 0.5)];
  433 + line.backgroundColor = RGBA(230, 230, 230, 1);
  434 + [bottomView addSubview:line];
  435 + }
  436 + }
  437 +
  438 + UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, totalHeight-0.5, APPSIZE.width, 8)];
  439 + line.backgroundColor = RGBA(239, 239, 239, 1);
  440 + [bottomView addSubview:line];
  441 + UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(line.frame), APPSIZE.width, 50)];
  442 + [btn setTitle:cancelTitle forState:UIControlStateNormal];
  443 + [btn setTitleColor:cancelTitleColor forState:UIControlStateNormal];
  444 + btn.titleLabel.font = cancelFont;
  445 + [bottomView addSubview:btn];
  446 + [btn addTarget:self action:@selector(didMiss:) forControlEvents:UIControlEventTouchUpInside];
  447 + objc_setAssociatedObject (btn , &keyOfMethod, actionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
  448 + [UIView animateWithDuration:0.3 animations:^{
  449 + bottomView.frame = CGRectMake(0, APPSIZE.height-height, APPSIZE.width, height);
  450 + }];
  451 +
  452 + [UIView animateWithDuration:0.3 animations:^{
  453 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0.3);
  454 + } completion:^(BOOL finished) {
  455 +
  456 + }];
  457 +}
  458 +
  459 +-(void)didTitleBtnTouchDragOutsid:(UIButton*)btn{
  460 +
  461 + btn.backgroundColor = [UIColor clearColor];
  462 +}
  463 +-(void)didTitleBtnTouchDragInside:(UIButton*)btn{
  464 + btn.backgroundColor = RGBA(245, 245, 245, 1);
  465 +}
  466 +
  467 +-(void)didTitleBtn:(UIButton*)btn{
  468 +
  469 + btn.backgroundColor = [UIColor clearColor];
  470 + //获取关联
  471 + CNAlertBlock block1 = (CNAlertBlock)objc_getAssociatedObject(btn, &keyOfMethod);
  472 + if(block1){
  473 + block1(btn,btn.tag-10000);
  474 + [self didMiss];
  475 + }
  476 +}
  477 +
  478 +-(void)didMiss:(UIButton*)btn{
  479 + [self didMiss];
  480 + CNAlertBlock block1 = (CNAlertBlock)objc_getAssociatedObject(btn, &keyOfMethod);
  481 + if(block1){
  482 + block1(btn,1000);
  483 + }
  484 +}
  485 +
  486 +-(void)didMiss{
  487 +
  488 + [UIView animateWithDuration:0.3 animations:^{
  489 + backgroundV.backgroundColor = RGBA(0, 0, 0, 0);
  490 + bottomView.frame = CGRectMake(0, APPSIZE.height, APPSIZE.width, height+50);
  491 + } completion:^(BOOL finished) {
  492 + [backgroundV removeFromSuperview];
  493 + [bottomView removeFromSuperview];
  494 + backgroundV = nil;
  495 + bottomView = nil;
  496 + }];
  497 +}
  498 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIView+Extension.h 0 → 100644
  1 +//
  2 +// UIView+Extension.h
  3 +// CNLive
  4 +//
  5 +// Created by 雷浩杰 on 15/9/1.
  6 +// Copyright (c) 2015年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface UIView (Extension)
  12 +
  13 +@property (assign, nonatomic) CGFloat x;
  14 +@property (assign, nonatomic) CGFloat y;
  15 +@property (assign, nonatomic) CGFloat width;
  16 +@property (assign, nonatomic) CGFloat height;
  17 +@property (assign, nonatomic) CGSize size;
  18 +@property (assign, nonatomic) CGPoint origin;
  19 +@property (nonatomic ,assign) CGFloat left;
  20 +@property (assign, nonatomic) CGFloat right;
  21 +@property (nonatomic ,assign) CGFloat top;
  22 +@property (assign, nonatomic) CGFloat bottom;
  23 +
  24 +@property (nonatomic, assign) CGFloat centerX;
  25 +@property (nonatomic, assign) CGFloat centerY;
  26 +
  27 +
  28 +
  29 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Categorys/UIView+Extension.m 0 → 100644
  1 +//
  2 +// UIView+Extension.m
  3 +// CNLive
  4 +//
  5 +// Created by 雷浩杰 on 15/9/1.
  6 +// Copyright (c) 2015年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import "UIView+Extension.h"
  10 +
  11 +@implementation UIView (Extension)
  12 +
  13 +- (void)setX:(CGFloat)x
  14 +{
  15 + CGRect frame = self.frame;
  16 + frame.origin.x = x;
  17 + self.frame = frame;
  18 +}
  19 +
  20 +- (CGFloat)x
  21 +{
  22 + return self.frame.origin.x;
  23 +}
  24 +
  25 +- (void)setY:(CGFloat)y
  26 +{
  27 + CGRect frame = self.frame;
  28 + frame.origin.y = y;
  29 + self.frame = frame;
  30 +}
  31 +
  32 +- (CGFloat)y
  33 +{
  34 + return self.frame.origin.y;
  35 +}
  36 +
  37 +- (void)setWidth:(CGFloat)width
  38 +{
  39 + CGRect frame = self.frame;
  40 + frame.size.width = width;
  41 + self.frame = frame;
  42 +}
  43 +
  44 +- (CGFloat)width
  45 +{
  46 + return self.frame.size.width;
  47 +}
  48 +
  49 +- (void)setHeight:(CGFloat)height
  50 +{
  51 + CGRect frame = self.frame;
  52 + frame.size.height = height;
  53 + self.frame = frame;
  54 +}
  55 +
  56 +- (CGFloat)height
  57 +{
  58 + return self.frame.size.height;
  59 +}
  60 +
  61 +- (void)setSize:(CGSize)size
  62 +{
  63 + CGRect frame = self.frame;
  64 + frame.size = size;
  65 + self.frame = frame;
  66 +}
  67 +
  68 +- (CGSize)size
  69 +{
  70 + return self.frame.size;
  71 +}
  72 +
  73 +- (void)setOrigin:(CGPoint)origin
  74 +{
  75 + CGRect frame = self.frame;
  76 + frame.origin = origin;
  77 + self.frame = frame;
  78 +}
  79 +
  80 +- (CGPoint)origin
  81 +{
  82 + return self.frame.origin;
  83 +}
  84 +
  85 +- (void)setRight:(CGFloat)right
  86 +{
  87 + CGRect frame = self.frame;
  88 + frame.origin.x = right-frame.size.width;
  89 + self.frame = frame;
  90 +}
  91 +
  92 +- (CGFloat)right
  93 +{
  94 + return self.frame.size.width + self.frame.origin.x;
  95 +}
  96 +
  97 +- (void)setBottom:(CGFloat)bottom
  98 +{
  99 + CGRect frame = self.frame;
  100 + frame.origin.y = bottom-frame.size.height;
  101 + self.frame = frame;
  102 +}
  103 +
  104 +- (CGFloat)bottom
  105 +{
  106 + return self.frame.size.height + self.frame.origin.y;
  107 +}
  108 +
  109 +- (void)setCenterX:(CGFloat)centerX
  110 +{
  111 + CGPoint center = self.center;
  112 + center.x = centerX;
  113 + self.center = center;
  114 +}
  115 +
  116 +- (CGFloat) centerX
  117 +{
  118 + return self.center.x;
  119 +}
  120 +
  121 +- (void)setCenterY:(CGFloat) centerY{
  122 + CGPoint center = self.center;
  123 + center.y = centerY;
  124 + self.center = center;
  125 +}
  126 +
  127 +- (CGFloat) centerY
  128 +{
  129 + return self.center.y;
  130 +}
  131 +
  132 +- (void)setTop:(CGFloat ) top{
  133 + CGRect frame = self.frame;
  134 + frame.origin.y = top;
  135 + self.frame = frame;
  136 +}
  137 +
  138 +- (CGFloat) top
  139 +{
  140 + return CGRectGetMinY(self.frame);
  141 +}
  142 +
  143 +- (void)setLeft:(CGFloat) left{
  144 + CGRect frame = self.frame;
  145 + frame.origin.x = left;
  146 + self.frame = frame;
  147 +}
  148 +
  149 +- (CGFloat) left
  150 +{
  151 + return self.frame.origin.x;
  152 +}
  153 +
  154 +
  155 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Color/ColorHeaders.h 0 → 100644
  1 +//
  2 +// ColorHeaders.h
  3 +// CommonLibrary
  4 +//
  5 +// Created by Alexi on 3/6/14.
  6 +// Copyright (c) 2014 CommonLibrary. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CommonLibrary_ColorHeaders_h
  10 +#define CommonLibrary_ColorHeaders_h
  11 +
  12 +#import "ColorMacro.h"
  13 +#import "UIColor+MLPFlatColors.h"
  14 +
  15 +#endif
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Color/ColorMacro.h 0 → 100644
  1 +//
  2 +// ColorMarcro.h
  3 +// CommonLibrary
  4 +//
  5 +// Created by Alexi on 13-10-23.
  6 +// Copyright (c) 2013年 ywchen. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CommonLibrary_ColorMarcro_h
  10 +#define CommonLibrary_ColorMarcro_h
  11 +
  12 +#import "UIColor+MLPFlatColors.h"
  13 +
  14 +
  15 +// 取色值相关的方法
  16 +#define RGB(r,g,b) [UIColor colorWithRed:(r)/255.f \
  17 + green:(g)/255.f \
  18 + blue:(b)/255.f \
  19 + alpha:1.f]
  20 +
  21 +#define RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.f \
  22 + green:(g)/255.f \
  23 + blue:(b)/255.f \
  24 + alpha:(a)]
  25 +
  26 +#define RGBOF(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
  27 + green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
  28 + blue:((float)(rgbValue & 0xFF))/255.0 \
  29 + alpha:1.0]
  30 +
  31 +#define RGBA_OF(rgbValue) [UIColor colorWithRed:((float)(((rgbValue) & 0xFF000000) >> 24))/255.0 \
  32 + green:((float)(((rgbValue) & 0x00FF0000) >> 16))/255.0 \
  33 + blue:((float)(rgbValue & 0x0000FF00) >> 8)/255.0 \
  34 + alpha:((float)(rgbValue & 0x000000FF))/255.0]
  35 +
  36 +#define RGBAOF(v, a) [UIColor colorWithRed:((float)(((v) & 0xFF0000) >> 16))/255.0 \
  37 + green:((float)(((v) & 0x00FF00) >> 8))/255.0 \
  38 + blue:((float)(v & 0x0000FF))/255.0 \
  39 + alpha:a]
  40 +
  41 +
  42 +// 定义通用颜色
  43 +#define kBlackColor [UIColor blackColor]
  44 +#define kDarkGrayColor [UIColor darkGrayColor]
  45 +#define kLightGrayColor [UIColor lightGrayColor]
  46 +#define kWhiteColor [UIColor whiteColor]
  47 +#define kGrayColor [UIColor grayColor]
  48 +#define kRedColor [UIColor redColor]
  49 +#define kGreenColor [UIColor greenColor]
  50 +#define kBlueColor [UIColor blueColor]
  51 +#define kCyanColor [UIColor cyanColor]
  52 +#define kYellowColor [UIColor yellowColor]
  53 +#define kMagentaColor [UIColor magentaColor]
  54 +#define kOrangeColor [UIColor orangeColor]
  55 +#define kPurpleColor [UIColor purpleColor]
  56 +#define kClearColor [UIColor clearColor]
  57 +
  58 +#define kWeChatBgColor RGB(242,242,242)
  59 +#define kTempBlueColor RGB(85,198,242)
  60 +
  61 +#define kRandomFlatColor [UIColor randomFlatColor]
  62 +
  63 +//文字颜色
  64 +#define KTextBlackColor RGB(40, 40, 40)
  65 +#define KBlack51Color RGB(51, 51, 51)
  66 +#define KYellowColor RGB(255, 163, 0)
  67 +#define KYellowHightColor RGB(179, 105, 27)
  68 +#define KUserInfoGrayColor RGB(101, 101, 101)
  69 +#define KGrayBgColor RGB(242, 242, 242)
  70 +#define KGray246BgColor RGB(246, 246, 246)
  71 +#define KSubTitleGrayColor RGB(152, 152, 152)
  72 +#define KGray195Color RGB(195, 195, 195)
  73 +#define KYellow153Color RGB(255, 153, 0)
  74 +#define KGray235Color RGB(235, 235, 235)
  75 +#define KGray102Color RGB(102, 102, 102)
  76 +#define KGray101Color RGB(101, 101, 101)
  77 +#define KGray153Color RGB(153, 153, 153)
  78 +#define KGray187Color RGB(187, 187, 187)
  79 +#define KGray173Color RGB(173, 173, 173)
  80 +#define KGrayLineColor RGB(243, 244, 245)
  81 +#define KOrderButtonGrayColor RGB(88, 92, 94)
  82 +#define KOrderRedColor RGB(255, 51, 85)
  83 +#define KGray227Color RGB(227, 227, 227)
  84 +#define KGray242Color RGB(242, 242, 242)
  85 +#define KGreen194Color RGB(0, 194, 0)
  86 +#define KOrange163Color RGB(255, 163, 0)
  87 +
  88 +#define KCommonLineColor RGB(238, 238, 238)
  89 +#define KCopyLabelBgColor [UIColor qmui_colorWithHexString:@"4bd647"]//RGB(216, 136, 0)
  90 +#define KGreenColor @"00c200"
  91 +
  92 +#define KGrayColor @"626775"
  93 +
  94 +/**
  95 + * UIColor
  96 + */
  97 +#define ZXColorA(r ,g ,b ,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)/255.0]
  98 +#define ZXColor(r ,g ,b) ZXColorA((r),(g),(b),255)
  99 +#define ZXRandomColor ZXColor(arc4random_uniform(255) ,arc4random_uniform(255) ,arc4random_uniform(255))
  100 +
  101 +#endif
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Color/UIColor+MLPFlatColors.h 0 → 100755
  1 +/*
  2 +// UIColor+MLPFlatColors.h
  3 +//
  4 +//
  5 +// Created by Eddy Borja on 4/10/13.
  6 +// Copyright (c) 2013 Mainloop LLC. All rights reserved.
  7 +//
  8 +
  9 + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  10 +
  11 + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  12 +
  13 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  14 + */
  15 +
  16 +
  17 +#import <UIKit/UIKit.h>
  18 +#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
  19 + green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
  20 + blue:((float)(rgbValue & 0xFF))/255.0 \
  21 + alpha:1.0]
  22 +
  23 +@interface UIColor (MLPFlatColors)
  24 +
  25 ++ (UIColor *)flatRedColor;
  26 ++ (UIColor *)flatDarkRedColor;
  27 +
  28 ++ (UIColor *)flatGreenColor;
  29 ++ (UIColor *)flatDarkGreenColor;
  30 +
  31 ++ (UIColor *)flatBlueColor;
  32 ++ (UIColor *)flatDarkBlueColor;
  33 +
  34 ++ (UIColor *)flatTealColor;
  35 ++ (UIColor *)flatDarkTealColor;
  36 +
  37 ++ (UIColor *)flatPurpleColor;
  38 ++ (UIColor *)flatDarkPurpleColor;
  39 +
  40 ++ (UIColor *)flatBlackColor;
  41 ++ (UIColor *)flatDarkBlackColor;
  42 +
  43 ++ (UIColor *)flatYellowColor;
  44 ++ (UIColor *)flatDarkYellowColor;
  45 +
  46 ++ (UIColor *)flatOrangeColor;
  47 ++ (UIColor *)flatDarkOrangeColor;
  48 +
  49 ++ (UIColor *)flatWhiteColor;
  50 ++ (UIColor *)flatDarkWhiteColor;
  51 +
  52 ++ (UIColor *)flatGrayColor;
  53 ++ (UIColor *)flatDarkGrayColor;
  54 +
  55 ++ (UIColor *)randomFlatColor;
  56 ++ (UIColor *)randomFlatLightColor;
  57 ++ (UIColor *)randomFlatDarkColor;
  58 +
  59 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/Color/UIColor+MLPFlatColors.m 0 → 100755
  1 +/*
  2 +// UIColor+MLPFlatColors.m
  3 +//
  4 +//
  5 +// Created by Eddy Borja on 4/10/13.
  6 +// Copyright (c) 2013 Mainloop LLC. All rights reserved.
  7 +//
  8 +
  9 + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  10 +
  11 + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  12 +
  13 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  14 + */
  15 +
  16 +
  17 +#import "UIColor+MLPFlatColors.h"
  18 +
  19 +@implementation UIColor (MLPFlatColors)
  20 +
  21 +#pragma mark - Red
  22 ++ (UIColor *)flatRedColor
  23 +{
  24 + return UIColorFromRGB(0xE74C3C);
  25 +}
  26 ++ (UIColor *)flatDarkRedColor
  27 +{
  28 + return UIColorFromRGB(0xC0392B);
  29 +}
  30 +
  31 +#pragma mark - Green
  32 ++ (UIColor *)flatGreenColor
  33 +{
  34 + return UIColorFromRGB(0x2ECC71);
  35 +}
  36 ++ (UIColor *)flatDarkGreenColor
  37 +{
  38 + return UIColorFromRGB(0x27AE60);
  39 +}
  40 +
  41 +
  42 +#pragma mark - Blue
  43 ++ (UIColor *)flatBlueColor
  44 +{
  45 + return UIColorFromRGB(0x3498DB);
  46 +}
  47 ++ (UIColor *)flatDarkBlueColor
  48 +{
  49 + return UIColorFromRGB(0x2980B9);
  50 +}
  51 +
  52 +
  53 +#pragma mark - Teal
  54 ++ (UIColor *)flatTealColor
  55 +{
  56 + return UIColorFromRGB(0x1ABC9C);
  57 +}
  58 ++ (UIColor *)flatDarkTealColor
  59 +{
  60 + return UIColorFromRGB(0x16A085);
  61 +}
  62 +
  63 +#pragma mark - Purple
  64 ++ (UIColor *)flatPurpleColor
  65 +{
  66 + return UIColorFromRGB(0x9B59B6);
  67 +}
  68 ++ (UIColor *)flatDarkPurpleColor
  69 +{
  70 + return UIColorFromRGB(0x8E44AD);
  71 +}
  72 +
  73 +
  74 +#pragma mark - Yellow
  75 ++ (UIColor *)flatYellowColor
  76 +{
  77 + return UIColorFromRGB(0xF1C40F);
  78 +}
  79 ++ (UIColor *)flatDarkYellowColor
  80 +{
  81 + return UIColorFromRGB(0xF39C12);
  82 +}
  83 +
  84 +
  85 +#pragma mark - Orange
  86 ++ (UIColor *)flatOrangeColor
  87 +{
  88 + return UIColorFromRGB(0xE67E22);
  89 +}
  90 ++ (UIColor *)flatDarkOrangeColor
  91 +{
  92 + return UIColorFromRGB(0xD35400);
  93 +}
  94 +
  95 +
  96 +
  97 +#pragma mark - Gray
  98 ++ (UIColor *)flatGrayColor
  99 +{
  100 + return UIColorFromRGB(0x95A5A6);
  101 +}
  102 +
  103 ++ (UIColor *)flatDarkGrayColor
  104 +{
  105 + return UIColorFromRGB(0x7F8C8D);
  106 +}
  107 +
  108 +
  109 +
  110 +#pragma mark - White
  111 ++ (UIColor *)flatWhiteColor
  112 +{
  113 + return UIColorFromRGB(0xECF0F1);
  114 +}
  115 +
  116 ++ (UIColor *)flatDarkWhiteColor
  117 +{
  118 + return UIColorFromRGB(0xBDC3C7);
  119 +}
  120 +
  121 +
  122 +
  123 +#pragma mark - Black
  124 ++ (UIColor *)flatBlackColor
  125 +{
  126 + return UIColorFromRGB(0x34495E);
  127 +}
  128 +
  129 ++ (UIColor *)flatDarkBlackColor
  130 +{
  131 + return UIColorFromRGB(0x2C3E50);
  132 +}
  133 +
  134 +
  135 +
  136 +#pragma mark - Random
  137 ++ (UIColor *)randomFlatColor
  138 +{
  139 + return [UIColor randomFlatColorIncludeLightShades:YES darkShades:YES];
  140 +}
  141 +
  142 ++ (UIColor *)randomFlatLightColor
  143 +{
  144 + return [UIColor randomFlatColorIncludeLightShades:YES darkShades:NO];
  145 +}
  146 +
  147 ++ (UIColor *)randomFlatDarkColor
  148 +{
  149 + return [UIColor randomFlatColorIncludeLightShades:NO darkShades:YES];
  150 +}
  151 +
  152 ++ (UIColor *)randomFlatColorIncludeLightShades:(BOOL)useLightShades
  153 + darkShades:(BOOL)useDarkShades;
  154 +{
  155 + const NSInteger numberOfLightColors = 10;
  156 + const NSInteger numberOfDarkColors = 10;
  157 + NSAssert(useLightShades || useDarkShades, @"Must choose random color using at least light shades or dark shades.");
  158 +
  159 +
  160 + u_int32_t numberOfColors = 0;
  161 + if(useLightShades){
  162 + numberOfColors += numberOfLightColors;
  163 + }
  164 + if(useDarkShades){
  165 + numberOfColors += numberOfDarkColors;
  166 + }
  167 +
  168 + u_int32_t chosenColor = arc4random_uniform(numberOfColors);
  169 +
  170 + if(!useLightShades){
  171 + chosenColor += numberOfLightColors;
  172 + }
  173 +
  174 + UIColor *color = [UIColor clearColor];
  175 + switch (chosenColor) {
  176 + case 0:
  177 + color = [UIColor flatRedColor];
  178 + break;
  179 + case 1:
  180 + color = [UIColor flatGreenColor];
  181 + break;
  182 + case 2:
  183 + color = [UIColor flatBlueColor];
  184 + break;
  185 + case 3:
  186 + color = [UIColor flatTealColor];
  187 + break;
  188 + case 4:
  189 + color = [UIColor flatPurpleColor];
  190 + break;
  191 + case 5:
  192 + color = [UIColor flatYellowColor];
  193 + break;
  194 + case 6:
  195 + color = [UIColor flatOrangeColor];
  196 + break;
  197 + case 7:
  198 + color = [UIColor flatGrayColor];
  199 + break;
  200 + case 8:
  201 + color = [UIColor flatWhiteColor];
  202 + break;
  203 + case 9:
  204 + color = [UIColor flatBlackColor];
  205 + break;
  206 + case 10:
  207 + color = [UIColor flatDarkRedColor];
  208 + break;
  209 + case 11:
  210 + color = [UIColor flatDarkGreenColor];
  211 + break;
  212 + case 12:
  213 + color = [UIColor flatDarkBlueColor];
  214 + break;
  215 + case 13:
  216 + color = [UIColor flatDarkTealColor];
  217 + break;
  218 + case 14:
  219 + color = [UIColor flatDarkPurpleColor];
  220 + break;
  221 + case 15:
  222 + color = [UIColor flatDarkYellowColor];
  223 + break;
  224 + case 16:
  225 + color = [UIColor flatDarkOrangeColor];
  226 + break;
  227 + case 17:
  228 + color = [UIColor flatDarkGrayColor];
  229 + break;
  230 + case 18:
  231 + color = [UIColor flatDarkWhiteColor];
  232 + break;
  233 + case 19:
  234 + color = [UIColor flatDarkBlackColor];
  235 + break;
  236 + case 20:
  237 + default:
  238 + NSAssert(0, @"Unrecognized color selected as random color");
  239 + break;
  240 + }
  241 +
  242 + return color;
  243 +}
  244 +
  245 +
  246 +
  247 +@end
... ...
Example/Pods/CNLiveBaseKit/CNLiveBaseKit/Classes/ARC/Utils/GTMBase64/GTMBase64.h 0 → 100644
  1 +//
  2 +// GTMBase64.h
  3 +//
  4 +// Copyright 2006-2008 Google Inc.
  5 +//
  6 +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7 +// use this file except in compliance with the License. You may obtain a copy
  8 +// of the License at
  9 +//
  10 +// http://www.apache.org/licenses/LICENSE-2.0
  11 +//
  12 +// Unless required by applicable law or agreed to in writing, software
  13 +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  14 +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  15 +// License for the specific language governing permissions and limitations under
  16 +// the License.
  17 +//
  18 +
  19 +
  20 +// WARNING: This class provides a subset of the functionality available in
  21 +// GTMStringEncoding and may go away in the future.
  22 +// Please consider using GTMStringEncoding instead.
  23 +
  24 +#import <Foundation/Foundation.h>
  25 +#import "GTMDefines.h"
  26 +
  27 +// GTMBase64
  28 +//
  29 +/// Helper for handling Base64 and WebSafeBase64 encodings
  30 +//
  31 +/// The webSafe methods use different character set and also the results aren't
  32 +/// always padded to a multiple of 4 characters. This is done so the resulting
  33 +/// data can be used in urls and url query arguments without needing any
  34 +/// encoding. You must use the webSafe* methods together, the data does not
  35 +/// interop with the RFC methods.
  36 +//
  37 +@interface GTMBase64 : NSObject
  38 +
  39 +//
  40 +// Standard Base64 (RFC) handling
  41 +//
  42 +
  43 +// encodeData:
  44 +//
  45 +/// Base64 encodes contents of the NSData object.
  46 +//
  47 +/// Returns:
  48 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  49 +//
  50 ++(NSData *)encodeData:(NSData *)data;
  51 +
  52 +// decodeData:
  53 +//
  54 +/// Base64 decodes contents of the NSData object.
  55 +//
  56 +/// Returns:
  57 +/// A new autoreleased NSData with the decoded payload. nil for any error.
  58 +//
  59 ++(NSData *)decodeData:(NSData *)data;
  60 +
  61 +// encodeBytes:length:
  62 +//
  63 +/// Base64 encodes the data pointed at by |bytes|.
  64 +//
  65 +/// Returns:
  66 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  67 +//
  68 ++(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length;
  69 +
  70 +// decodeBytes:length:
  71 +//
  72 +/// Base64 decodes the data pointed at by |bytes|.
  73 +//
  74 +/// Returns:
  75 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  76 +//
  77 ++(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length;
  78 +
  79 +// stringByEncodingData:
  80 +//
  81 +/// Base64 encodes contents of the NSData object.
  82 +//
  83 +/// Returns:
  84 +/// A new autoreleased NSString with the encoded payload. nil for any error.
  85 +//
  86 ++(NSString *)stringByEncodingData:(NSData *)data;
  87 +
  88 +// stringByEncodingBytes:length:
  89 +//
  90 +/// Base64 encodes the data pointed at by |bytes|.
  91 +//
  92 +/// Returns:
  93 +/// A new autoreleased NSString with the encoded payload. nil for any error.
  94 +//
  95 ++(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length;
  96 +
  97 +// decodeString:
  98 +//
  99 +/// Base64 decodes contents of the NSString.
  100 +//
  101 +/// Returns:
  102 +/// A new autoreleased NSData with the decoded payload. nil for any error.
  103 +//
  104 ++(NSData *)decodeString:(NSString *)string;
  105 +
  106 +//
  107 +// Modified Base64 encoding so the results can go onto urls.
  108 +//
  109 +// The changes are in the characters generated and also allows the result to
  110 +// not be padded to a multiple of 4.
  111 +// Must use the matching call to encode/decode, won't interop with the
  112 +// RFC versions.
  113 +//
  114 +
  115 +// webSafeEncodeData:padded:
  116 +//
  117 +/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES
  118 +/// then padding characters are added so the result length is a multiple of 4.
  119 +//
  120 +/// Returns:
  121 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  122 +//
  123 ++(NSData *)webSafeEncodeData:(NSData *)data
  124 + padded:(BOOL)padded;
  125 +
  126 +// webSafeDecodeData:
  127 +//
  128 +/// WebSafe Base64 decodes contents of the NSData object.
  129 +//
  130 +/// Returns:
  131 +/// A new autoreleased NSData with the decoded payload. nil for any error.
  132 +//
  133 ++(NSData *)webSafeDecodeData:(NSData *)data;
  134 +
  135 +// webSafeEncodeBytes:length:padded:
  136 +//
  137 +/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES
  138 +/// then padding characters are added so the result length is a multiple of 4.
  139 +//
  140 +/// Returns:
  141 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  142 +//
  143 ++(NSData *)webSafeEncodeBytes:(const void *)bytes
  144 + length:(NSUInteger)length
  145 + padded:(BOOL)padded;
  146 +
  147 +// webSafeDecodeBytes:length:
  148 +//
  149 +/// WebSafe Base64 decodes the data pointed at by |bytes|.
  150 +//
  151 +/// Returns:
  152 +/// A new autoreleased NSData with the encoded payload. nil for any error.
  153 +//
  154 ++(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length;
  155 +
  156 +// stringByWebSafeEncodingData:padded:
  157 +//
  158 +/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES
  159 +/// then padding characters are added so the result length is a multiple of 4.
  160 +//
  161 +/// Returns:
  162 +/// A new autoreleased NSString with the encoded payload. nil for any error.
  163 +//
  164 ++(NSString *)stringByWebSafeEncodingData:(NSData *)data
  165 + padded:(BOOL)padded;
  166 +
  167 +// stringByWebSafeEncodingBytes:length:padded:
  168 +//
  169 +/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES
  170 +/// then padding characters are added so the result length is a multiple of 4.
  171 +//
  172 +/// Returns:
  173 +/// A new autoreleased NSString with the encoded payload. nil for any error.
  174 +//
  175 ++(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes
  176 + length:(NSUInteger)length
  177 + padded:(BOOL)padded;
  178 +
  179 +// webSafeDecodeString:
  180 +//
  181 +/// WebSafe Base64 decodes contents of the NSString.
  182 +//
  183 +/// Returns:
  184 +/// A new autoreleased NSData with the decoded payload. nil for any error.
  185 +//
  186 ++(NSData *)webSafeDecodeString:(NSString *)string;
  187 +
  188 +@end
... ...