Commit a380e5976b9e57aa085fee87aeb0e1a07301a0be
1 parent
a6847c99
0.0.4
Showing
29 changed files
with
375 additions
and
146 deletions
Too many changes to show.
To preserve performance only 29 of 50 files are displayed.
.gitignore
0 → 100644
CNLiveDisease.podspec
| 1 | 1 | ||
| 2 | Pod::Spec.new do |s| | 2 | Pod::Spec.new do |s| |
| 3 | s.name = 'CNLiveDisease' | 3 | s.name = 'CNLiveDisease' |
| 4 | - s.version = '0.0.3' | 4 | + s.version = '0.0.4' |
| 5 | s.summary = '智慧农业部分组件化' | 5 | s.summary = '智慧农业部分组件化' |
| 6 | 6 | ||
| 7 | # This description is used to generate tags and improve search results. | 7 | # This description is used to generate tags and improve search results. |
| @@ -25,9 +25,9 @@ TODO: Add long description of the pod here. | @@ -25,9 +25,9 @@ TODO: Add long description of the pod here. | ||
| 25 | 25 | ||
| 26 | s.source_files = 'CNLiveDisease/Classes/**/*' | 26 | s.source_files = 'CNLiveDisease/Classes/**/*' |
| 27 | 27 | ||
| 28 | - # s.resource_bundles = { | ||
| 29 | - # 'CNLiveDisease' => ['CNLiveDisease/Assets/*.png'] | ||
| 30 | - # } | 28 | + s.resource_bundles = { |
| 29 | + 'CNLiveDisease' => ['CNLiveDisease/Assets/Assets.xcassets'] | ||
| 30 | + } | ||
| 31 | 31 | ||
| 32 | # s.public_header_files = 'Pod/Classes/**/*.h' | 32 | # s.public_header_files = 'Pod/Classes/**/*.h' |
| 33 | s.frameworks = 'UIKit', 'Foundation' | 33 | s.frameworks = 'UIKit', 'Foundation' |
| @@ -35,4 +35,8 @@ TODO: Add long description of the pod here. | @@ -35,4 +35,8 @@ TODO: Add long description of the pod here. | ||
| 35 | s.dependency 'Masonry' | 35 | s.dependency 'Masonry' |
| 36 | s.dependency 'QMUIKit', '~> 3.1.0' | 36 | s.dependency 'QMUIKit', '~> 3.1.0' |
| 37 | s.dependency 'CNLiveCommonCategory' | 37 | s.dependency 'CNLiveCommonCategory' |
| 38 | + s.dependency 'CNLiveImagePickerController' | ||
| 39 | + s.dependency 'CNLiveAVCamera' | ||
| 40 | + # s.dependency 'CNLiveUploadManager' | ||
| 41 | + # s.ios.vendored_library = 'CNLiveUploadManager' | ||
| 38 | end | 42 | end |
CNLiveDisease/Classes/Controller/CNLiveDiseaseController.m
| @@ -9,11 +9,13 @@ | @@ -9,11 +9,13 @@ | ||
| 9 | #import "CNLiveDiseaseSegment.h" | 9 | #import "CNLiveDiseaseSegment.h" |
| 10 | #import <CNLiveCommonCategory/UIColor+CNLiveExtension.h> | 10 | #import <CNLiveCommonCategory/UIColor+CNLiveExtension.h> |
| 11 | #import <CNLiveBaseKit/CNLiveBaseKit.h> | 11 | #import <CNLiveBaseKit/CNLiveBaseKit.h> |
| 12 | +#import "CNLiveFriutViewController.h" | ||
| 12 | #define TotalTitleCount 3 | 13 | #define TotalTitleCount 3 |
| 13 | #define Segment_Height 53 | 14 | #define Segment_Height 53 |
| 14 | @interface CNLiveDiseaseController ()<UIScrollViewDelegate,CNLiveDiseaseSegmentDelegate> | 15 | @interface CNLiveDiseaseController ()<UIScrollViewDelegate,CNLiveDiseaseSegmentDelegate> |
| 15 | @property (nonatomic, strong) UIScrollView *scrollView; | 16 | @property (nonatomic, strong) UIScrollView *scrollView; |
| 16 | @property (nonatomic, strong) CNLiveDiseaseSegment *segmentView; | 17 | @property (nonatomic, strong) CNLiveDiseaseSegment *segmentView; |
| 18 | +@property (nonatomic, assign) BOOL isAppReview; | ||
| 17 | @end | 19 | @end |
| 18 | 20 | ||
| 19 | @implementation CNLiveDiseaseController | 21 | @implementation CNLiveDiseaseController |
| @@ -23,7 +25,35 @@ | @@ -23,7 +25,35 @@ | ||
| 23 | self.view.backgroundColor = [UIColor whiteColor]; | 25 | self.view.backgroundColor = [UIColor whiteColor]; |
| 24 | [self setUpSegment]; | 26 | [self setUpSegment]; |
| 25 | [self.view addSubview:self.scrollView]; | 27 | [self.view addSubview:self.scrollView]; |
| 26 | - | 28 | + CGFloat width = KScreenWidth; |
| 29 | + CGFloat height = KScreenHeight - kNavigationBarHeight - Segment_Height; | ||
| 30 | + CNLiveFriutViewController *vc = [[CNLiveFriutViewController alloc]init]; | ||
| 31 | + [vc setIndex:0]; | ||
| 32 | + self.isAppReview = YES; | ||
| 33 | + if (self.isAppReview) { | ||
| 34 | + vc.imageArray = [NSArray arrayWithObjects:@"pingguo",@"yingtao",@"putao",@"tao",@"xing",@"caomei",@"yangmei",@"lizhi",@"xigua",@"mugua",@"mangguo",@"hamigua",@"xiangjiao",@"zao",@"mihoutao",@"li", nil]; | ||
| 35 | + vc.titleArray = [NSArray arrayWithObjects:@"苹果",@"樱桃",@"葡萄",@"桃子",@"杏子",@"草莓",@"杨梅",@"荔枝",@"西瓜",@"木瓜",@"芒果",@"哈密瓜",@"香蕉",@"枣",@"猕猴桃",@"梨", nil]; | ||
| 36 | + }else { | ||
| 37 | + vc.imageArray = [NSArray arrayWithObjects:@"pingguo",@"yingtao",@"putao",@"tao",@"xing",@"zao",@"mihoutao",@"li",nil]; | ||
| 38 | + vc.titleArray = [NSArray arrayWithObjects:@"苹果",@"樱桃",@"葡萄",@"桃子",@"杏子",@"枣",@"猕猴桃",@"梨",nil]; | ||
| 39 | + } | ||
| 40 | + [self addChildViewController:vc]; | ||
| 41 | + vc.view.frame = CGRectMake(0, 0, width, height); | ||
| 42 | + [self.scrollView addSubview:vc.view]; | ||
| 43 | + CNLiveFriutViewController *fieldVc = [[CNLiveFriutViewController alloc]init]; | ||
| 44 | + [fieldVc setIndex:1]; | ||
| 45 | + fieldVc.imageArray = [NSArray arrayWithObjects:@"xiaomai",@"yumi",@"dadou",@"huasheng",@"xiangrikui",@"mianhua",@"youcai",@"ganzhe", nil]; | ||
| 46 | + fieldVc.titleArray = [NSArray arrayWithObjects:@"小麦",@"玉米",@"大豆",@"花生",@"向日葵",@"棉花",@"油菜",@"甘蔗", nil]; | ||
| 47 | + [self addChildViewController:fieldVc]; | ||
| 48 | + fieldVc.view.frame = CGRectMake(width, 0, width, height); | ||
| 49 | + [self.scrollView addSubview:fieldVc.view]; | ||
| 50 | + CNLiveFriutViewController *vegetableVc = [[CNLiveFriutViewController alloc]init]; | ||
| 51 | + [vegetableVc setIndex:2]; | ||
| 52 | + vegetableVc.imageArray = [NSArray arrayWithObjects:@"huanggua",@"lajiao",@"jiucai",@"qiezi",@"xihongshi",@"biandou",@"dabaicai",@"nangua",@"donggua",@"luobo",@"malingshu",@"bocai", nil]; | ||
| 53 | + vegetableVc.titleArray = [NSArray arrayWithObjects:@"黄瓜",@"辣椒",@"韭菜",@"茄子",@"西红柿",@"扁豆",@"大白菜",@"南瓜",@"冬瓜",@"萝卜",@"马铃薯",@"菠菜", nil]; | ||
| 54 | + [self addChildViewController:vegetableVc]; | ||
| 55 | + vegetableVc.view.frame = CGRectMake(width *2, 0, width, height); | ||
| 56 | + [self.scrollView addSubview:vegetableVc.view]; | ||
| 27 | } | 57 | } |
| 28 | - (void)setUpSegment { | 58 | - (void)setUpSegment { |
| 29 | self.segmentView = [[CNLiveDiseaseSegment alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, Segment_Height)]; | 59 | self.segmentView = [[CNLiveDiseaseSegment alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, Segment_Height)]; |
CNLiveDisease/Classes/Controller/CNLiveFriutViewController.m
| @@ -23,6 +23,7 @@ static NSString *cellID = @"Cell"; | @@ -23,6 +23,7 @@ static NSString *cellID = @"Cell"; | ||
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | -(void)setIndex:(NSInteger)index { | 25 | -(void)setIndex:(NSInteger)index { |
| 26 | + self.isAppReview = YES; | ||
| 26 | if (index == 0) { | 27 | if (index == 0) { |
| 27 | [self setUpCollectionView]; | 28 | [self setUpCollectionView]; |
| 28 | }else if (index == 1) { | 29 | }else if (index == 1) { |
| @@ -77,7 +78,9 @@ static NSString *cellID = @"Cell"; | @@ -77,7 +78,9 @@ static NSString *cellID = @"Cell"; | ||
| 77 | cell = [[CNDiseaseViewCell alloc]init]; | 78 | cell = [[CNDiseaseViewCell alloc]init]; |
| 78 | } | 79 | } |
| 79 | // cell.backgroundColor = [UIColor cyanColor]; | 80 | // cell.backgroundColor = [UIColor cyanColor]; |
| 80 | - cell.showImageV.image = [UIImage imageNamed:self.imageArray[indexPath.row]]; | 81 | +// cell.showImageV.image = [UIImage imageNamed:self.imageArray[indexPath.row]]; |
| 82 | + cell.showImageV.image = [self getImageName:self.imageArray[indexPath.row]]; | ||
| 83 | + | ||
| 81 | cell.titleLabel.text = self.titleArray[indexPath.row]; | 84 | cell.titleLabel.text = self.titleArray[indexPath.row]; |
| 82 | return cell; | 85 | return cell; |
| 83 | } | 86 | } |
| @@ -100,5 +103,12 @@ static NSString *cellID = @"Cell"; | @@ -100,5 +103,12 @@ static NSString *cellID = @"Cell"; | ||
| 100 | [self.emptyView setTextLabelTextColor:UIColorMake(102, 102, 102)]; | 103 | [self.emptyView setTextLabelTextColor:UIColorMake(102, 102, 102)]; |
| 101 | self.emptyView.imageViewInsets = UIEdgeInsetsMake(0, 0, 36, 0); | 104 | self.emptyView.imageViewInsets = UIEdgeInsetsMake(0, 0, 36, 0); |
| 102 | } | 105 | } |
| 103 | - | 106 | +- (UIImage *)getImageName:(NSString *)imageName{ |
| 107 | + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; | ||
| 108 | + NSURL *url = [bundle URLForResource:@"CNLiveDisease" withExtension:@"bundle"]; | ||
| 109 | + NSBundle *targetBundle = [NSBundle bundleWithURL:url]; | ||
| 110 | + UIImage *image = [UIImage imageNamed:imageName inBundle:targetBundle compatibleWithTraitCollection:nil]; | ||
| 111 | + return image; | ||
| 112 | + | ||
| 113 | +} | ||
| 104 | @end | 114 | @end |
CNLiveDisease/Classes/Controller/CNLiveSelectedViewController.h
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveSelectedViewController.h | ||
| 3 | +// CNLiveDisease | ||
| 4 | +// | ||
| 5 | +// Created by 殷巧娟 on 2019/1/24. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +#import <QMUIKit/QMUIKit.h> | ||
| 9 | + | ||
| 10 | +NS_ASSUME_NONNULL_BEGIN | ||
| 11 | + | ||
| 12 | +@interface CNLiveSelectedViewController : QMUICommonViewController | ||
| 13 | +@property (nonatomic, copy) NSString *imageName; | ||
| 14 | +@property (nonatomic, copy) NSString *titleName; | ||
| 15 | +@end | ||
| 16 | + | ||
| 17 | +NS_ASSUME_NONNULL_END |
CNLiveDisease/Classes/Controller/CNLiveSelectedViewController.m
0 → 100644
| 1 | +// | ||
| 2 | +// CNLiveSelectedViewController.m | ||
| 3 | +// CNLiveDisease | ||
| 4 | +// | ||
| 5 | +// Created by 殷巧娟 on 2019/1/24. | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +#import "CNLiveSelectedViewController.h" | ||
| 9 | +#import <AssetsLibrary/AssetsLibrary.h> | ||
| 10 | +#import <Photos/Photos.h> | ||
| 11 | +#import <CNLiveImagePickerController/TZImagePickerController.h> | ||
| 12 | +#import "CNDiseaseType.h" | ||
| 13 | +#import <CNLiveAVCamera/XFCameraController.h> | ||
| 14 | +#import "CNDiseaseType.h" | ||
| 15 | +#import <Masonry/Masonry.h> | ||
| 16 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | ||
| 17 | +#import <CNLiveImagePickerController/CNImagePickerManager.h> | ||
| 18 | +#define MJWeakSelf __weak typeof(self) weakSelf = self; | ||
| 19 | +@interface CNLiveSelectedViewController () <TZImagePickerControllerDelegate> | ||
| 20 | +@property (nonatomic, strong) UIImageView *selectImageV; | ||
| 21 | +@property (nonatomic, strong) UIButton *photoBtn; | ||
| 22 | +@property (nonatomic, strong) UIImageView *backImageV; | ||
| 23 | +@end | ||
| 24 | + | ||
| 25 | +@implementation CNLiveSelectedViewController | ||
| 26 | +-(void)viewDidLoad { | ||
| 27 | + [super viewDidLoad]; | ||
| 28 | + self.selectImageV.image = [UIImage imageNamed:self.imageName]; | ||
| 29 | + self.title = self.titleName; | ||
| 30 | +} | ||
| 31 | +-(void)setUPViews { | ||
| 32 | + [self.view addSubview:self.backImageV]; | ||
| 33 | + [self.backImageV addSubview:self.selectImageV]; | ||
| 34 | + [self.backImageV addSubview:self.photoBtn]; | ||
| 35 | + [self setUpLayout]; | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +-(void)photoBtnClick { | ||
| 39 | + MJWeakSelf; | ||
| 40 | + [self.view createAlertViewTitleArray:@[@"拍照",@"从手机相册选择"] subTitleArr:@[@"",@""] textColor:UIColorMake(11, 190, 0) subTitleColor:[UIColor whiteColor] firstFont:UIFontMake(18.0f) font:UIFontMake(18.0f) subFont:UIFontMake(18.0f) cancelTitle:@"取消" cancelFont:UIFontMake(18.0f) cancelTitleColor:UIColorMake(102, 102, 102) actionBlock:^(UIButton *button, NSInteger didRow) { | ||
| 41 | + switch (didRow) { | ||
| 42 | + case 0:{ | ||
| 43 | + [weakSelf takeToXFPhoto]; | ||
| 44 | + } | ||
| 45 | + break; | ||
| 46 | + case 1:{ | ||
| 47 | + [weakSelf pushTZImagePickerController]; | ||
| 48 | + } | ||
| 49 | + break; | ||
| 50 | + default: | ||
| 51 | + break; | ||
| 52 | + } | ||
| 53 | + }]; | ||
| 54 | +} | ||
| 55 | + | ||
| 56 | +#pragma mark - 跳转到自定义相机 | ||
| 57 | +-(void)takeToXFPhoto { | ||
| 58 | + XFCameraController *cameraController = [[XFCameraController alloc]init]; | ||
| 59 | + | ||
| 60 | + cameraController.isCanShootVideo = NO; | ||
| 61 | + __weak XFCameraController *weakCameraController = cameraController; | ||
| 62 | + cameraController.takePhotosCompletionBlock = ^(UIImage *image, NSError *error) { | ||
| 63 | + if (!error) { | ||
| 64 | + [self didFinishSelectPhotoWithImage:image]; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 68 | + [weakCameraController dismissViewControllerAnimated:YES completion:nil]; | ||
| 69 | + }); | ||
| 70 | + }; | ||
| 71 | + [self presentViewController:cameraController animated:YES completion:nil]; | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +#pragma mark -- 照相选中图片 | ||
| 75 | +-(void)didFinishSelectPhotoWithImage:(UIImage *)finalImage { | ||
| 76 | + | ||
| 77 | + TZImagePickerController *tzImagePickerVc = [[TZImagePickerController alloc]initWithMaxImagesCount:1 delegate:self]; | ||
| 78 | + tzImagePickerVc.sortAscendingByModificationDate = YES; | ||
| 79 | + [tzImagePickerVc showProgressHUD]; | ||
| 80 | + UIImage *image = finalImage; | ||
| 81 | + // 保存图片,获取到asset | ||
| 82 | + | ||
| 83 | + [[TZImageManager manager] savePhotoWithImage:image location:nil completion:^(NSError *error) { | ||
| 84 | + if (error) { | ||
| 85 | + [tzImagePickerVc hideProgressHUD]; | ||
| 86 | + NSLog(@"图片保存失败 %@",error); | ||
| 87 | + } else { | ||
| 88 | + [[TZImageManager manager] getCameraRollAlbum:NO allowPickingImage:YES needFetchAssets:YES completion:^(TZAlbumModel *model) { | ||
| 89 | + [[TZImageManager manager]getAssetsFromFetchResult:model.result allowPickingVideo:NO allowPickingImage:YES completion:^(NSArray<TZAssetModel *> *models) { | ||
| 90 | + [tzImagePickerVc hideProgressHUD]; | ||
| 91 | + TZAssetModel *assetModel = [models firstObject]; | ||
| 92 | + if (tzImagePickerVc.sortAscendingByModificationDate) { | ||
| 93 | + assetModel = [models lastObject]; | ||
| 94 | + } | ||
| 95 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 96 | + self.selectImageV.image = image; | ||
| 97 | + }); | ||
| 98 | + [self getUpFieldList:image]; | ||
| 99 | + | ||
| 100 | + }]; | ||
| 101 | + }]; | ||
| 102 | + } | ||
| 103 | + }]; | ||
| 104 | +} | ||
| 105 | +#pragma maek -从相册选择 | ||
| 106 | +-(void)pushTZImagePickerController { | ||
| 107 | + [CNImagePickerManager ImagePickerWithMaxImagesCount:1 columnNumber:4 delegate:self pushPhotoPickerVc:YES isSelectOriginalPhoto:YES selectedAssets:nil enterType:CNImagePickerEnterTypeOther pickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { | ||
| 108 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 109 | + self.selectImageV.image = [photos firstObject]; | ||
| 110 | + }); | ||
| 111 | + | ||
| 112 | +// [self getUpFieldList:[photos firstObject]]; | ||
| 113 | + | ||
| 114 | + | ||
| 115 | + }]; | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +-(void)getUpFieldList:(UIImage *)image { | ||
| 119 | + | ||
| 120 | +// NSString *url = @"https://xcx.aiphsn.com/recognition.php"; | ||
| 121 | +// [QMUITips showLoading:@"正在识别中" inView:AppKeyWindow]; | ||
| 122 | +// | ||
| 123 | +// NSDictionary *param = @{@"type":[CNDiseaseType showType:self.titleName]}; | ||
| 124 | +// [CNLiveUploadManager uploadRequestType:CNLiveUploadTypeThird url:url dic:param image:image isOriginal:NO limitType:(AppPhototLimitType)AppPhototLimitTypeFriendsCircle progress:^(float progress) { | ||
| 125 | +// | ||
| 126 | +// } success:^(CNLiveUploadModel *uploadModel) { | ||
| 127 | +// NSLog(@"f打印啊啊啊啊啊%@",uploadModel.responseObject); | ||
| 128 | +// [QMUITips hideAllTipsInView:AppKeyWindow]; | ||
| 129 | +// NSDictionary *dic = [uploadModel.responseObject objectForKey:@"disease"]; | ||
| 130 | +// if ([[dic objectForKey:@"name"] isEqualToString:@"抱歉图片不能识别"]) { | ||
| 131 | +// CNDiseaseFailedController *failVc = [[CNDiseaseFailedController alloc]init]; | ||
| 132 | +// failVc.name = [dic objectForKey:@"name"]; | ||
| 133 | +// failVc.introduction = [dic objectForKey:@"introduction"]; | ||
| 134 | +// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | ||
| 135 | +// [[AppDelegate sharedAppDelegate]pushViewController:failVc withBackTitle:@""]; | ||
| 136 | +// }); | ||
| 137 | +// }else { | ||
| 138 | +// CNLiveDiseaseDescController * diseaseView = [[CNLiveDiseaseDescController alloc] init]; | ||
| 139 | +// diseaseView.dataDict = [uploadModel.responseObject objectForKey:@"disease"]; | ||
| 140 | +// [[AppDelegate sharedAppDelegate] pushViewController:diseaseView withBackTitle:@""]; | ||
| 141 | +// } | ||
| 142 | +// } failure:^(CNLiveUploadModel *uploadModel, NSError *error) { | ||
| 143 | +// NSLog(@"打印error%@",error); | ||
| 144 | +// [QMUITips hideAllTipsInView:AppKeyWindow]; | ||
| 145 | +// if (error.code == -1009) { | ||
| 146 | +// [QMUITips showError:@"似乎已断开与互联网的连接" inView:AppKeyWindow hideAfterDelay:1.5f]; | ||
| 147 | +// }else { | ||
| 148 | +// [QMUITips showError:@"识别错误,请重新识别" inView:AppKeyWindow hideAfterDelay:1.5f]; | ||
| 149 | +// } | ||
| 150 | +// }]; | ||
| 151 | +} | ||
| 152 | + | ||
| 153 | +-(void)setUpLayout { | ||
| 154 | + MJWeakSelf; | ||
| 155 | + [_backImageV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 156 | + make.top.left.right.bottom.mas_equalTo(self.view); | ||
| 157 | + }]; | ||
| 158 | + [_selectImageV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 159 | + make.centerX.mas_equalTo(weakSelf.view.mas_centerX); | ||
| 160 | + make.height.width.mas_equalTo(127); | ||
| 161 | + make.top.mas_equalTo(kNavigationBarHeight +125); | ||
| 162 | + }]; | ||
| 163 | + [_photoBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 164 | + make.top.mas_equalTo(weakSelf.selectImageV.mas_bottom).offset(30); | ||
| 165 | + make.centerX.mas_equalTo(weakSelf.view.mas_centerX); | ||
| 166 | + make.width.mas_equalTo(170); | ||
| 167 | + make.height.mas_equalTo(40); | ||
| 168 | + }]; | ||
| 169 | +} | ||
| 170 | +-(UIImageView *)selectImageV { | ||
| 171 | + if (!_selectImageV) { | ||
| 172 | + _selectImageV = [[UIImageView alloc]init]; | ||
| 173 | + _selectImageV.contentMode = UIViewContentModeScaleAspectFill; | ||
| 174 | + _selectImageV.clipsToBounds = YES; | ||
| 175 | + } | ||
| 176 | + return _selectImageV; | ||
| 177 | +} | ||
| 178 | +-(UIButton *)photoBtn { | ||
| 179 | + if (!_photoBtn) { | ||
| 180 | + _photoBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | ||
| 181 | + [_photoBtn setImage:[UIImage imageNamed:@"farming_release"] forState:UIControlStateNormal]; | ||
| 182 | + [_photoBtn addTarget:self action:@selector(photoBtnClick) forControlEvents:UIControlEventTouchUpInside]; | ||
| 183 | + } | ||
| 184 | + return _photoBtn; | ||
| 185 | +} | ||
| 186 | +-(UIImageView *)backImageV { | ||
| 187 | + if (!_backImageV) { | ||
| 188 | + _backImageV = [[UIImageView alloc]init]; | ||
| 189 | + _backImageV.image = [UIImage imageNamed:@"farming_bg"]; | ||
| 190 | + _backImageV.contentMode = UIViewContentModeScaleAspectFill; | ||
| 191 | + _backImageV.clipsToBounds = YES; | ||
| 192 | + _backImageV.userInteractionEnabled = YES; | ||
| 193 | + } | ||
| 194 | + return _backImageV; | ||
| 195 | +} | ||
| 196 | +@end |
Example/CNLiveDisease.xcodeproj/project.pbxproj
| @@ -307,9 +307,11 @@ | @@ -307,9 +307,11 @@ | ||
| 307 | ); | 307 | ); |
| 308 | inputPaths = ( | 308 | inputPaths = ( |
| 309 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example-frameworks.sh", | 309 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Example/Pods-CNLiveDisease_Example-frameworks.sh", |
| 310 | + "${BUILT_PRODUCTS_DIR}/CNLiveAVCamera/CNLiveAVCamera.framework", | ||
| 310 | "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | 311 | "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", |
| 311 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | 312 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", |
| 312 | "${BUILT_PRODUCTS_DIR}/CNLiveDisease/CNLiveDisease.framework", | 313 | "${BUILT_PRODUCTS_DIR}/CNLiveDisease/CNLiveDisease.framework", |
| 314 | + "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework", | ||
| 313 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | 315 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", |
| 314 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | 316 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", |
| 315 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | 317 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", |
| @@ -319,9 +321,11 @@ | @@ -319,9 +321,11 @@ | ||
| 319 | outputFileListPaths = ( | 321 | outputFileListPaths = ( |
| 320 | ); | 322 | ); |
| 321 | outputPaths = ( | 323 | outputPaths = ( |
| 324 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveAVCamera.framework", | ||
| 322 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | 325 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", |
| 323 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | 326 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", |
| 324 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveDisease.framework", | 327 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveDisease.framework", |
| 328 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework", | ||
| 325 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | 329 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", |
| 326 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | 330 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", |
| 327 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | 331 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", |
| @@ -341,8 +345,10 @@ | @@ -341,8 +345,10 @@ | ||
| 341 | ); | 345 | ); |
| 342 | inputPaths = ( | 346 | inputPaths = ( |
| 343 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests-frameworks.sh", | 347 | "${SRCROOT}/Pods/Target Support Files/Pods-CNLiveDisease_Tests/Pods-CNLiveDisease_Tests-frameworks.sh", |
| 348 | + "${BUILT_PRODUCTS_DIR}/CNLiveAVCamera/CNLiveAVCamera.framework", | ||
| 344 | "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | 349 | "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", |
| 345 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | 350 | "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", |
| 351 | + "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework", | ||
| 346 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | 352 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", |
| 347 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | 353 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", |
| 348 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | 354 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", |
| @@ -352,8 +358,10 @@ | @@ -352,8 +358,10 @@ | ||
| 352 | outputFileListPaths = ( | 358 | outputFileListPaths = ( |
| 353 | ); | 359 | ); |
| 354 | outputPaths = ( | 360 | outputPaths = ( |
| 361 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveAVCamera.framework", | ||
| 355 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | 362 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", |
| 356 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | 363 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", |
| 364 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework", | ||
| 357 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | 365 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", |
| 358 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | 366 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", |
| 359 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | 367 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", |
Example/CNLiveDisease.xcworkspace/xcuserdata/yinqiaojuan.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
Example/CNLiveDisease/CNLiveAppDelegate.m
| @@ -14,8 +14,10 @@ | @@ -14,8 +14,10 @@ | ||
| 14 | { | 14 | { |
| 15 | UIWindow *window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; | 15 | UIWindow *window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; |
| 16 | window.backgroundColor = [UIColor whiteColor]; | 16 | window.backgroundColor = [UIColor whiteColor]; |
| 17 | - [window makeKeyAndVisible]; | ||
| 18 | - window.rootViewController = [[CNLiveViewController alloc]init]; | 17 | + UIViewController *vc = [[CNLiveViewController alloc]init]; |
| 18 | + UINavigationController *nav =[[UINavigationController alloc]initWithRootViewController:vc]; | ||
| 19 | + window.rootViewController = nav; | ||
| 20 | + [window makeKeyAndVisible]; | ||
| 19 | // Override point for customization after application launch. | 21 | // Override point for customization after application launch. |
| 20 | return YES; | 22 | return YES; |
| 21 | } | 23 | } |
Example/CNLiveDisease/CNLiveViewController.m
| @@ -21,6 +21,7 @@ | @@ -21,6 +21,7 @@ | ||
| 21 | [super viewDidLoad]; | 21 | [super viewDidLoad]; |
| 22 | self.view.backgroundColor = [UIColor whiteColor]; | 22 | self.view.backgroundColor = [UIColor whiteColor]; |
| 23 | [self.view addSubview:self.testButton]; | 23 | [self.view addSubview:self.testButton]; |
| 24 | + self.title = @"哈哈哈"; | ||
| 24 | // Do any additional setup after loading the view, typically from a nib. | 25 | // Do any additional setup after loading the view, typically from a nib. |
| 25 | } | 26 | } |
| 26 | - (UIButton *)testButton { | 27 | - (UIButton *)testButton { |
| @@ -36,6 +37,7 @@ | @@ -36,6 +37,7 @@ | ||
| 36 | CNLiveDiseaseController *vc = [[CNLiveDiseaseController alloc]init]; | 37 | CNLiveDiseaseController *vc = [[CNLiveDiseaseController alloc]init]; |
| 37 | vc.view.backgroundColor = [UIColor whiteColor]; | 38 | vc.view.backgroundColor = [UIColor whiteColor]; |
| 38 | [self presentViewController:vc animated:YES completion:nil]; | 39 | [self presentViewController:vc animated:YES completion:nil]; |
| 40 | +// [self.navigationController pushViewController:vc animated:YES]; | ||
| 39 | } | 41 | } |
| 40 | - (void)didReceiveMemoryWarning | 42 | - (void)didReceiveMemoryWarning |
| 41 | { | 43 | { |
Example/Podfile
| 1 | 1 | ||
| 2 | source 'https://github.com/CocoaPods/Specs.git' | 2 | source 'https://github.com/CocoaPods/Specs.git' |
| 3 | source ‘http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git’ | 3 | source ‘http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git’ |
| 4 | + | ||
| 4 | use_frameworks! | 5 | use_frameworks! |
| 5 | 6 | ||
| 6 | platform :ios, '9.0' | 7 | platform :ios, '9.0' |
| @@ -11,12 +12,18 @@ target 'CNLiveDisease_Example' do | @@ -11,12 +12,18 @@ target 'CNLiveDisease_Example' do | ||
| 11 | pod 'Masonry' | 12 | pod 'Masonry' |
| 12 | pod 'QMUIKit', '~> 3.1.0' | 13 | pod 'QMUIKit', '~> 3.1.0' |
| 13 | pod 'CNLiveCommonCategory' | 14 | pod 'CNLiveCommonCategory' |
| 15 | + pod 'CNLiveImagePickerController' | ||
| 16 | + pod 'CNLiveAVCamera' | ||
| 17 | + # pod 'CNLiveUploadManager' | ||
| 14 | target 'CNLiveDisease_Tests' do | 18 | target 'CNLiveDisease_Tests' do |
| 15 | inherit! :search_paths | 19 | inherit! :search_paths |
| 16 | pod 'CNLiveBaseKit' | 20 | pod 'CNLiveBaseKit' |
| 17 | pod 'Masonry' | 21 | pod 'Masonry' |
| 18 | pod 'QMUIKit', '~> 3.1.0' | 22 | pod 'QMUIKit', '~> 3.1.0' |
| 19 | pod 'CNLiveCommonCategory' | 23 | pod 'CNLiveCommonCategory' |
| 24 | + pod 'CNLiveImagePickerController' | ||
| 25 | + pod 'CNLiveAVCamera' | ||
| 26 | + # pod 'CNLiveUploadManager' | ||
| 20 | 27 | ||
| 21 | end | 28 | end |
| 22 | end | 29 | end |
Example/Podfile.lock
| 1 | PODS: | 1 | PODS: |
| 2 | + - CNLiveAVCamera (0.1.1): | ||
| 3 | + - Masonry (~> 1.0.2) | ||
| 2 | - CNLiveBaseKit (0.1.8): | 4 | - CNLiveBaseKit (0.1.8): |
| 3 | - MJExtension (~> 3.0.15.1) | 5 | - MJExtension (~> 3.0.15.1) |
| 4 | - CNLiveCommonCategory (0.2.5): | 6 | - CNLiveCommonCategory (0.2.5): |
| 5 | - SDWebImage (~> 4.4.2) | 7 | - SDWebImage (~> 4.4.2) |
| 6 | - - CNLiveDisease (0.0.2): | 8 | + - CNLiveDisease (0.0.3): |
| 9 | + - CNLiveAVCamera | ||
| 7 | - CNLiveBaseKit | 10 | - CNLiveBaseKit |
| 8 | - CNLiveCommonCategory | 11 | - CNLiveCommonCategory |
| 12 | + - CNLiveImagePickerController | ||
| 9 | - Masonry | 13 | - Masonry |
| 10 | - QMUIKit (~> 3.1.0) | 14 | - QMUIKit (~> 3.1.0) |
| 11 | - - Masonry (1.1.0) | 15 | + - CNLiveImagePickerController (0.0.2) |
| 16 | + - Masonry (1.0.2) | ||
| 12 | - MJExtension (3.0.15.1) | 17 | - MJExtension (3.0.15.1) |
| 13 | - QMUIKit (3.1.0): | 18 | - QMUIKit (3.1.0): |
| 14 | - QMUIKit/QMUIComponents (= 3.1.0) | 19 | - QMUIKit/QMUIComponents (= 3.1.0) |
| @@ -281,16 +286,20 @@ PODS: | @@ -281,16 +286,20 @@ PODS: | ||
| 281 | - SDWebImage/Core (4.4.3) | 286 | - SDWebImage/Core (4.4.3) |
| 282 | 287 | ||
| 283 | DEPENDENCIES: | 288 | DEPENDENCIES: |
| 289 | + - CNLiveAVCamera | ||
| 284 | - CNLiveBaseKit | 290 | - CNLiveBaseKit |
| 285 | - CNLiveCommonCategory | 291 | - CNLiveCommonCategory |
| 286 | - CNLiveDisease (from `../`) | 292 | - CNLiveDisease (from `../`) |
| 293 | + - CNLiveImagePickerController | ||
| 287 | - Masonry | 294 | - Masonry |
| 288 | - QMUIKit (~> 3.1.0) | 295 | - QMUIKit (~> 3.1.0) |
| 289 | 296 | ||
| 290 | SPEC REPOS: | 297 | SPEC REPOS: |
| 291 | http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git: | 298 | http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git: |
| 299 | + - CNLiveAVCamera | ||
| 292 | - CNLiveBaseKit | 300 | - CNLiveBaseKit |
| 293 | - CNLiveCommonCategory | 301 | - CNLiveCommonCategory |
| 302 | + - CNLiveImagePickerController | ||
| 294 | https://github.com/cocoapods/specs.git: | 303 | https://github.com/cocoapods/specs.git: |
| 295 | - Masonry | 304 | - Masonry |
| 296 | - MJExtension | 305 | - MJExtension |
| @@ -302,14 +311,16 @@ EXTERNAL SOURCES: | @@ -302,14 +311,16 @@ EXTERNAL SOURCES: | ||
| 302 | :path: "../" | 311 | :path: "../" |
| 303 | 312 | ||
| 304 | SPEC CHECKSUMS: | 313 | SPEC CHECKSUMS: |
| 314 | + CNLiveAVCamera: 7f3eba8eb1827f6e7a5047b0bb9f9f0bf19d1451 | ||
| 305 | CNLiveBaseKit: 09a97c3411a91270fb68bfe20a1df2cdbcd2c524 | 315 | CNLiveBaseKit: 09a97c3411a91270fb68bfe20a1df2cdbcd2c524 |
| 306 | CNLiveCommonCategory: 57cb8422ccf17ba5cc8fffe76851fa828c367d06 | 316 | CNLiveCommonCategory: 57cb8422ccf17ba5cc8fffe76851fa828c367d06 |
| 307 | - CNLiveDisease: a760655ec1b3a66b241e2e1e9287182c71290724 | ||
| 308 | - Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 | 317 | + CNLiveDisease: 8d80c9163497b37cbd2838898bb7c477868a158d |
| 318 | + CNLiveImagePickerController: 2be3ac0a75563f5945101ee6e0a787ad2fc15549 | ||
| 319 | + Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e | ||
| 309 | MJExtension: 19bc33ce2eee2d319760f5622562cf581a6ff756 | 320 | MJExtension: 19bc33ce2eee2d319760f5622562cf581a6ff756 |
| 310 | QMUIKit: 33959d093f48bb64f754ad696c310887a0768c49 | 321 | QMUIKit: 33959d093f48bb64f754ad696c310887a0768c49 |
| 311 | SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508 | 322 | SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508 |
| 312 | 323 | ||
| 313 | -PODFILE CHECKSUM: 54d7d686ae6622396bd465729ac9cb652ae1294b | 324 | +PODFILE CHECKSUM: 441d26e990ff01b086d84ccbd3d0027e04e6ea1a |
| 314 | 325 | ||
| 315 | COCOAPODS: 1.5.3 | 326 | COCOAPODS: 1.5.3 |
Example/Pods/Local Podspecs/CNLiveDisease.podspec.json
| 1 | { | 1 | { |
| 2 | "name": "CNLiveDisease", | 2 | "name": "CNLiveDisease", |
| 3 | - "version": "0.0.2", | 3 | + "version": "0.0.3", |
| 4 | "summary": "智慧农业部分组件化", | 4 | "summary": "智慧农业部分组件化", |
| 5 | "description": "TODO: Add long description of the pod here.", | 5 | "description": "TODO: Add long description of the pod here.", |
| 6 | "homepage": "http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease", | 6 | "homepage": "http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease", |
| @@ -13,12 +13,17 @@ | @@ -13,12 +13,17 @@ | ||
| 13 | }, | 13 | }, |
| 14 | "source": { | 14 | "source": { |
| 15 | "git": "http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease.git", | 15 | "git": "http://bj.gitlab.cnlive.com/ios-team/CNLiveDisease.git", |
| 16 | - "tag": "0.0.2" | 16 | + "tag": "0.0.3" |
| 17 | }, | 17 | }, |
| 18 | "platforms": { | 18 | "platforms": { |
| 19 | "ios": "9.0" | 19 | "ios": "9.0" |
| 20 | }, | 20 | }, |
| 21 | "source_files": "CNLiveDisease/Classes/**/*", | 21 | "source_files": "CNLiveDisease/Classes/**/*", |
| 22 | + "resource_bundles": { | ||
| 23 | + "CNLiveDisease": [ | ||
| 24 | + "CNLiveDisease/Assets/Assets.xcassets" | ||
| 25 | + ] | ||
| 26 | + }, | ||
| 22 | "frameworks": [ | 27 | "frameworks": [ |
| 23 | "UIKit", | 28 | "UIKit", |
| 24 | "Foundation" | 29 | "Foundation" |
| @@ -35,6 +40,12 @@ | @@ -35,6 +40,12 @@ | ||
| 35 | ], | 40 | ], |
| 36 | "CNLiveCommonCategory": [ | 41 | "CNLiveCommonCategory": [ |
| 37 | 42 | ||
| 43 | + ], | ||
| 44 | + "CNLiveImagePickerController": [ | ||
| 45 | + | ||
| 46 | + ], | ||
| 47 | + "CNLiveAVCamera": [ | ||
| 48 | + | ||
| 38 | ] | 49 | ] |
| 39 | } | 50 | } |
| 40 | } | 51 | } |
Example/Pods/Manifest.lock
| 1 | PODS: | 1 | PODS: |
| 2 | + - CNLiveAVCamera (0.1.1): | ||
| 3 | + - Masonry (~> 1.0.2) | ||
| 2 | - CNLiveBaseKit (0.1.8): | 4 | - CNLiveBaseKit (0.1.8): |
| 3 | - MJExtension (~> 3.0.15.1) | 5 | - MJExtension (~> 3.0.15.1) |
| 4 | - CNLiveCommonCategory (0.2.5): | 6 | - CNLiveCommonCategory (0.2.5): |
| 5 | - SDWebImage (~> 4.4.2) | 7 | - SDWebImage (~> 4.4.2) |
| 6 | - - CNLiveDisease (0.0.2): | 8 | + - CNLiveDisease (0.0.3): |
| 9 | + - CNLiveAVCamera | ||
| 7 | - CNLiveBaseKit | 10 | - CNLiveBaseKit |
| 8 | - CNLiveCommonCategory | 11 | - CNLiveCommonCategory |
| 12 | + - CNLiveImagePickerController | ||
| 9 | - Masonry | 13 | - Masonry |
| 10 | - QMUIKit (~> 3.1.0) | 14 | - QMUIKit (~> 3.1.0) |
| 11 | - - Masonry (1.1.0) | 15 | + - CNLiveImagePickerController (0.0.2) |
| 16 | + - Masonry (1.0.2) | ||
| 12 | - MJExtension (3.0.15.1) | 17 | - MJExtension (3.0.15.1) |
| 13 | - QMUIKit (3.1.0): | 18 | - QMUIKit (3.1.0): |
| 14 | - QMUIKit/QMUIComponents (= 3.1.0) | 19 | - QMUIKit/QMUIComponents (= 3.1.0) |
| @@ -281,16 +286,20 @@ PODS: | @@ -281,16 +286,20 @@ PODS: | ||
| 281 | - SDWebImage/Core (4.4.3) | 286 | - SDWebImage/Core (4.4.3) |
| 282 | 287 | ||
| 283 | DEPENDENCIES: | 288 | DEPENDENCIES: |
| 289 | + - CNLiveAVCamera | ||
| 284 | - CNLiveBaseKit | 290 | - CNLiveBaseKit |
| 285 | - CNLiveCommonCategory | 291 | - CNLiveCommonCategory |
| 286 | - CNLiveDisease (from `../`) | 292 | - CNLiveDisease (from `../`) |
| 293 | + - CNLiveImagePickerController | ||
| 287 | - Masonry | 294 | - Masonry |
| 288 | - QMUIKit (~> 3.1.0) | 295 | - QMUIKit (~> 3.1.0) |
| 289 | 296 | ||
| 290 | SPEC REPOS: | 297 | SPEC REPOS: |
| 291 | http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git: | 298 | http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git: |
| 299 | + - CNLiveAVCamera | ||
| 292 | - CNLiveBaseKit | 300 | - CNLiveBaseKit |
| 293 | - CNLiveCommonCategory | 301 | - CNLiveCommonCategory |
| 302 | + - CNLiveImagePickerController | ||
| 294 | https://github.com/cocoapods/specs.git: | 303 | https://github.com/cocoapods/specs.git: |
| 295 | - Masonry | 304 | - Masonry |
| 296 | - MJExtension | 305 | - MJExtension |
| @@ -302,14 +311,16 @@ EXTERNAL SOURCES: | @@ -302,14 +311,16 @@ EXTERNAL SOURCES: | ||
| 302 | :path: "../" | 311 | :path: "../" |
| 303 | 312 | ||
| 304 | SPEC CHECKSUMS: | 313 | SPEC CHECKSUMS: |
| 314 | + CNLiveAVCamera: 7f3eba8eb1827f6e7a5047b0bb9f9f0bf19d1451 | ||
| 305 | CNLiveBaseKit: 09a97c3411a91270fb68bfe20a1df2cdbcd2c524 | 315 | CNLiveBaseKit: 09a97c3411a91270fb68bfe20a1df2cdbcd2c524 |
| 306 | CNLiveCommonCategory: 57cb8422ccf17ba5cc8fffe76851fa828c367d06 | 316 | CNLiveCommonCategory: 57cb8422ccf17ba5cc8fffe76851fa828c367d06 |
| 307 | - CNLiveDisease: a760655ec1b3a66b241e2e1e9287182c71290724 | ||
| 308 | - Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 | 317 | + CNLiveDisease: 8d80c9163497b37cbd2838898bb7c477868a158d |
| 318 | + CNLiveImagePickerController: 2be3ac0a75563f5945101ee6e0a787ad2fc15549 | ||
| 319 | + Masonry: 7c429b56da9d4ee0bbb3ed77a5ea710d6a5df39e | ||
| 309 | MJExtension: 19bc33ce2eee2d319760f5622562cf581a6ff756 | 320 | MJExtension: 19bc33ce2eee2d319760f5622562cf581a6ff756 |
| 310 | QMUIKit: 33959d093f48bb64f754ad696c310887a0768c49 | 321 | QMUIKit: 33959d093f48bb64f754ad696c310887a0768c49 |
| 311 | SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508 | 322 | SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508 |
| 312 | 323 | ||
| 313 | -PODFILE CHECKSUM: 54d7d686ae6622396bd465729ac9cb652ae1294b | 324 | +PODFILE CHECKSUM: 441d26e990ff01b086d84ccbd3d0027e04e6ea1a |
| 314 | 325 | ||
| 315 | COCOAPODS: 1.5.3 | 326 | COCOAPODS: 1.5.3 |
Example/Pods/Masonry/Masonry/MASCompositeConstraint.m
| @@ -129,12 +129,6 @@ | @@ -129,12 +129,6 @@ | ||
| 129 | } | 129 | } |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | -- (void)setInset:(CGFloat)inset { | ||
| 133 | - for (MASConstraint *constraint in self.childConstraints) { | ||
| 134 | - constraint.inset = inset; | ||
| 135 | - } | ||
| 136 | -} | ||
| 137 | - | ||
| 138 | - (void)setOffset:(CGFloat)offset { | 132 | - (void)setOffset:(CGFloat)offset { |
| 139 | for (MASConstraint *constraint in self.childConstraints) { | 133 | for (MASConstraint *constraint in self.childConstraints) { |
| 140 | constraint.offset = offset; | 134 | constraint.offset = offset; |
Example/Pods/Masonry/Masonry/MASConstraint.h
| @@ -27,13 +27,6 @@ | @@ -27,13 +27,6 @@ | ||
| 27 | /** | 27 | /** |
| 28 | * Modifies the NSLayoutConstraint constant, | 28 | * Modifies the NSLayoutConstraint constant, |
| 29 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | 29 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following |
| 30 | - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | ||
| 31 | - */ | ||
| 32 | -- (MASConstraint * (^)(CGFloat inset))inset; | ||
| 33 | - | ||
| 34 | -/** | ||
| 35 | - * Modifies the NSLayoutConstraint constant, | ||
| 36 | - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | ||
| 37 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight | 30 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight |
| 38 | */ | 31 | */ |
| 39 | - (MASConstraint * (^)(CGSize offset))sizeOffset; | 32 | - (MASConstraint * (^)(CGSize offset))sizeOffset; |
| @@ -73,17 +66,17 @@ | @@ -73,17 +66,17 @@ | ||
| 73 | /** | 66 | /** |
| 74 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow | 67 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow |
| 75 | */ | 68 | */ |
| 76 | -- (MASConstraint * (^)(void))priorityLow; | 69 | +- (MASConstraint * (^)())priorityLow; |
| 77 | 70 | ||
| 78 | /** | 71 | /** |
| 79 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium | 72 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium |
| 80 | */ | 73 | */ |
| 81 | -- (MASConstraint * (^)(void))priorityMedium; | 74 | +- (MASConstraint * (^)())priorityMedium; |
| 82 | 75 | ||
| 83 | /** | 76 | /** |
| 84 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh | 77 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh |
| 85 | */ | 78 | */ |
| 86 | -- (MASConstraint * (^)(void))priorityHigh; | 79 | +- (MASConstraint * (^)())priorityHigh; |
| 87 | 80 | ||
| 88 | /** | 81 | /** |
| 89 | * Sets the constraint relation to NSLayoutRelationEqual | 82 | * Sets the constraint relation to NSLayoutRelationEqual |
| @@ -141,7 +134,7 @@ | @@ -141,7 +134,7 @@ | ||
| 141 | 134 | ||
| 142 | #endif | 135 | #endif |
| 143 | 136 | ||
| 144 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 137 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 145 | 138 | ||
| 146 | - (MASConstraint *)leftMargin; | 139 | - (MASConstraint *)leftMargin; |
| 147 | - (MASConstraint *)rightMargin; | 140 | - (MASConstraint *)rightMargin; |
| @@ -173,13 +166,6 @@ | @@ -173,13 +166,6 @@ | ||
| 173 | /** | 166 | /** |
| 174 | * Modifies the NSLayoutConstraint constant, | 167 | * Modifies the NSLayoutConstraint constant, |
| 175 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | 168 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following |
| 176 | - * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight | ||
| 177 | - */ | ||
| 178 | -- (void)setInset:(CGFloat)inset; | ||
| 179 | - | ||
| 180 | -/** | ||
| 181 | - * Modifies the NSLayoutConstraint constant, | ||
| 182 | - * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following | ||
| 183 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight | 169 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight |
| 184 | */ | 170 | */ |
| 185 | - (void)setSizeOffset:(CGSize)sizeOffset; | 171 | - (void)setSizeOffset:(CGSize)sizeOffset; |
Example/Pods/Masonry/Masonry/MASConstraint.m
| @@ -62,21 +62,21 @@ | @@ -62,21 +62,21 @@ | ||
| 62 | 62 | ||
| 63 | #pragma mark - MASLayoutPriority proxies | 63 | #pragma mark - MASLayoutPriority proxies |
| 64 | 64 | ||
| 65 | -- (MASConstraint * (^)(void))priorityLow { | 65 | +- (MASConstraint * (^)())priorityLow { |
| 66 | return ^id{ | 66 | return ^id{ |
| 67 | self.priority(MASLayoutPriorityDefaultLow); | 67 | self.priority(MASLayoutPriorityDefaultLow); |
| 68 | return self; | 68 | return self; |
| 69 | }; | 69 | }; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | -- (MASConstraint * (^)(void))priorityMedium { | 72 | +- (MASConstraint * (^)())priorityMedium { |
| 73 | return ^id{ | 73 | return ^id{ |
| 74 | self.priority(MASLayoutPriorityDefaultMedium); | 74 | self.priority(MASLayoutPriorityDefaultMedium); |
| 75 | return self; | 75 | return self; |
| 76 | }; | 76 | }; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | -- (MASConstraint * (^)(void))priorityHigh { | 79 | +- (MASConstraint * (^)())priorityHigh { |
| 80 | return ^id{ | 80 | return ^id{ |
| 81 | self.priority(MASLayoutPriorityDefaultHigh); | 81 | self.priority(MASLayoutPriorityDefaultHigh); |
| 82 | return self; | 82 | return self; |
| @@ -92,13 +92,6 @@ | @@ -92,13 +92,6 @@ | ||
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | -- (MASConstraint * (^)(CGFloat))inset { | ||
| 96 | - return ^id(CGFloat inset){ | ||
| 97 | - self.inset = inset; | ||
| 98 | - return self; | ||
| 99 | - }; | ||
| 100 | -} | ||
| 101 | - | ||
| 102 | - (MASConstraint * (^)(CGSize))sizeOffset { | 95 | - (MASConstraint * (^)(CGSize))sizeOffset { |
| 103 | return ^id(CGSize offset) { | 96 | return ^id(CGSize offset) { |
| 104 | self.sizeOffset = offset; | 97 | self.sizeOffset = offset; |
| @@ -226,7 +219,7 @@ | @@ -226,7 +219,7 @@ | ||
| 226 | 219 | ||
| 227 | #endif | 220 | #endif |
| 228 | 221 | ||
| 229 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 222 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 230 | 223 | ||
| 231 | - (MASConstraint *)leftMargin { | 224 | - (MASConstraint *)leftMargin { |
| 232 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; | 225 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; |
| @@ -276,8 +269,6 @@ | @@ -276,8 +269,6 @@ | ||
| 276 | 269 | ||
| 277 | - (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } | 270 | - (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } |
| 278 | 271 | ||
| 279 | -- (void)setInset:(CGFloat __unused)inset { MASMethodNotImplemented(); } | ||
| 280 | - | ||
| 281 | - (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } | 272 | - (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } |
| 282 | 273 | ||
| 283 | - (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } | 274 | - (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } |
Example/Pods/Masonry/Masonry/MASConstraintMaker.h
| 1 | // | 1 | // |
| 2 | -// MASConstraintMaker.h | 2 | +// MASConstraintBuilder.h |
| 3 | // Masonry | 3 | // Masonry |
| 4 | // | 4 | // |
| 5 | // Created by Jonas Budelmann on 20/07/13. | 5 | // Created by Jonas Budelmann on 20/07/13. |
| @@ -29,7 +29,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | @@ -29,7 +29,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | ||
| 29 | 29 | ||
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 32 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 33 | 33 | ||
| 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, | 34 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, |
| 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, | 35 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, |
| @@ -74,7 +74,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | @@ -74,7 +74,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | ||
| 74 | 74 | ||
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 77 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 78 | 78 | ||
| 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; | 79 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; |
| 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; | 80 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; |
| @@ -128,7 +128,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | @@ -128,7 +128,7 @@ typedef NS_OPTIONS(NSInteger, MASAttribute) { | ||
| 128 | /** | 128 | /** |
| 129 | * initialises the maker with a default view | 129 | * initialises the maker with a default view |
| 130 | * | 130 | * |
| 131 | - * @param view any MASConstraint are created with this view as the first item | 131 | + * @param view any MASConstrait are created with this view as the first item |
| 132 | * | 132 | * |
| 133 | * @return a new MASConstraintMaker | 133 | * @return a new MASConstraintMaker |
| 134 | */ | 134 | */ |
Example/Pods/Masonry/Masonry/MASConstraintMaker.m
| 1 | // | 1 | // |
| 2 | -// MASConstraintMaker.m | 2 | +// MASConstraintBuilder.m |
| 3 | // Masonry | 3 | // Masonry |
| 4 | // | 4 | // |
| 5 | // Created by Jonas Budelmann on 20/07/13. | 5 | // Created by Jonas Budelmann on 20/07/13. |
| @@ -81,7 +81,7 @@ | @@ -81,7 +81,7 @@ | ||
| 81 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) | 81 | #if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) |
| 82 | | MASAttributeFirstBaseline | MASAttributeLastBaseline | 82 | | MASAttributeFirstBaseline | MASAttributeLastBaseline |
| 83 | #endif | 83 | #endif |
| 84 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 84 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 85 | | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin | 85 | | MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin |
| 86 | | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins | 86 | | MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins |
| 87 | | MASAttributeCenterYWithinMargins | 87 | | MASAttributeCenterYWithinMargins |
| @@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
| 111 | 111 | ||
| 112 | #endif | 112 | #endif |
| 113 | 113 | ||
| 114 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 114 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 115 | 115 | ||
| 116 | if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin]; | 116 | if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin]; |
| 117 | if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin]; | 117 | if (attrs & MASAttributeRightMargin) [attributes addObject:self.view.mas_rightMargin]; |
| @@ -205,7 +205,7 @@ | @@ -205,7 +205,7 @@ | ||
| 205 | #endif | 205 | #endif |
| 206 | 206 | ||
| 207 | 207 | ||
| 208 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 208 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 209 | 209 | ||
| 210 | - (MASConstraint *)leftMargin { | 210 | - (MASConstraint *)leftMargin { |
| 211 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; | 211 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; |
Example/Pods/Masonry/Masonry/MASViewAttribute.h
Example/Pods/Masonry/Masonry/MASViewAttribute.m
Example/Pods/Masonry/Masonry/MASViewConstraint.h
Example/Pods/Masonry/Masonry/MASViewConstraint.m
| 1 | // | 1 | // |
| 2 | -// MASViewConstraint.m | 2 | +// MASConstraint.m |
| 3 | // Masonry | 3 | // Masonry |
| 4 | // | 4 | // |
| 5 | // Created by Jonas Budelmann on 20/07/13. | 5 | // Created by Jonas Budelmann on 20/07/13. |
| @@ -254,10 +254,6 @@ static char kInstalledConstraintsKey; | @@ -254,10 +254,6 @@ static char kInstalledConstraintsKey; | ||
| 254 | } | 254 | } |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | -- (void)setInset:(CGFloat)inset { | ||
| 258 | - [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}]; | ||
| 259 | -} | ||
| 260 | - | ||
| 261 | - (void)setOffset:(CGFloat)offset { | 257 | - (void)setOffset:(CGFloat)offset { |
| 262 | self.layoutConstant = offset; | 258 | self.layoutConstant = offset; |
| 263 | } | 259 | } |
Example/Pods/Masonry/Masonry/NSArray+MASAdditions.h
| @@ -25,7 +25,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | @@ -25,7 +25,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | ||
| 25 | * | 25 | * |
| 26 | * @return Array of created MASConstraints | 26 | * @return Array of created MASConstraints |
| 27 | */ | 27 | */ |
| 28 | -- (NSArray *)mas_makeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 28 | +- (NSArray *)mas_makeConstraints:(void (^)(MASConstraintMaker *make))block; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * Creates a MASConstraintMaker with each view in the callee. | 31 | * Creates a MASConstraintMaker with each view in the callee. |
| @@ -36,7 +36,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | @@ -36,7 +36,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | ||
| 36 | * | 36 | * |
| 37 | * @return Array of created/updated MASConstraints | 37 | * @return Array of created/updated MASConstraints |
| 38 | */ | 38 | */ |
| 39 | -- (NSArray *)mas_updateConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 39 | +- (NSArray *)mas_updateConstraints:(void (^)(MASConstraintMaker *make))block; |
| 40 | 40 | ||
| 41 | /** | 41 | /** |
| 42 | * Creates a MASConstraintMaker with each view in the callee. | 42 | * Creates a MASConstraintMaker with each view in the callee. |
| @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, MASAxisType) { | ||
| 47 | * | 47 | * |
| 48 | * @return Array of created/updated MASConstraints | 48 | * @return Array of created/updated MASConstraints |
| 49 | */ | 49 | */ |
| 50 | -- (NSArray *)mas_remakeConstraints:(void (NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 50 | +- (NSArray *)mas_remakeConstraints:(void (^)(MASConstraintMaker *make))block; |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * distribute with fixed spacing | 53 | * distribute with fixed spacing |
Example/Pods/Masonry/Masonry/NSLayoutConstraint+MASDebugAdditions.m
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", | 49 | @(NSLayoutAttributeLastBaseline) : @"lastBaseline", |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 52 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", | 53 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", |
| 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", | 54 | @(NSLayoutAttributeRightMargin) : @"rightMargin", |
| 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", | 55 | @(NSLayoutAttributeTopMargin) : @"topMargin", |
Example/Pods/Masonry/Masonry/View+MASAdditions.h
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | 39 | ||
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 42 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 43 | 43 | ||
| 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; | 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; |
| 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; | 45 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; |
| @@ -52,16 +52,6 @@ | @@ -52,16 +52,6 @@ | ||
| 52 | 52 | ||
| 53 | #endif | 53 | #endif |
| 54 | 54 | ||
| 55 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) | ||
| 56 | - | ||
| 57 | -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuide API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 58 | -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 59 | -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 60 | -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 61 | -@property (nonatomic, strong, readonly) MASViewAttribute *mas_safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 62 | - | ||
| 63 | -#endif | ||
| 64 | - | ||
| 65 | /** | 55 | /** |
| 66 | * a key to associate with this view | 56 | * a key to associate with this view |
| 67 | */ | 57 | */ |
| @@ -84,7 +74,7 @@ | @@ -84,7 +74,7 @@ | ||
| 84 | * | 74 | * |
| 85 | * @return Array of created MASConstraints | 75 | * @return Array of created MASConstraints |
| 86 | */ | 76 | */ |
| 87 | -- (NSArray *)mas_makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 77 | +- (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block; |
| 88 | 78 | ||
| 89 | /** | 79 | /** |
| 90 | * Creates a MASConstraintMaker with the callee view. | 80 | * Creates a MASConstraintMaker with the callee view. |
| @@ -95,7 +85,7 @@ | @@ -95,7 +85,7 @@ | ||
| 95 | * | 85 | * |
| 96 | * @return Array of created/updated MASConstraints | 86 | * @return Array of created/updated MASConstraints |
| 97 | */ | 87 | */ |
| 98 | -- (NSArray *)mas_updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 88 | +- (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block; |
| 99 | 89 | ||
| 100 | /** | 90 | /** |
| 101 | * Creates a MASConstraintMaker with the callee view. | 91 | * Creates a MASConstraintMaker with the callee view. |
| @@ -106,6 +96,6 @@ | @@ -106,6 +96,6 @@ | ||
| 106 | * | 96 | * |
| 107 | * @return Array of created/updated MASConstraints | 97 | * @return Array of created/updated MASConstraints |
| 108 | */ | 98 | */ |
| 109 | -- (NSArray *)mas_remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *make))block; | 99 | +- (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block; |
| 110 | 100 | ||
| 111 | @end | 101 | @end |
Example/Pods/Masonry/Masonry/View+MASAdditions.m
| @@ -98,7 +98,7 @@ | @@ -98,7 +98,7 @@ | ||
| 98 | 98 | ||
| 99 | #endif | 99 | #endif |
| 100 | 100 | ||
| 101 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 101 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 102 | 102 | ||
| 103 | - (MASViewAttribute *)mas_leftMargin { | 103 | - (MASViewAttribute *)mas_leftMargin { |
| 104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; | 104 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; |
| @@ -134,26 +134,6 @@ | @@ -134,26 +134,6 @@ | ||
| 134 | 134 | ||
| 135 | #endif | 135 | #endif |
| 136 | 136 | ||
| 137 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) | ||
| 138 | - | ||
| 139 | -- (MASViewAttribute *)mas_safeAreaLayoutGuide { | ||
| 140 | - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; | ||
| 141 | -} | ||
| 142 | -- (MASViewAttribute *)mas_safeAreaLayoutGuideTop { | ||
| 143 | - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeTop]; | ||
| 144 | -} | ||
| 145 | -- (MASViewAttribute *)mas_safeAreaLayoutGuideBottom { | ||
| 146 | - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; | ||
| 147 | -} | ||
| 148 | -- (MASViewAttribute *)mas_safeAreaLayoutGuideLeft { | ||
| 149 | - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeLeft]; | ||
| 150 | -} | ||
| 151 | -- (MASViewAttribute *)mas_safeAreaLayoutGuideRight { | ||
| 152 | - return [[MASViewAttribute alloc] initWithView:self item:self.safeAreaLayoutGuide layoutAttribute:NSLayoutAttributeRight]; | ||
| 153 | -} | ||
| 154 | - | ||
| 155 | -#endif | ||
| 156 | - | ||
| 157 | #pragma mark - associated properties | 137 | #pragma mark - associated properties |
| 158 | 138 | ||
| 159 | - (id)mas_key { | 139 | - (id)mas_key { |
Example/Pods/Masonry/Masonry/View+MASShorthandAdditions.h
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | 36 | ||
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 39 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 40 | 40 | ||
| 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; | 41 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; |
| 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; | 42 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; |
| @@ -49,15 +49,6 @@ | @@ -49,15 +49,6 @@ | ||
| 49 | 49 | ||
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) | ||
| 53 | - | ||
| 54 | -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideTop API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 55 | -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideBottom API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 56 | -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideLeft API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 57 | -@property (nonatomic, strong, readonly) MASViewAttribute *safeAreaLayoutGuideRight API_AVAILABLE(ios(11.0),tvos(11.0)); | ||
| 58 | - | ||
| 59 | -#endif | ||
| 60 | - | ||
| 61 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; | 52 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; |
| 62 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; | 53 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; |
| 63 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; | 54 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; |
| @@ -90,7 +81,7 @@ MAS_ATTR_FORWARD(lastBaseline); | @@ -90,7 +81,7 @@ MAS_ATTR_FORWARD(lastBaseline); | ||
| 90 | 81 | ||
| 91 | #endif | 82 | #endif |
| 92 | 83 | ||
| 93 | -#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) | 84 | +#if TARGET_OS_IPHONE || TARGET_OS_TV |
| 94 | 85 | ||
| 95 | MAS_ATTR_FORWARD(leftMargin); | 86 | MAS_ATTR_FORWARD(leftMargin); |
| 96 | MAS_ATTR_FORWARD(rightMargin); | 87 | MAS_ATTR_FORWARD(rightMargin); |
| @@ -103,28 +94,19 @@ MAS_ATTR_FORWARD(centerYWithinMargins); | @@ -103,28 +94,19 @@ MAS_ATTR_FORWARD(centerYWithinMargins); | ||
| 103 | 94 | ||
| 104 | #endif | 95 | #endif |
| 105 | 96 | ||
| 106 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 110000) || (__TV_OS_VERSION_MAX_ALLOWED >= 110000) | ||
| 107 | - | ||
| 108 | -MAS_ATTR_FORWARD(safeAreaLayoutGuideTop); | ||
| 109 | -MAS_ATTR_FORWARD(safeAreaLayoutGuideBottom); | ||
| 110 | -MAS_ATTR_FORWARD(safeAreaLayoutGuideLeft); | ||
| 111 | -MAS_ATTR_FORWARD(safeAreaLayoutGuideRight); | ||
| 112 | - | ||
| 113 | -#endif | ||
| 114 | - | ||
| 115 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { | 97 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { |
| 116 | return [self mas_attribute]; | 98 | return [self mas_attribute]; |
| 117 | } | 99 | } |
| 118 | 100 | ||
| 119 | -- (NSArray *)makeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { | 101 | +- (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { |
| 120 | return [self mas_makeConstraints:block]; | 102 | return [self mas_makeConstraints:block]; |
| 121 | } | 103 | } |
| 122 | 104 | ||
| 123 | -- (NSArray *)updateConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { | 105 | +- (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { |
| 124 | return [self mas_updateConstraints:block]; | 106 | return [self mas_updateConstraints:block]; |
| 125 | } | 107 | } |
| 126 | 108 | ||
| 127 | -- (NSArray *)remakeConstraints:(void(NS_NOESCAPE ^)(MASConstraintMaker *))block { | 109 | +- (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { |
| 128 | return [self mas_remakeConstraints:block]; | 110 | return [self mas_remakeConstraints:block]; |
| 129 | } | 111 | } |
| 130 | 112 |
Example/Pods/Masonry/README.md
| 1 | -# Masonry [](https://travis-ci.org/SnapKit/Masonry) [](https://coveralls.io/r/SnapKit/Masonry) [](https://github.com/Carthage/Carthage)  | 1 | +#Masonry [](https://travis-ci.org/SnapKit/Masonry) [](https://coveralls.io/r/SnapKit/Masonry) [](https://github.com/Carthage/Carthage)  |
| 2 | 2 | ||
| 3 | **Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** | 3 | **Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're using Swift in your project, we recommend using [SnapKit](https://github.com/SnapKit/SnapKit) as it provides better type safety with a simpler API.** |
| 4 | 4 | ||
| @@ -389,17 +389,11 @@ Get busy Masoning | @@ -389,17 +389,11 @@ Get busy Masoning | ||
| 389 | 389 | ||
| 390 | Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! | 390 | Copy the included code snippets to ``~/Library/Developer/Xcode/UserData/CodeSnippets`` to write your masonry blocks at lightning speed! |
| 391 | 391 | ||
| 392 | -`mas_make` -> ` [<#view#> mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 393 | - <#code#> | ||
| 394 | - }];` | 392 | +`mas_make` -> `[<view> mas_makeConstraints:^(MASConstraintMaker *make){<code>}];` |
| 395 | 393 | ||
| 396 | -`mas_update` -> ` [<#view#> mas_updateConstraints:^(MASConstraintMaker *make) { | ||
| 397 | - <#code#> | ||
| 398 | - }];` | 394 | +`mas_update` -> `[<view> mas_updateConstraints:^(MASConstraintMaker *make){<code>}];` |
| 399 | 395 | ||
| 400 | -`mas_remake` -> ` [<#view#> mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 401 | - <#code#> | ||
| 402 | - }];` | 396 | +`mas_remake` -> `[<view> mas_remakeConstraints:^(MASConstraintMaker *make){<code>}];` |
| 403 | 397 | ||
| 404 | ## Features | 398 | ## Features |
| 405 | * Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! | 399 | * Not limited to subset of Auto Layout. Anything NSLayoutConstraint can do, Masonry can do too! |