Commit 0889cec3 authored by 勾芒's avatar 勾芒

caoyunxiao

parent 5f0a8778
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#pragma amrk -确认修改按钮 #pragma amrk -确认修改按钮
- (IBAction)sureChangeButtonClick:(UIButton *)sender { - (IBAction)sureChangeButtonClick:(UIButton *)sender {
[self.view endEditing:YES];
if (self.userName.text.length == 0) { if (self.userName.text.length == 0) {
[self ErrorMBProgressView:@"账户名不能为空"]; [self ErrorMBProgressView:@"账户名不能为空"];
...@@ -88,7 +88,13 @@ ...@@ -88,7 +88,13 @@
[self RemoveMBProgressHUDLoding]; [self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"%@",returnValue); //保存最新的账号信息
[Shoppersmanager manager].passWordString = self.NewPassWord.text;
[self SuccessMBProgressView:returnValue[@"message"]];
if ([self.delegate respondsToSelector:@selector(cancelButtonClick)]) {
[self.delegate cancelButtonClick];
}
}else }else
{ {
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
#import "ClientViewController.h" #import "ClientViewController.h"
#import "InformationTableViewCell.h" #import "InformationTableViewCell.h"
#import "ClientdetailsViewController.h" #import "ClientdetailsViewController.h"
#import "MyclientEntityModel.h"
@interface ClientViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate> @interface ClientViewController ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
/** /**
...@@ -84,11 +86,14 @@ ...@@ -84,11 +86,14 @@
//隐藏更改客户按钮 //隐藏更改客户按钮
self.changePersonInformationButton.hidden = YES; self.changePersonInformationButton.hidden = YES;
//代理 //代理
self.informationTableview.delegate = self; self.informationTableview.delegate = self;
self.informationTableview.dataSource = self; self.informationTableview.dataSource = self;
self.informationTableview.tableFooterView = [UIView new];
self.searchPersonInformationField.delegate = self; self.searchPersonInformationField.delegate = self;
//监听键盘落下的通知
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(KeyboadrDismiss) name:UIKeyboardWillHideNotification object:nil];
} }
...@@ -109,10 +114,26 @@ ...@@ -109,10 +114,26 @@
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
ConsumerPageResult *Customerresult = [[ConsumerPageResult alloc]initWithDictionary:returnValue[@"data"] error:nil]; ConsumerPageResult *Customerresult = [[ConsumerPageResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
for (id objc in Customerresult.results) { for (TOConsumerEntity *objc in Customerresult.results) {
[self.CustomerresultArray addObject:objc]; MyclientEntityModel *myclientModel = [[MyclientEntityModel alloc]init];
myclientModel.fid = objc.fid;
myclientModel.createName = objc.createName;
myclientModel.createBy = objc.createBy;
myclientModel.createDate = objc.createDate;
myclientModel.sysOrgCode = objc.sysOrgCode;
myclientModel.name = objc.name;
myclientModel.mobile = objc.mobile;
myclientModel.province = objc.province;
myclientModel.city = objc.city;
myclientModel.country = objc.country;
myclientModel.address = objc.address;
myclientModel.picture = objc.picture;
myclientModel.lastVisitedTime = objc.lastVisitedTime;
[self.CustomerresultArray addObject:myclientModel];
} }
[self.informationTableview reloadData]; [self.informationTableview reloadData];
} }
else else
...@@ -125,19 +146,22 @@ ...@@ -125,19 +146,22 @@
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}]; }];
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath]; InformationTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"information" forIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.indexNumber = indexPath.row;
cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row]; cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
[cell.setCurrentCustomer addTarget:self action:@selector(SetCustomerButtonClick:) forControlEvents:UIControlEventTouchUpInside]; //清空其他选中状态
[cell setBlockSeletced:^(NSInteger index) {
[self SetCustomerButtonClick:index];
}];
return cell; return cell;
} }
...@@ -156,23 +180,36 @@ ...@@ -156,23 +180,36 @@
{ {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil];
ClientdetailsViewController *clientdetails = [storyboard instantiateViewControllerWithIdentifier:@"clientdetails"]; ClientdetailsViewController *clientdetails = [storyboard instantiateViewControllerWithIdentifier:@"clientdetails"];
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
[self.navigationController pushViewController:clientdetails animated:YES]; [self.navigationController pushViewController:clientdetails animated:YES];
} }
#pragma mark -设置为当前客户
- (void)SetCustomerButtonClick:(UIButton *)sender #pragma mark -设置为当前客户回调
- (void)SetCustomerButtonClick:(NSInteger)index;
{ {
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) { for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO; cell.setCurrentCustomer.selected = NO;
} }
sender.selected = YES; for (MyclientEntityModel *model in self.CustomerresultArray) {
model.selectedState = NO;
}
MyclientEntityModel *model = [self.CustomerresultArray objectAtIndex_opple:index];
model.selectedState = YES;
self.customerNameField.text = model.name;
self.phoneNumberField.text = model.mobile;
self.customerAddress.text = model.address;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
self.changePersonInformationButton.hidden = NO;
} }
#pragma mark -添加客户信息 #pragma mark -添加客户信息
- (IBAction)addCustomerInformationORExit:(UIButton *)sender { - (IBAction)addCustomerInformationORExit:(UIButton *)sender {
...@@ -182,7 +219,21 @@ ...@@ -182,7 +219,21 @@
self.customerAddress.text = nil; self.customerAddress.text = nil;
self.phoneNumberField.text = nil; self.phoneNumberField.text = nil;
self.companyNameField.text = nil; self.companyNameField.text = nil;
self.customerNameField.enabled = YES;
self.customerAddress.enabled = YES;
self.phoneNumberField.enabled = YES;
self.companyNameField.enabled = YES;
self.changePersonInformationButton.hidden = YES; self.changePersonInformationButton.hidden = YES;
//全部为为选中状态
for (InformationTableViewCell *cell in self.informationTableview.visibleCells) {
cell.setCurrentCustomer.selected = NO;
}
for (MyclientEntityModel *model in self.CustomerresultArray) {
model.selectedState = NO;
}
[sender setTitle:@"添加客户信息" forState:UIControlStateNormal]; [sender setTitle:@"添加客户信息" forState:UIControlStateNormal];
return; return;
} }
...@@ -261,10 +312,10 @@ ...@@ -261,10 +312,10 @@
self.phoneNumberField.enabled = YES; self.phoneNumberField.enabled = YES;
self.companyNameField.enabled = YES; self.companyNameField.enabled = YES;
[self.customerNameField becomeFirstResponder]; [self.customerNameField becomeFirstResponder];
} }
#pragma mark -UITextFieldDelegate代理 ----搜索 #pragma mark -UITextFieldDelegate代理 ----搜索
- (BOOL)textFieldShouldReturn:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField
{ {
...@@ -301,21 +352,28 @@ ...@@ -301,21 +352,28 @@
} }
else else
{ {
[self ErrorMBProgressView:returnValue[@"message"]];
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}]; }];
}
#pragma mark -键盘落下,判断更改信息按钮是否可见,可见则取消输入框的响应
- (void)KeyboadrDismiss
{
if (!self.changePersonInformationButton.selected) {
self.customerNameField.enabled = NO;
self.customerAddress.enabled = NO;
self.phoneNumberField.enabled = NO;
self.companyNameField.enabled = NO;
}
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "BaseViewController.h" #import "BaseViewController.h"
#import "MyclientEntityModel.h"
@interface ClientdetailsViewController : BaseViewController @interface ClientdetailsViewController : BaseViewController
...@@ -58,7 +58,10 @@ ...@@ -58,7 +58,10 @@
@property (weak, nonatomic) IBOutlet UIView *shoppingAndRecordBackview; @property (weak, nonatomic) IBOutlet UIView *shoppingAndRecordBackview;
/**
* 用户数据模型
*/
@property (nonatomic,strong) MyclientEntityModel *model;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#pragma mark -UI #pragma mark -UI
- (void)uiConfigAction - (void)uiConfigAction
{ {
self.ClientdetailsTableview.delegate = self; self.ClientdetailsTableview.delegate = self;
self.ClientdetailsTableview.dataSource = self; self.ClientdetailsTableview.dataSource = self;
...@@ -45,13 +46,23 @@ ...@@ -45,13 +46,23 @@
self.shoppingBagButton.layer.cornerRadius = kCornerRadius; self.shoppingBagButton.layer.cornerRadius = kCornerRadius;
self.orderRecordButton.layer.masksToBounds = YES; self.orderRecordButton.layer.masksToBounds = YES;
self.orderRecordButton.layer.cornerRadius = kCornerRadius; self.orderRecordButton.layer.cornerRadius = kCornerRadius;
self.setupButton.layer.masksToBounds = YES;
self.setupButton.layer.cornerRadius = kCornerRadius;
//默认选中购物袋 //默认选中购物袋
self.shoppingBagButton.selected = YES; self.shoppingBagButton.selected = YES;
self.shoppingBagButton.backgroundColor = [UIColor whiteColor]; self.shoppingBagButton.backgroundColor = [UIColor whiteColor];
//赋值
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:self.model.picture] placeholderImage:ReplaceImage];
self.customerName.text = self.model.name;
self.customerPhoneNumber.text = self.model.mobile;
self.companyName.text = self.model.name;
self.customerLocation.text = self.model.address;
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
if (self.shoppingBagButton.selected) { if (self.shoppingBagButton.selected) {
...@@ -87,6 +98,8 @@ ...@@ -87,6 +98,8 @@
return 0; return 0;
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"StoryboardwithCYX" bundle:nil];
...@@ -134,14 +147,6 @@ ...@@ -134,14 +147,6 @@
} }
/* /*
#pragma mark - Navigation #pragma mark - Navigation
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "MyclientEntityModel.h"
@interface InformationTableViewCell : UITableViewCell @interface InformationTableViewCell : UITableViewCell
...@@ -53,6 +53,19 @@ ...@@ -53,6 +53,19 @@
/** /**
* 数据源 * 数据源
*/ */
@property (nonatomic,strong) TOConsumerEntity *model; @property (nonatomic,strong) MyclientEntityModel *model;
/**
* 当前的cell位置
*/
@property (nonatomic,assign) NSInteger indexNumber;
/**
* 反传回控制器.cell位置
*/
@property (nonatomic,copy) void(^blockSeletced)(NSInteger index);
@end @end
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#pragma mark -赋值 #pragma mark -赋值
- (void)setModel:(TOConsumerEntity *)model - (void)setModel:(MyclientEntityModel *)model
{ {
_model = model; _model = model;
[self.personHeader sd_setImageWithURL:[NSURL URLWithString:_model.picture] placeholderImage:ReplaceImage]; [self.personHeader sd_setImageWithURL:[NSURL URLWithString:_model.picture] placeholderImage:ReplaceImage];
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
self.recentTime.text = [self stringFromDate:_model.lastVisitedTime]; self.recentTime.text = [self stringFromDate:_model.lastVisitedTime];
self.Guideservices.text = _model.createName; self.Guideservices.text = _model.createName;
self.personLocation.text = _model.address; self.personLocation.text = _model.address;
self.setCurrentCustomer.selected = _model.selectedState;
} }
...@@ -41,6 +42,16 @@ ...@@ -41,6 +42,16 @@
#pragma mark -设为当前用户
- (IBAction)SelectedButtonClick:(UIButton *)sender {
if (self.blockSeletced) {
self.blockSeletced(_indexNumber);
}
sender.selected = YES;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#import "authenticateView.h" #import "authenticateView.h"
#import "FollowHeartViewController.h" #import "FollowHeartViewController.h"
#import "HMScannerController.h"
@interface LoginViewController ()<RightVCselectedDelegate> @interface LoginViewController ()<RightVCselectedDelegate>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
self.forgotPasswordButton.titleLabel.font = [UIFont boldSystemFontOfSize:16]; self.forgotPasswordButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
self.followHeartView=[[FollowHeartViewController alloc]init]; self.followHeartView=[[FollowHeartViewController alloc]init];
self.userName.text = @"sh1"; self.userName.text = @"sh1";
self.passWord.text = @"123456"; self.passWord.text = @"1234567890";
} }
...@@ -84,7 +84,6 @@ ...@@ -84,7 +84,6 @@
// [self SetTheRootViewController]; // [self SetTheRootViewController];
// return;
if (self.userName.text.length == 0) { if (self.userName.text.length == 0) {
......
//
// MyclientEntityModel.h
// Lighting
//
// Created by 曹云霄 on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "opple_objc_json_client.h"
@interface MyclientEntityModel : TOConsumerEntity
/**
* 保存选中状态
*/
@property (nonatomic,assign) BOOL selectedState;
@end
//
// MyclientEntityModel.m
// Lighting
//
// Created by 曹云霄 on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "MyclientEntityModel.h"
@implementation MyclientEntityModel
@end
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "ScreeningView.h" #import "ScreeningView.h"
#import "screeningFirstView.h" #import "screeningFirstView.h"
#import "screeningSecondView.h" #import "screeningSecondView.h"
#import "HMScannerController.h"
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate,TableviewSelectedIndexdelegate,SelectedCollectionItemDelegate> @interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate,TableviewSelectedIndexdelegate,SelectedCollectionItemDelegate>
...@@ -343,6 +344,24 @@ ...@@ -343,6 +344,24 @@
#pragma mark -筛选 #pragma mark -筛选
- (void)ScreeningButtonClick - (void)ScreeningButtonClick
{ {
NSString *cardName = @"天涯刀哥 - 傅红雪";
UIImage *avatar = [UIImage imageNamed:@"1"];
HMScannerController *scanner = [HMScannerController scannerWithCardName:cardName avatar:avatar completion:^(NSString *stringValue) {
// self.scanResultLabel.text = stringValue;
NSLog(@"%@",stringValue);
}];
[scanner setTitleColor:[UIColor whiteColor] tintColor:[UIColor greenColor]];
// [self showDetailViewController:scanner sender:nil];
[self presentViewController:scanner animated:YES completion:nil];
// [self.navigationController pushViewController:scanner animated:YES];
return;
self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject]; self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject];
self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight); self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#import "CustomerOrderViewController.h" #import "CustomerOrderViewController.h"
#import "UserViewController.h" #import "UserViewController.h"
#import "ChangePasswordViewController.h" #import "ChangePasswordViewController.h"
#import "HMScannerController.h"
@interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate> @interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate>
...@@ -219,6 +219,9 @@ ...@@ -219,6 +219,9 @@
- (void)QrcodeButtonClick - (void)QrcodeButtonClick
{ {
NSLog(@"二维码扫描"); NSLog(@"二维码扫描");
} }
......
...@@ -82,6 +82,14 @@ ...@@ -82,6 +82,14 @@
29BFBD871CE428B200C238FB /* Customermanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD861CE428B200C238FB /* Customermanager.m */; }; 29BFBD871CE428B200C238FB /* Customermanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD861CE428B200C238FB /* Customermanager.m */; };
29BFBD8F1CE44BA900C238FB /* goodsDetailsSectionview.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */; }; 29BFBD8F1CE44BA900C238FB /* goodsDetailsSectionview.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */; };
29BFBD911CE44BC200C238FB /* goodsDetailsSectionview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */; }; 29BFBD911CE44BC200C238FB /* goodsDetailsSectionview.xib in Resources */ = {isa = PBXBuildFile; fileRef = 29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */; };
29BFBD981CE46FDA00C238FB /* MyclientEntityModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD971CE46FDA00C238FB /* MyclientEntityModel.m */; };
29BFBDAA1CE4905900C238FB /* HMScanerCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBD9E1CE4905900C238FB /* HMScanerCardViewController.m */; };
29BFBDAB1CE4905900C238FB /* HMScanner.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 29BFBD9F1CE4905900C238FB /* HMScanner.bundle */; };
29BFBDAC1CE4905900C238FB /* HMScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBDA11CE4905900C238FB /* HMScanner.m */; };
29BFBDAD1CE4905900C238FB /* HMScannerBorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBDA31CE4905900C238FB /* HMScannerBorder.m */; };
29BFBDAE1CE4905900C238FB /* HMScannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBDA51CE4905900C238FB /* HMScannerController.m */; };
29BFBDAF1CE4905900C238FB /* HMScannerMaskView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBDA71CE4905900C238FB /* HMScannerMaskView.m */; };
29BFBDB01CE4905900C238FB /* HMScannerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BFBDA91CE4905900C238FB /* HMScannerViewController.m */; };
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */; }; 29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */; };
29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */; }; 29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */; };
29E28CE81CE0B91B00812A55 /* HENLENSONG.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E28CE71CE0B91B00812A55 /* HENLENSONG.m */; }; 29E28CE81CE0B91B00812A55 /* HENLENSONG.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E28CE71CE0B91B00812A55 /* HENLENSONG.m */; };
...@@ -101,7 +109,7 @@ ...@@ -101,7 +109,7 @@
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; }; 29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; };
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; }; 29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; };
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; }; 29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; };
86076CC959C487B30F69CC32 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E6D8479D48A4650167EAF2 /* libPods.a */; }; DCA2F01D27F1F4FC548C6DF7 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DB768A1F2B4AFFF8B89F1D1 /* libPods.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -123,7 +131,6 @@ ...@@ -123,7 +131,6 @@
060D39791CE45CFE0082AECD /* ImageCropperView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageCropperView.m; sourceTree = "<group>"; }; 060D39791CE45CFE0082AECD /* ImageCropperView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageCropperView.m; sourceTree = "<group>"; };
060D397A1CE45CFE0082AECD /* UIImage+Rotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Rotation.h"; sourceTree = "<group>"; }; 060D397A1CE45CFE0082AECD /* UIImage+Rotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Rotation.h"; sourceTree = "<group>"; };
060D397B1CE45CFE0082AECD /* UIImage+Rotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Rotation.m"; sourceTree = "<group>"; }; 060D397B1CE45CFE0082AECD /* UIImage+Rotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Rotation.m"; sourceTree = "<group>"; };
18E6D8479D48A4650167EAF2 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
2906B5D51CD89246000849B4 /* ClientDetailsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientDetailsTableViewCell.h; sourceTree = "<group>"; }; 2906B5D51CD89246000849B4 /* ClientDetailsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientDetailsTableViewCell.h; sourceTree = "<group>"; };
2906B5D61CD89246000849B4 /* ClientDetailsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientDetailsTableViewCell.m; sourceTree = "<group>"; }; 2906B5D61CD89246000849B4 /* ClientDetailsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientDetailsTableViewCell.m; sourceTree = "<group>"; };
2928F7E21CD085F40036D761 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; }; 2928F7E21CD085F40036D761 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = "<group>"; };
...@@ -240,6 +247,21 @@ ...@@ -240,6 +247,21 @@
29BFBD8D1CE44BA900C238FB /* goodsDetailsSectionview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = goodsDetailsSectionview.h; sourceTree = "<group>"; }; 29BFBD8D1CE44BA900C238FB /* goodsDetailsSectionview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = goodsDetailsSectionview.h; sourceTree = "<group>"; };
29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = goodsDetailsSectionview.m; sourceTree = "<group>"; }; 29BFBD8E1CE44BA900C238FB /* goodsDetailsSectionview.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = goodsDetailsSectionview.m; sourceTree = "<group>"; };
29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = goodsDetailsSectionview.xib; sourceTree = "<group>"; }; 29BFBD901CE44BC200C238FB /* goodsDetailsSectionview.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = goodsDetailsSectionview.xib; sourceTree = "<group>"; };
29BFBD961CE46FDA00C238FB /* MyclientEntityModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyclientEntityModel.h; sourceTree = "<group>"; };
29BFBD971CE46FDA00C238FB /* MyclientEntityModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyclientEntityModel.m; sourceTree = "<group>"; };
29BFBD9D1CE4905900C238FB /* HMScanerCardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScanerCardViewController.h; sourceTree = "<group>"; };
29BFBD9E1CE4905900C238FB /* HMScanerCardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScanerCardViewController.m; sourceTree = "<group>"; };
29BFBD9F1CE4905900C238FB /* HMScanner.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = HMScanner.bundle; sourceTree = "<group>"; };
29BFBDA01CE4905900C238FB /* HMScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScanner.h; sourceTree = "<group>"; };
29BFBDA11CE4905900C238FB /* HMScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScanner.m; sourceTree = "<group>"; };
29BFBDA21CE4905900C238FB /* HMScannerBorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScannerBorder.h; sourceTree = "<group>"; };
29BFBDA31CE4905900C238FB /* HMScannerBorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScannerBorder.m; sourceTree = "<group>"; };
29BFBDA41CE4905900C238FB /* HMScannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScannerController.h; sourceTree = "<group>"; };
29BFBDA51CE4905900C238FB /* HMScannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScannerController.m; sourceTree = "<group>"; };
29BFBDA61CE4905900C238FB /* HMScannerMaskView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScannerMaskView.h; sourceTree = "<group>"; };
29BFBDA71CE4905900C238FB /* HMScannerMaskView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScannerMaskView.m; sourceTree = "<group>"; };
29BFBDA81CE4905900C238FB /* HMScannerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMScannerViewController.h; sourceTree = "<group>"; };
29BFBDA91CE4905900C238FB /* HMScannerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HMScannerViewController.m; sourceTree = "<group>"; };
29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductCollectionViewCell.h; sourceTree = "<group>"; }; 29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductCollectionViewCell.h; sourceTree = "<group>"; };
29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductCollectionViewCell.m; sourceTree = "<group>"; }; 29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductCollectionViewCell.m; sourceTree = "<group>"; };
29C584EB1CDA429500C6F677 /* ProductDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsViewController.h; sourceTree = "<group>"; }; 29C584EB1CDA429500C6F677 /* ProductDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsViewController.h; sourceTree = "<group>"; };
...@@ -274,6 +296,7 @@ ...@@ -274,6 +296,7 @@
29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningCollectionReusableView.m; sourceTree = "<group>"; }; 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningCollectionReusableView.m; sourceTree = "<group>"; };
29F726021CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreeningSecondCollectionReusableView.h; sourceTree = "<group>"; }; 29F726021CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreeningSecondCollectionReusableView.h; sourceTree = "<group>"; };
29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningSecondCollectionReusableView.m; sourceTree = "<group>"; }; 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningSecondCollectionReusableView.m; sourceTree = "<group>"; };
2DB768A1F2B4AFFF8B89F1D1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; }; D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -283,7 +306,7 @@ ...@@ -283,7 +306,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
86076CC959C487B30F69CC32 /* libPods.a in Frameworks */, DCA2F01D27F1F4FC548C6DF7 /* libPods.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -407,6 +430,7 @@ ...@@ -407,6 +430,7 @@
2928F7DE1CD085430036D761 /* Tools */ = { 2928F7DE1CD085430036D761 /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29BFBD9C1CE4905900C238FB /* QRCode */,
29BFBD841CE4288A00C238FB /* Customercenter */, 29BFBD841CE4288A00C238FB /* Customercenter */,
29F725F81CE17AE40072FE0E /* Shopperscenter */, 29F725F81CE17AE40072FE0E /* Shopperscenter */,
29E28CE51CE0B90600812A55 /* Regularexpressions */, 29E28CE51CE0B90600812A55 /* Regularexpressions */,
...@@ -559,6 +583,7 @@ ...@@ -559,6 +583,7 @@
2962D06A1CD1A3FE0058829D /* MyClient */ = { 2962D06A1CD1A3FE0058829D /* MyClient */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29BFBD951CE46D7900C238FB /* model */,
299876281CD9962800C90D0A /* Orderdetails */, 299876281CD9962800C90D0A /* Orderdetails */,
29A8D3951CD85A3C004D558F /* Clientdetails */, 29A8D3951CD85A3C004D558F /* Clientdetails */,
2949BABA1CD2EF800049385A /* view */, 2949BABA1CD2EF800049385A /* view */,
...@@ -818,6 +843,35 @@ ...@@ -818,6 +843,35 @@
name = Customercenter; name = Customercenter;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29BFBD951CE46D7900C238FB /* model */ = {
isa = PBXGroup;
children = (
29BFBD961CE46FDA00C238FB /* MyclientEntityModel.h */,
29BFBD971CE46FDA00C238FB /* MyclientEntityModel.m */,
);
name = model;
sourceTree = "<group>";
};
29BFBD9C1CE4905900C238FB /* QRCode */ = {
isa = PBXGroup;
children = (
29BFBD9D1CE4905900C238FB /* HMScanerCardViewController.h */,
29BFBD9E1CE4905900C238FB /* HMScanerCardViewController.m */,
29BFBD9F1CE4905900C238FB /* HMScanner.bundle */,
29BFBDA01CE4905900C238FB /* HMScanner.h */,
29BFBDA11CE4905900C238FB /* HMScanner.m */,
29BFBDA21CE4905900C238FB /* HMScannerBorder.h */,
29BFBDA31CE4905900C238FB /* HMScannerBorder.m */,
29BFBDA41CE4905900C238FB /* HMScannerController.h */,
29BFBDA51CE4905900C238FB /* HMScannerController.m */,
29BFBDA61CE4905900C238FB /* HMScannerMaskView.h */,
29BFBDA71CE4905900C238FB /* HMScannerMaskView.m */,
29BFBDA81CE4905900C238FB /* HMScannerViewController.h */,
29BFBDA91CE4905900C238FB /* HMScannerViewController.m */,
);
path = QRCode;
sourceTree = "<group>";
};
29C584E51CDA246900C6F677 /* controller */ = { 29C584E51CDA246900C6F677 /* controller */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -973,7 +1027,7 @@ ...@@ -973,7 +1027,7 @@
4333C4B25549A396FC0CD944 /* Frameworks */ = { 4333C4B25549A396FC0CD944 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
18E6D8479D48A4650167EAF2 /* libPods.a */, 2DB768A1F2B4AFFF8B89F1D1 /* libPods.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1021,7 +1075,7 @@ ...@@ -1021,7 +1075,7 @@
TargetAttributes = { TargetAttributes = {
29706DA01CD082980003C412 = { 29706DA01CD082980003C412 = {
CreatedOnToolsVersion = 7.3; CreatedOnToolsVersion = 7.3;
DevelopmentTeam = W54V2VB863; DevelopmentTeam = 39XYE6VSP8;
}; };
}; };
}; };
...@@ -1069,6 +1123,7 @@ ...@@ -1069,6 +1123,7 @@
29706DAF1CD082990003C412 /* Main.storyboard in Resources */, 29706DAF1CD082990003C412 /* Main.storyboard in Resources */,
29EC331B1CE023D5005F0C13 /* ChangePasswordViewController.xib in Resources */, 29EC331B1CE023D5005F0C13 /* ChangePasswordViewController.xib in Resources */,
29360C311CDDC487002A5D89 /* ScreeningView.xib in Resources */, 29360C311CDDC487002A5D89 /* ScreeningView.xib in Resources */,
29BFBDAB1CE4905900C238FB /* HMScanner.bundle in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1127,12 +1182,15 @@ ...@@ -1127,12 +1182,15 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
29BFBD981CE46FDA00C238FB /* MyclientEntityModel.m in Sources */,
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */, 29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */,
29BFBDB01CE4905900C238FB /* HMScannerViewController.m in Sources */,
04A14A281CE0FC5600DAD5F3 /* RightSubView.m in Sources */, 04A14A281CE0FC5600DAD5F3 /* RightSubView.m in Sources */,
29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */, 29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */,
29BFBD871CE428B200C238FB /* Customermanager.m in Sources */, 29BFBD871CE428B200C238FB /* Customermanager.m in Sources */,
299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */, 299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */,
29BB276C1CD9DE74009A0813 /* FollowHeartViewController.m in Sources */, 29BB276C1CD9DE74009A0813 /* FollowHeartViewController.m in Sources */,
29BFBDAD1CE4905900C238FB /* HMScannerBorder.m in Sources */,
2928F8381CD09E730036D761 /* CustomButton.m in Sources */, 2928F8381CD09E730036D761 /* CustomButton.m in Sources */,
0470D6111CE2936000647F0F /* SeceneLibraryView.m in Sources */, 0470D6111CE2936000647F0F /* SeceneLibraryView.m in Sources */,
2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */, 2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */,
...@@ -1149,6 +1207,7 @@ ...@@ -1149,6 +1207,7 @@
2928F7E71CD087FE0036D761 /* BaseViewController.m in Sources */, 2928F7E71CD087FE0036D761 /* BaseViewController.m in Sources */,
299876271CD9837C00C90D0A /* OrderTableViewCell.m in Sources */, 299876271CD9837C00C90D0A /* OrderTableViewCell.m in Sources */,
2998763C1CD9983A00C90D0A /* CommodityListTableViewCell.m in Sources */, 2998763C1CD9983A00C90D0A /* CommodityListTableViewCell.m in Sources */,
29BFBDAA1CE4905900C238FB /* HMScanerCardViewController.m in Sources */,
2962D0791CD1CBC60058829D /* NetworkRequestClassManager.m in Sources */, 2962D0791CD1CBC60058829D /* NetworkRequestClassManager.m in Sources */,
29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */, 29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */,
29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */, 29EAAEA01CDC79DC00C4DBA2 /* CustomerOrderViewController.m in Sources */,
...@@ -1161,6 +1220,7 @@ ...@@ -1161,6 +1220,7 @@
29360C2F1CDDC47E002A5D89 /* ScreeningView.m in Sources */, 29360C2F1CDDC47E002A5D89 /* ScreeningView.m in Sources */,
29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */, 29EAAE9C1CDC74CA00C4DBA2 /* AllCustomerViewController.m in Sources */,
04A14A2B1CE0FC7F00DAD5F3 /* FootSubView.m in Sources */, 04A14A2B1CE0FC7F00DAD5F3 /* FootSubView.m in Sources */,
29BFBDAE1CE4905900C238FB /* HMScannerController.m in Sources */,
2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */, 2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */,
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */, 29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */,
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */, 29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */,
...@@ -1174,6 +1234,7 @@ ...@@ -1174,6 +1234,7 @@
299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */, 299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */,
29EC331A1CE023D5005F0C13 /* ChangePasswordViewController.m in Sources */, 29EC331A1CE023D5005F0C13 /* ChangePasswordViewController.m in Sources */,
2962D07D1CD1E4490058829D /* NSArray+Objectwithindex.m in Sources */, 2962D07D1CD1E4490058829D /* NSArray+Objectwithindex.m in Sources */,
29BFBDAF1CE4905900C238FB /* HMScannerMaskView.m in Sources */,
04A14A251CE0FC3A00DAD5F3 /* LeftSubView.m in Sources */, 04A14A251CE0FC3A00DAD5F3 /* LeftSubView.m in Sources */,
299876391CD9981800C90D0A /* GoodsInformationTableViewCell.m in Sources */, 299876391CD9981800C90D0A /* GoodsInformationTableViewCell.m in Sources */,
2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */, 2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */,
...@@ -1198,6 +1259,7 @@ ...@@ -1198,6 +1259,7 @@
29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */, 29834EC01CDF5E4E001A484F /* ScreeningFirstCollectionViewCell.m in Sources */,
29834EC51CDF76C1001A484F /* UserViewController.m in Sources */, 29834EC51CDF76C1001A484F /* UserViewController.m in Sources */,
29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */, 29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */,
29BFBDAC1CE4905900C238FB /* HMScanner.m in Sources */,
2962D06D1CD1A43A0058829D /* ClientViewController.m in Sources */, 2962D06D1CD1A43A0058829D /* ClientViewController.m in Sources */,
29A8D3981CD85A58004D558F /* ClientdetailsViewController.m in Sources */, 29A8D3981CD85A58004D558F /* ClientdetailsViewController.m in Sources */,
); );
...@@ -1318,8 +1380,8 @@ ...@@ -1318,8 +1380,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
COMPRESS_PNG_FILES = NO; COMPRESS_PNG_FILES = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch";
...@@ -1357,7 +1419,7 @@ ...@@ -1357,7 +1419,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe"; PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
...@@ -1370,8 +1432,8 @@ ...@@ -1370,8 +1432,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 超级 朱 (SXSQ6S5D55)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: 云霄 曹 (WM8ZU7YY98)";
COMPRESS_PNG_FILES = NO; COMPRESS_PNG_FILES = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/Tools/PrefixHeader.pch";
...@@ -1409,7 +1471,7 @@ ...@@ -1409,7 +1471,7 @@
); );
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple; PRODUCT_BUNDLE_IDENTIFIER = com.gomore.opple;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "d25ba75f-c4da-4bef-b966-3a998dcbffbe"; PROVISIONING_PROFILE = "f89bebf5-81e2-4c61-9052-8c7bb0f9ddd6";
STRIP_PNG_TEXT = NO; STRIP_PNG_TEXT = NO;
USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**"; USER_HEADER_SEARCH_PATHS = "$(PODS_ROOT)/**";
}; };
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<array> <array>
<string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<rect key="frame" x="24" y="88" width="721" height="176"/> <rect key="frame" x="24" y="88" width="721" height="176"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="矢量智能对象" id="3z6-rk-Y7U"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="当前" id="3z6-rk-Y7U">
<rect key="frame" x="19" y="14" width="100" height="100"/> <rect key="frame" x="19" y="14" width="100" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView> </imageView>
...@@ -240,6 +240,9 @@ ...@@ -240,6 +240,9 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="box-副本"/> <state key="normal" backgroundImage="box-副本"/>
<state key="selected" image="bg"/> <state key="selected" image="bg"/>
<connections>
<action selector="SelectedButtonClick:" destination="NV8-I4-ig4" eventType="touchUpInside" id="XVi-Wb-GbA"/>
</connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设为当前用户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Bs-Yx-wfk"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="设为当前用户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9Bs-Yx-wfk">
<rect key="frame" x="599" y="69" width="100" height="20"/> <rect key="frame" x="599" y="69" width="100" height="20"/>
...@@ -731,7 +734,7 @@ ...@@ -731,7 +734,7 @@
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="firstcell" rowHeight="84" id="XgA-9w-ut9" customClass="OrderInformationTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="firstcell" rowHeight="84" id="XgA-9w-ut9" customClass="OrderInformationTableViewCell">
<rect key="frame" x="0.0" y="113.5" width="768" height="84"/> <rect key="frame" x="0.0" y="49.5" width="768" height="84"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XgA-9w-ut9" id="BWi-jv-OOH"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XgA-9w-ut9" id="BWi-jv-OOH">
<rect key="frame" x="0.0" y="0.0" width="768" height="83.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="83.5"/>
...@@ -808,7 +811,7 @@ ...@@ -808,7 +811,7 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="secondcell" rowHeight="160" id="rIO-yd-hh7" customClass="PersonInformationTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="secondcell" rowHeight="160" id="rIO-yd-hh7" customClass="PersonInformationTableViewCell">
<rect key="frame" x="0.0" y="197.5" width="768" height="160"/> <rect key="frame" x="0.0" y="133.5" width="768" height="160"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rIO-yd-hh7" id="mn8-g0-Zqo"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rIO-yd-hh7" id="mn8-g0-Zqo">
<rect key="frame" x="0.0" y="0.0" width="768" height="159.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="159.5"/>
...@@ -937,7 +940,7 @@ ...@@ -937,7 +940,7 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="thirdcell" rowHeight="110" id="PfN-24-v5t" customClass="GoodsInformationTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="thirdcell" rowHeight="110" id="PfN-24-v5t" customClass="GoodsInformationTableViewCell">
<rect key="frame" x="0.0" y="357.5" width="768" height="110"/> <rect key="frame" x="0.0" y="293.5" width="768" height="110"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PfN-24-v5t" id="2Je-94-WVY"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PfN-24-v5t" id="2Je-94-WVY">
<rect key="frame" x="0.0" y="0.0" width="768" height="109.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="109.5"/>
...@@ -1029,7 +1032,7 @@ ...@@ -1029,7 +1032,7 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fourthcell" rowHeight="80" id="47T-H0-tG7" customClass="CommodityListTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fourthcell" rowHeight="80" id="47T-H0-tG7" customClass="CommodityListTableViewCell">
<rect key="frame" x="0.0" y="467.5" width="768" height="80"/> <rect key="frame" x="0.0" y="403.5" width="768" height="80"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="47T-H0-tG7" id="zXR-bC-Wdh"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="47T-H0-tG7" id="zXR-bC-Wdh">
<rect key="frame" x="0.0" y="0.0" width="768" height="79.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="79.5"/>
...@@ -1090,7 +1093,7 @@ ...@@ -1090,7 +1093,7 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fifthcell" rowHeight="75" id="9Yp-o4-Cqr" customClass="AttachmentInformationTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="fifthcell" rowHeight="75" id="9Yp-o4-Cqr" customClass="AttachmentInformationTableViewCell">
<rect key="frame" x="0.0" y="547.5" width="768" height="75"/> <rect key="frame" x="0.0" y="483.5" width="768" height="75"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9Yp-o4-Cqr" id="ySo-v9-ySh"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9Yp-o4-Cqr" id="ySo-v9-ySh">
<rect key="frame" x="0.0" y="0.0" width="768" height="74.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="74.5"/>
...@@ -1150,7 +1153,7 @@ ...@@ -1150,7 +1153,7 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="sixthcell" rowHeight="50" id="PNT-Fy-4Hi" customClass="AllpriceTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="sixthcell" rowHeight="50" id="PNT-Fy-4Hi" customClass="AllpriceTableViewCell">
<rect key="frame" x="0.0" y="622.5" width="768" height="50"/> <rect key="frame" x="0.0" y="558.5" width="768" height="50"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PNT-Fy-4Hi" id="PxE-0c-Zdt"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="PNT-Fy-4Hi" id="PxE-0c-Zdt">
<rect key="frame" x="0.0" y="0.0" width="768" height="49.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="49.5"/>
...@@ -1327,7 +1330,7 @@ ...@@ -1327,7 +1330,7 @@
</collectionViewFlowLayout> </collectionViewFlowLayout>
<cells> <cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell"> <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="productcell" id="J5m-0M-uqb" customClass="ProductCollectionViewCell">
<rect key="frame" x="0.0" y="64" width="300" height="300"/> <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="300" height="300"/> <rect key="frame" x="0.0" y="0.0" width="300" height="300"/>
...@@ -1400,7 +1403,7 @@ ...@@ -1400,7 +1403,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="productDetailscell" rowHeight="170" id="Sye-2R-IQf" customClass="ProductDetailsTableViewCell">
<rect key="frame" x="0.0" y="92" width="768" height="170"/> <rect key="frame" x="0.0" y="28" width="768" height="170"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Sye-2R-IQf" id="CXs-SR-gHP">
<rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/> <rect key="frame" x="0.0" y="0.0" width="768" height="169.5"/>
...@@ -3182,6 +3185,6 @@ ...@@ -3182,6 +3185,6 @@
<image name="bg" width="27" height="26"/> <image name="bg" width="27" height="26"/>
<image name="box-副本" width="26" height="26"/> <image name="box-副本" width="26" height="26"/>
<image name="line" width="301" height="30"/> <image name="line" width="301" height="30"/>
<image name="矢量智能对象" width="110" height="110"/> <image name="当前" width="110" height="110"/>
</resources> </resources>
</document> </document>
...@@ -32,10 +32,9 @@ PODS: ...@@ -32,10 +32,9 @@ PODS:
- MMDrawerController/Core - MMDrawerController/Core
- MMDrawerController/Subclass (0.6.0): - MMDrawerController/Subclass (0.6.0):
- MMDrawerController/Core - MMDrawerController/Core
- SDWebImage (3.7.5): - SDWebImage (3.7.6):
- SDWebImage/Core (= 3.7.5) - SDWebImage/Core (= 3.7.6)
- SDWebImage/Core (3.7.5) - SDWebImage/Core (3.7.6)
- SVProgressHUD (2.0.3)
DEPENDENCIES: DEPENDENCIES:
- AFNetworking (~> 3.1.0) - AFNetworking (~> 3.1.0)
...@@ -47,7 +46,6 @@ DEPENDENCIES: ...@@ -47,7 +46,6 @@ DEPENDENCIES:
- MJRefresh (~> 3.1.0) - MJRefresh (~> 3.1.0)
- MMDrawerController (~> 0.6.0) - MMDrawerController (~> 0.6.0)
- SDWebImage (~> 3.7.5) - SDWebImage (~> 3.7.5)
- SVProgressHUD (~> 2.0.3)
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
...@@ -58,7 +56,6 @@ SPEC CHECKSUMS: ...@@ -58,7 +56,6 @@ SPEC CHECKSUMS:
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548 MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4 MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4
MMDrawerController: e3a54a5570388463ad3b36975251575b50c4e1a0 MMDrawerController: e3a54a5570388463ad3b36975251575b50c4e1a0
SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
COCOAPODS: 0.39.0 COCOAPODS: 0.39.0
//
// HMScanerCardViewController.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/3.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HMScanerCardViewController : UIViewController
- (instancetype)initWithCardName:(NSString *)cardName avatar:(UIImage *)avatar;
@end
//
// HMScanerCardViewController.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/3.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScanerCardViewController.h"
#import "HMScanner.h"
@interface HMScanerCardViewController()
/// 名片字符串
@property (nonatomic) NSString *cardName;
/// 头像图片
@property (nonatomic) UIImage *avatar;
@end
@implementation HMScanerCardViewController {
UIImageView *cardImageView;
}
#pragma mark - 构造函数
- (instancetype)initWithCardName:(NSString *)cardName avatar:(UIImage *)avatar {
self = [super init];
if (self) {
self.cardName = cardName;
self.avatar = avatar;
}
return self;
}
#pragma mark - 设置界面
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor darkGrayColor];
[self prepareNavigationBar];
CGFloat width = self.view.bounds.size.width - 80;
cardImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, width, width)];
cardImageView.center = self.view.center;
[self.view addSubview:cardImageView];
[HMScanner qrImageWithString:self.cardName avatar:self.avatar completion:^(UIImage *image) {
cardImageView.image = image;
}];
}
/// 准备导航栏
- (void)prepareNavigationBar {
// 1> 背景颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithWhite:0.1 alpha:1.0]];
self.navigationController.navigationBar.translucent = YES;
self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
// 2> 标题
self.title = @"我的名片";
}
@end
//
// HMScanner.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
/// 二维码/条码扫描器
@interface HMScanner : NSObject
/// 使用视图实例化扫描器,扫描预览窗口会添加到指定视图中
///
/// @param view 指定的视图
/// @param scanFrame 扫描范围
/// @param completion 完成回调
///
/// @return 扫描器
+ (instancetype)scanerWithView:(UIView *)view scanFrame:(CGRect)scanFrame completion:(void (^)(NSString *stringValue))completion;
/// 扫描图像
///
/// @param image 包含二维码的图像
/// @remark 目前只支持 64 位的 iOS 设备
+ (void)scaneImage:(UIImage *)image completion:(void (^)(NSArray *values))completion;
/// 使用 string / 头像 异步生成二维码图像
///
/// @param string 二维码图像的字符串
/// @param avatar 头像图像,默认比例 0.2
/// @param completion 完成回调
+ (void)qrImageWithString:(NSString *)string avatar:(UIImage *)avatar completion:(void (^)(UIImage *image))completion;
/// 使用 string / 头像 异步生成二维码图像,并且指定头像占二维码图像的比例
///
/// @param string 二维码图像的字符串
/// @param avatar 头像图像
/// @param scale 头像占二维码图像的比例
/// @param completion 完成回调
+ (void)qrImageWithString:(NSString *)string avatar:(UIImage *)avatar scale:(CGFloat)scale completion:(void (^)(UIImage *))completion;
/// 开始扫描
- (void)startScan;
/// 停止扫描
- (void)stopScan;
@end
//
// HMScanner.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScanner.h"
#import <AVFoundation/AVFoundation.h>
/// 最大检测次数
#define kMaxDetectedCount 20
@interface HMScanner() <AVCaptureMetadataOutputObjectsDelegate>
/// 父视图弱引用
@property (nonatomic, weak) UIView *parentView;
/// 扫描范围
@property (nonatomic) CGRect scanFrame;
/// 完成回调
@property (nonatomic, copy) void (^completionCallBack)(NSString *);
@end
@implementation HMScanner {
/// 拍摄会话
AVCaptureSession *session;
/// 预览图层
AVCaptureVideoPreviewLayer *previewLayer;
/// 绘制图层
CALayer *drawLayer;
/// 当前检测计数
NSInteger currentDetectedCount;
}
#pragma mark - 生成二维码
+ (void)qrImageWithString:(NSString *)string avatar:(UIImage *)avatar completion:(void (^)(UIImage *))completion {
[self qrImageWithString:string avatar:avatar scale:0.20 completion:completion];
}
+ (void)qrImageWithString:(NSString *)string avatar:(UIImage *)avatar scale:(CGFloat)scale completion:(void (^)(UIImage *))completion {
NSAssert(completion != nil, @"必须传入完成回调");
dispatch_async(dispatch_get_global_queue(0, 0), ^{
CIFilter *qrFilter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
[qrFilter setDefaults];
[qrFilter setValue:[string dataUsingEncoding:NSUTF8StringEncoding] forKey:@"inputMessage"];
CIImage *ciImage = qrFilter.outputImage;
CGAffineTransform transform = CGAffineTransformMakeScale(10, 10);
CIImage *transformedImage = [ciImage imageByApplyingTransform:transform];
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef cgImage = [context createCGImage:transformedImage fromRect:transformedImage.extent];
UIImage *qrImage = [UIImage imageWithCGImage:cgImage scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp];
CGImageRelease(cgImage);
if (avatar != nil) {
qrImage = [self qrcodeImage:qrImage addAvatar:avatar scale:scale];
}
dispatch_async(dispatch_get_main_queue(), ^{ completion(qrImage); });
});
}
+ (UIImage *)qrcodeImage:(UIImage *)qrImage addAvatar:(UIImage *)avatar scale:(CGFloat)scale {
CGFloat screenScale = [UIScreen mainScreen].scale;
CGRect rect = CGRectMake(0, 0, qrImage.size.width * screenScale, qrImage.size.height * screenScale);
UIGraphicsBeginImageContextWithOptions(rect.size, YES, screenScale);
[qrImage drawInRect:rect];
CGSize avatarSize = CGSizeMake(rect.size.width * scale, rect.size.height * scale);
CGFloat x = (rect.size.width - avatarSize.width) * 0.5;
CGFloat y = (rect.size.height - avatarSize.height) * 0.5;
[avatar drawInRect:CGRectMake(x, y, avatarSize.width, avatarSize.height)];
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return [UIImage imageWithCGImage:result.CGImage scale:screenScale orientation:UIImageOrientationUp];
}
#pragma mark - 扫描图像方法
+ (void)scaneImage:(UIImage *)image completion:(void (^)(NSArray *))completion {
NSAssert(completion != nil, @"必须传入完成回调");
dispatch_async(dispatch_get_global_queue(0, 0), ^{
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil options:@{CIDetectorAccuracy: CIDetectorAccuracyHigh}];
CIImage *ciImage = [[CIImage alloc] initWithImage:image];
NSArray *features = [detector featuresInImage:ciImage];
NSMutableArray *arrayM = [NSMutableArray arrayWithCapacity:features.count];
for (CIQRCodeFeature *feature in features) {
[arrayM addObject:feature.messageString];
}
dispatch_async(dispatch_get_main_queue(), ^{
completion(arrayM.copy);
});
});
}
#pragma mark - 构造函数
+ (instancetype)scanerWithView:(UIView *)view scanFrame:(CGRect)scanFrame completion:(void (^)(NSString *))completion {
NSAssert(completion != nil, @"必须传入完成回调");
return [[self alloc] initWithView:view scanFrame:scanFrame completion:completion];
}
- (instancetype)initWithView:(UIView *)view scanFrame:(CGRect)scanFrame completion:(void (^)(NSString *))completion {
self = [super init];
if (self) {
self.parentView = view;
self.scanFrame = scanFrame;
self.completionCallBack = completion;
[self setupSession];
}
return self;
}
#pragma mark - 公共方法
/// 开始扫描
- (void)startScan {
if ([session isRunning]) {
return;
}
currentDetectedCount = 0;
[session startRunning];
}
- (void)stopScan {
if (![session isRunning]) {
return;
}
[session stopRunning];
}
#pragma mark - AVCaptureMetadataOutputObjectsDelegate
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection {
[self clearDrawLayer];
for (id obj in metadataObjects) {
// 判断检测到的对象类型
if (![obj isKindOfClass:[AVMetadataMachineReadableCodeObject class]]) {
return;
}
// 转换对象坐标
AVMetadataMachineReadableCodeObject *dataObject = (AVMetadataMachineReadableCodeObject *)[previewLayer transformedMetadataObjectForMetadataObject:obj];
// 判断扫描范围
if (!CGRectContainsRect(self.scanFrame, dataObject.bounds)) {
continue;
}
if (currentDetectedCount++ < kMaxDetectedCount) {
// 绘制边角
[self drawCornersShape:dataObject];
} else {
[self stopScan];
// 完成回调
if (self.completionCallBack != nil) {
self.completionCallBack(dataObject.stringValue);
}
}
}
}
/// 清空绘制图层
- (void)clearDrawLayer {
if (drawLayer.sublayers.count == 0) {
return;
}
[drawLayer.sublayers makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
}
/// 绘制条码形状
///
/// @param dataObject 识别到的数据对象
- (void)drawCornersShape:(AVMetadataMachineReadableCodeObject *)dataObject {
if (dataObject.corners.count == 0) {
return;
}
CAShapeLayer *layer = [CAShapeLayer layer];
layer.lineWidth = 4;
layer.strokeColor = [UIColor greenColor].CGColor;
layer.fillColor = [UIColor clearColor].CGColor;
layer.path = [self cornersPath:dataObject.corners];
[drawLayer addSublayer:layer];
}
/// 使用 corners 数组生成绘制路径
///
/// @param corners corners 数组
///
/// @return 绘制路径
- (CGPathRef)cornersPath:(NSArray *)corners {
UIBezierPath *path = [UIBezierPath bezierPath];
CGPoint point = CGPointZero;
// 1. 移动到第一个点
NSInteger index = 0;
CGPointMakeWithDictionaryRepresentation((CFDictionaryRef)corners[index++], &point);
[path moveToPoint:point];
// 2. 遍历剩余的点
while (index < corners.count) {
CGPointMakeWithDictionaryRepresentation((CFDictionaryRef)corners[index++], &point);
[path addLineToPoint:point];
}
// 3. 关闭路径
[path closePath];
return path.CGPath;
}
#pragma mark - 扫描相关方法
/// 设置绘制图层和预览图层
- (void)setupLayers {
if (self.parentView == nil) {
NSLog(@"父视图不存在");
return;
}
if (session == nil) {
NSLog(@"拍摄会话不存在");
return;
}
// 绘制图层
drawLayer = [CALayer layer];
drawLayer.frame = self.parentView.bounds;
[self.parentView.layer insertSublayer:drawLayer atIndex:0];
// 预览图层
previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
previewLayer.frame = self.parentView.bounds;
[self.parentView.layer insertSublayer:previewLayer atIndex:0];
}
/// 设置扫描会话
- (void)setupSession {
// 1> 输入设备
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
AVCaptureDeviceInput *videoInput = [AVCaptureDeviceInput deviceInputWithDevice:device error:nil];
if (videoInput == nil) {
NSLog(@"创建输入设备失败");
return;
}
// 2> 数据输出
AVCaptureMetadataOutput *dataOutput = [[AVCaptureMetadataOutput alloc] init];
// 3> 拍摄会话 - 判断能够添加设备
session = [[AVCaptureSession alloc] init];
if (![session canAddInput:videoInput]) {
NSLog(@"无法添加输入设备");
session = nil;
return;
}
if (![session canAddOutput:dataOutput]) {
NSLog(@"无法添加输入设备");
session = nil;
return;
}
// 4> 添加输入/输出设备
[session addInput:videoInput];
[session addOutput:dataOutput];
// 5> 设置扫描类型
dataOutput.metadataObjectTypes = dataOutput.availableMetadataObjectTypes;
[dataOutput setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
// 6> 设置预览图层会话
[self setupLayers];
}
@end
//
// HMScannerBorder.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
/// 扫描框视图
@interface HMScannerBorder : UIView
/// 开始扫描动画
- (void)startScannerAnimating;
/// 停止扫描动画
- (void)stopScannerAnimating;
@end
//
// HMScannerBorder.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScannerBorder.h"
@implementation HMScannerBorder {
/// 冲击波图像
UIImageView *scannerLine;
}
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self prepareUI];
}
return self;
}
#pragma mark - 扫描动画方法
/// 开始扫描动画
- (void)startScannerAnimating {
[self stopScannerAnimating];
[UIView animateWithDuration:3.0
delay:0.0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
[UIView setAnimationRepeatCount:MAXFLOAT];
scannerLine.center = CGPointMake(self.bounds.size.width * 0.5, self.bounds.size.height);
} completion:nil];
}
/// 停止扫描动画
- (void)stopScannerAnimating {
[scannerLine.layer removeAllAnimations];
scannerLine.center = CGPointMake(self.bounds.size.width * 0.5, 0);
}
#pragma mark - 设置界面
- (void)prepareUI {
self.clipsToBounds = YES;
// 图像文件包
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSURL *url = [bundle URLForResource:@"HMScanner" withExtension:@"bundle"];
NSBundle *imageBundle = [NSBundle bundleWithURL:url];
// 冲击波图像
scannerLine = [[UIImageView alloc] initWithImage:[self imageWithName:@"QRCodeScanLine" bundle:imageBundle]];
scannerLine.frame = CGRectMake(0, 0, self.bounds.size.width, scannerLine.bounds.size.height);
scannerLine.center = CGPointMake(self.bounds.size.width * 0.5, 0);
[self addSubview:scannerLine];
// 加载边框图像
for (NSInteger i = 1; i < 5; i++) {
NSString *imgName = [NSString stringWithFormat:@"ScanQR%zd", i];
UIImageView *img = [[UIImageView alloc] initWithImage:[self imageWithName:imgName bundle:imageBundle]];
[self addSubview:img];
CGFloat offsetX = self.bounds.size.width - img.bounds.size.width;
CGFloat offsetY = self.bounds.size.height - img.bounds.size.height;
switch (i) {
case 2:
img.frame = CGRectOffset(img.frame, offsetX, 0);
break;
case 3:
img.frame = CGRectOffset(img.frame, 0, offsetY);
break;
case 4:
img.frame = CGRectOffset(img.frame, offsetX, offsetY);
break;
default:
break;
}
}
}
- (UIImage *)imageWithName:(NSString *)imageName bundle:(NSBundle *)imageBundle {
NSString *fileName = [NSString stringWithFormat:@"%@@2x", imageName];
NSString *path = [imageBundle pathForResource:fileName ofType:@"png"];
return [[UIImage imageWithContentsOfFile:path] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
}
@end
//
// HMScannerController.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
/*!
扫描控制器
作用:
* 提供一个导航控制器,扫描 `二维码 / 条形码`
* 能够生成指定 `字符串` + `avatar(可选)` 的二维码名片
* 能够识别相册图片中的二维码(iOS 64 位设备)
使用:
@code
NSString *cardName = @"天涯刀哥 - 傅红雪";
UIImage *avatar = [UIImage imageNamed:@"avatar"];
// 实例化控制器,并指定完成回调
HMScannerController *scanner = [HMScannerController scannerWithCardName:cardName avatar:avatar completion:^(NSString *stringValue) {
self.scanResultLabel.text = stringValue;
}];
// 设置导航标题样式
[scanner setTitleColor:[UIColor whiteColor] tintColor:[UIColor greenColor]];
// 展现扫描控制器
[self showDetailViewController:scanner sender:nil];
@endcode
*/
@interface HMScannerController : UINavigationController
/// 使用 `名片字符串` 实例化扫描导航控制器
///
/// @param cardName 名片字符串
/// @param avatar 头像图像
/// @param completion 完成回调
///
/// @return 扫描导航控制器
+ (instancetype)scannerWithCardName:(NSString *)cardName avatar:(UIImage *)avatar completion:(void (^)(NSString *stringValue))completion;
/// 使用 名片字符串 / 头像 异步生成二维码图像,并且指定头像占二维码图像的比例
///
/// @param string 名片字符串
/// @param avatar 头像图像
/// @param scale 头像占二维码图像的比例
/// @param completion 完成回调
+ (void)cardImageWithCardName:(NSString *)cardName avatar:(UIImage *)avatar scale:(CGFloat)scale completion:(void (^)(UIImage *image))completion;
/// 设置导航栏标题颜色和 tintColor
///
/// @param titleColor 标题颜色
/// @param tintColor tintColor
- (void)setTitleColor:(UIColor *)titleColor tintColor:(UIColor *)tintColor;
@end
//
// HMScannerController.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScannerController.h"
#import "HMScannerViewController.h"
#import "HMScanner.h"
@implementation HMScannerController
+ (void)cardImageWithCardName:(NSString *)cardName avatar:(UIImage *)avatar scale:(CGFloat)scale completion:(void (^)(UIImage *))completion {
[HMScanner qrImageWithString:cardName avatar:avatar scale:scale completion:completion];
}
+ (instancetype)scannerWithCardName:(NSString *)cardName avatar:(UIImage *)avatar completion:(void (^)(NSString *))completion {
NSAssert(completion != nil, @"必须传入完成回调");
return [[self alloc] initWithCardName:cardName avatar:avatar completion:completion];
}
- (instancetype)initWithCardName:(NSString *)cardName avatar:(UIImage *)avatar completion:(void (^)(NSString *))completion {
self = [super init];
if (self) {
HMScannerViewController *scanner = [[HMScannerViewController alloc] initWithCardName:cardName avatar:avatar completion:completion];
[self setTitleColor:[UIColor whiteColor] tintColor:[UIColor greenColor]];
[self pushViewController:scanner animated:NO];
}
return self;
}
- (void)setTitleColor:(UIColor *)titleColor tintColor:(UIColor *)tintColor {
[self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName: titleColor}];
self.navigationBar.tintColor = tintColor;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleLightContent;
}
@end
//
// HMScannerMaskView.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/3.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
/// 扫描遮罩视图
@interface HMScannerMaskView : UIView
/// 使用裁切区域实例化遮罩视图
///
/// @param frame 视图区域
/// @param cropRect 裁切区域
///
/// @return 遮罩视图
+ (instancetype)maskViewWithFrame:(CGRect)frame cropRect:(CGRect)cropRect;
/// 裁切区域
@property (nonatomic) CGRect cropRect;
@end
//
// HMScannerMaskView.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/3.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScannerMaskView.h"
@implementation HMScannerMaskView
+ (instancetype)maskViewWithFrame:(CGRect)frame cropRect:(CGRect)cropRect {
HMScannerMaskView *maskView = [[self alloc] initWithFrame:frame];
maskView.backgroundColor = [UIColor clearColor];
maskView.cropRect = cropRect;
return maskView;
}
- (void)setCropRect:(CGRect)cropRect {
_cropRect = cropRect;
[self setNeedsDisplay];
}
- (void)drawRect:(CGRect)rect {
CGContextRef ctx = UIGraphicsGetCurrentContext();
[[UIColor colorWithWhite:0.0 alpha:0.4] setFill];
CGContextFillRect(ctx, rect);
CGContextClearRect(ctx, self.cropRect);
[[UIColor colorWithWhite:0.95 alpha:1.0] setStroke];
CGContextStrokeRectWithWidth(ctx, CGRectInset(_cropRect, 1, 1), 1);
}
@end
//
// HMScannerViewController.h
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import <UIKit/UIKit.h>
/// 扫描控制器
@interface HMScannerViewController : UIViewController
/// 实例化扫描控制器
///
/// @param cardName 名片字符串
/// @param avatar 头像图片
/// @param completion 完成回调
///
/// @return 扫描控制器
- (instancetype)initWithCardName:(NSString *)cardName avatar:(UIImage *)avatar completion:(void (^)(NSString *stringValue))completion;
@end
//
// HMScannerViewController.m
// HMQRCodeScanner
//
// Created by 刘凡 on 16/1/2.
// Copyright © 2016年 itheima. All rights reserved.
//
#import "HMScannerViewController.h"
#import "HMScanerCardViewController.h"
#import "HMScannerBorder.h"
#import "HMScannerMaskView.h"
#import "HMScanner.h"
/// 控件间距
#define kControlMargin 32.0
@interface HMScannerViewController () <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
/// 名片字符串
@property (nonatomic) NSString *cardName;
/// 头像图片
@property (nonatomic) UIImage *avatar;
/// 完成回调
@property (nonatomic, copy) void (^completionCallBack)(NSString *);
@end
@implementation HMScannerViewController {
/// 扫描框
HMScannerBorder *scannerBorder;
/// 扫描器
HMScanner *scanner;
/// 提示标签
UILabel *tipLabel;
}
- (instancetype)initWithCardName:(NSString *)cardName avatar:(UIImage *)avatar completion:(void (^)(NSString *))completion {
self = [super init];
if (self) {
self.cardName = cardName;
self.avatar = avatar;
self.completionCallBack = completion;
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self prepareUI];
// 实例化扫描器
__weak typeof(self) weakSelf = self;
scanner = [HMScanner scanerWithView:self.view scanFrame:scannerBorder.frame completion:^(NSString *stringValue) {
// 完成回调
weakSelf.completionCallBack(stringValue);
// 关闭
[weakSelf clickCloseButton];
}];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[scannerBorder startScannerAnimating];
[scanner startScan];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[scannerBorder stopScannerAnimating];
[scanner stopScan];
}
#pragma mark - 监听方法
/// 点击关闭按钮
- (void)clickCloseButton {
[self dismissViewControllerAnimated:YES completion:nil];
}
/// 点击相册按钮
- (void)clickAlbumButton {
if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
tipLabel.text = @"无法访问相册";
return;
}
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.view.backgroundColor = [UIColor whiteColor];
picker.delegate = self;
[self showDetailViewController:picker sender:nil];
}
/// 点击名片按钮
- (void)clickCardButton {
HMScanerCardViewController *vc = [[HMScanerCardViewController alloc] initWithCardName:self.cardName avatar:self.avatar];
[self showViewController:vc sender:nil];
}
#pragma mark - UIImagePickerControllerDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info {
// 扫描图像
[HMScanner scaneImage:info[UIImagePickerControllerOriginalImage] completion:^(NSArray *values) {
if (values.count > 0) {
self.completionCallBack(values.firstObject);
[self dismissViewControllerAnimated:NO completion:^{
[self clickCloseButton];
}];
} else {
tipLabel.text = @"没有识别到二维码,请选择其他照片";
[self dismissViewControllerAnimated:YES completion:nil];
}
}];
}
#pragma mark - 设置界面
- (void)prepareUI {
self.view.backgroundColor = [UIColor darkGrayColor];
[self prepareNavigationBar];
[self prepareScanerBorder];
[self prepareOtherControls];
}
/// 准备提示标签和名片按钮
- (void)prepareOtherControls {
// 1> 提示标签
tipLabel = [[UILabel alloc] init];
tipLabel.text = @"将二维码/条码放入框中,即可自动扫描";
tipLabel.font = [UIFont systemFontOfSize:12];
tipLabel.textColor = [UIColor whiteColor];
tipLabel.textAlignment = NSTextAlignmentCenter;
[tipLabel sizeToFit];
tipLabel.center = CGPointMake(scannerBorder.center.x, CGRectGetMaxY(scannerBorder.frame) + kControlMargin);
[self.view addSubview:tipLabel];
// 2> 名片按钮
UIButton *cardButton = [[UIButton alloc] init];
[cardButton setTitle:@"我的名片" forState:UIControlStateNormal];
cardButton.titleLabel.font = [UIFont systemFontOfSize:15];
[cardButton setTitleColor:self.navigationController.navigationBar.tintColor forState:UIControlStateNormal];
[cardButton sizeToFit];
cardButton.center = CGPointMake(tipLabel.center.x, CGRectGetMaxY(tipLabel.frame) + kControlMargin);
[self.view addSubview:cardButton];
[cardButton addTarget:self action:@selector(clickCardButton) forControlEvents:UIControlEventTouchUpInside];
}
/// 准备扫描框
- (void)prepareScanerBorder {
CGFloat width = self.view.bounds.size.width - 80;
scannerBorder = [[HMScannerBorder alloc] initWithFrame:CGRectMake(0, 0, width, width)];
scannerBorder.center = self.view.center;
scannerBorder.tintColor = self.navigationController.navigationBar.tintColor;
[self.view addSubview:scannerBorder];
HMScannerMaskView *maskView = [HMScannerMaskView maskViewWithFrame:self.view.bounds cropRect:scannerBorder.frame];
[self.view insertSubview:maskView atIndex:0];
}
/// 准备导航栏
- (void)prepareNavigationBar {
// 1> 背景颜色
[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithWhite:0.1 alpha:1.0]];
self.navigationController.navigationBar.translucent = YES;
self.navigationController.navigationBar.shadowImage = [[UIImage alloc] init];
// 2> 标题
self.title = @"扫一扫";
// 3> 左右按钮
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"关闭" style:UIBarButtonItemStylePlain target:self action:@selector(clickCloseButton)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"相册" style:UIBarButtonItemStylePlain target:self action:@selector(clickAlbumButton)];
}
@end
platform:ios,'9.0' platform:ios,'9.0'
pod 'MBProgressHUD', '~> 0.9.2’ pod 'MBProgressHUD', '~> 0.9.2’
pod 'SVProgressHUD', '~> 2.0.3'
pod 'IQKeyboardManager', '~> 4.0.0' pod 'IQKeyboardManager', '~> 4.0.0'
pod 'MMDrawerController', '~> 0.6.0' pod 'MMDrawerController', '~> 0.6.0'
pod 'MJExtension', '~> 3.0.10' pod 'MJExtension', '~> 3.0.10'
...@@ -10,3 +9,4 @@ pod 'MJRefresh', '~> 3.1.0' ...@@ -10,3 +9,4 @@ pod 'MJRefresh', '~> 3.1.0'
pod 'SDWebImage', '~> 3.7.5' pod 'SDWebImage', '~> 3.7.5'
pod 'AFNetworking', '~> 3.1.0' pod 'AFNetworking', '~> 3.1.0'
pod 'JSONModel', '~> 1.2.0' pod 'JSONModel', '~> 1.2.0'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment