Initial commit
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// IfishShopEditeNewViewController.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "WhiteNavBaseViewController.h"
|
||||
#import "CertificationShopModel.h"
|
||||
//最新商铺编辑界面 原为ShopEditViewController
|
||||
|
||||
@interface IfishShopEditeNewViewController : WhiteNavBaseViewController
|
||||
@property(nonatomic,strong) CertificationShopModel *shopInfo;
|
||||
|
||||
@end
|
||||
+818
@@ -0,0 +1,818 @@
|
||||
//
|
||||
// IfishShopEditeNewViewController.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishShopEditeNewViewController.h"
|
||||
#import "ChinaPlckerView.h"
|
||||
#import "UITextField+KeyBordDoneView.h"
|
||||
#import <BaiduMapAPI_Location/BMKLocationService.h>
|
||||
#import <BaiduMapAPI_Search/BMKSearchComponent.h>
|
||||
#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>
|
||||
#import "UIImageView+WebCache.h"
|
||||
#import "IfishShopEdite1Cell.h"
|
||||
#import "IfishShopEdite2ViewCell.h"
|
||||
#import "IfishSHopEdite3ViewCell.h"
|
||||
#import "IfishSHopEdite4ViewCell.h"
|
||||
#import "IfishSHopEdite5VCell.h"
|
||||
#import "IfishSHopEdite6ViewCell.h"
|
||||
#define CELL1_TAG 100000001
|
||||
#define CELL2_TAG 100000002
|
||||
#define CELL3_TAG 100000003
|
||||
#define CELL4_TAG 100000004
|
||||
#define CELL5_TAG 100000005
|
||||
#define CELL6_TAG 100000006
|
||||
#define CELL7_TAG 100000007
|
||||
#define CELLIMG_TAG 100000008
|
||||
#import "WFPhotosViewController.h"
|
||||
#import "WFTailoringViewController.h"
|
||||
static const CGFloat rectWidth = 300;
|
||||
static const CGFloat rectHeight = 168;
|
||||
#import "CusomeCameraViewController.h"
|
||||
|
||||
@interface IfishShopEditeNewViewController ()<UITableViewDelegate,
|
||||
UITableViewDataSource,
|
||||
UITextFieldDelegate,
|
||||
UIImagePickerControllerDelegate,
|
||||
UIActionSheetDelegate,
|
||||
UINavigationControllerDelegate,
|
||||
ChinaPlckerViewDelegate,
|
||||
BMKLocationServiceDelegate,
|
||||
BMKGeoCodeSearchDelegate,
|
||||
UIGestureRecognizerDelegate>
|
||||
|
||||
{
|
||||
BMKGeoCodeSearch*_geocodesearch;
|
||||
BOOL _isUpdate;
|
||||
}
|
||||
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@property(nonatomic,strong) NSArray *titles;
|
||||
@property(nonatomic,strong) NSString *address;
|
||||
@property(nonatomic)BMKLocationService*locService;
|
||||
@property(nonatomic,strong) NSString *privence;
|
||||
@property(nonatomic,strong) NSString *city;
|
||||
@property(nonatomic,strong) NSString *area;
|
||||
@property(nonatomic,strong)UIActionSheet*photosheet;
|
||||
@property (nonatomic)NSTimer *getInfTimer;
|
||||
@end
|
||||
|
||||
@implementation IfishShopEditeNewViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
_isUpdate = NO;
|
||||
[self addTitleViewWithTitle:@"店铺管理"];
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
self.address =self.shopInfo.shopsAddress;
|
||||
self.privence = self.shopInfo.shopsProvince;
|
||||
self.city = self.shopInfo.shopsCity;
|
||||
self.area = self.shopInfo.shopsArea;
|
||||
[self creatTab];
|
||||
UIBarButtonItem*rightItem=[[UIBarButtonItem alloc]initWithTitle:@"提交" style: UIBarButtonItemStyleDone target:self action:@selector(tiJiaoClick)];
|
||||
rightItem.tintColor=[UIColor blackColor];
|
||||
[rightItem setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} forState:UIControlStateNormal];
|
||||
self.navigationItem.rightBarButtonItem=rightItem;
|
||||
|
||||
}
|
||||
|
||||
-(void)initData{
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 定位
|
||||
-(void)getLocation{
|
||||
//初始化BMKLocationService
|
||||
_locService=[[BMKLocationService alloc]init];
|
||||
_locService.delegate=self;
|
||||
//启动LocationService
|
||||
[_locService startUserLocationService];
|
||||
_geocodesearch=[[BMKGeoCodeSearch alloc]init];
|
||||
|
||||
}
|
||||
|
||||
//处理方向变更信息
|
||||
- (void)didUpdateUserHeading:(BMKUserLocation *)userLocation
|
||||
{
|
||||
//NSLog(@"heading is %@",userLocation.heading);
|
||||
}
|
||||
//处理位置坐标更新
|
||||
- (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation
|
||||
{
|
||||
//NSLog(@"didUpdateUserLocation lat %f,long %f",userLocation.location.coordinate.latitude,userLocation.location.coordinate.longitude);
|
||||
[self reverseGeoCodeWithlatitude:userLocation.location.coordinate.latitude addlongitude:userLocation.location.coordinate.longitude];
|
||||
// static dispatch_once_t disOnce;
|
||||
// dispatch_once(&disOnce, ^ {
|
||||
//
|
||||
// [self reverseGeoCodeWithlatitude:userLocation.location.coordinate.latitude addlongitude:userLocation.location.coordinate.longitude];
|
||||
// });
|
||||
|
||||
}
|
||||
/**
|
||||
* 地理反编码
|
||||
*/
|
||||
-(void)reverseGeoCodeWithlatitude:(CLLocationDegrees)latitude addlongitude:(CLLocationDegrees)longitude{
|
||||
CLLocationCoordinate2D pt=(CLLocationCoordinate2D){latitude,longitude};
|
||||
BMKReverseGeoCodeOption *reverseGeocodeSearchOption = [[BMKReverseGeoCodeOption alloc]init];
|
||||
reverseGeocodeSearchOption.reverseGeoPoint=pt;
|
||||
BOOL flag = [_geocodesearch reverseGeoCode:reverseGeocodeSearchOption];
|
||||
if(flag)
|
||||
{
|
||||
NSLog(@"反geo检索发送成功");
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"反geo检索发送失败");
|
||||
}
|
||||
|
||||
}
|
||||
-(void)dealloc{
|
||||
|
||||
if (_geocodesearch!=nil) {
|
||||
_geocodesearch=nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark BMKGeoCodeSearchDelegate
|
||||
-(void)onGetReverseGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKReverseGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error{
|
||||
NSLog(@"address%@",result.address);
|
||||
self.address = result.address;
|
||||
|
||||
|
||||
// IfishSHopEdite3ViewCell *cell = [self.view viewWithTag:CELL6_TAG];
|
||||
|
||||
// if (cell) {
|
||||
|
||||
// cell.addressFiled.text= self.address;
|
||||
|
||||
// }
|
||||
|
||||
// static dispatch_once_t disOnce;
|
||||
// dispatch_once(&disOnce, ^ {
|
||||
|
||||
// [self.tableView reloadData];
|
||||
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)onGetGeoCodeResult:(BMKGeoCodeSearch *)searcher result:(BMKGeoCodeResult *)result errorCode:(BMKSearchErrorCode)error{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)goBackAction{
|
||||
|
||||
if (_isUpdate) {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
//IOS 8
|
||||
|
||||
UIAlertController*ac=[UIAlertController alertControllerWithTitle:@"" message:@"是否放弃当前操作" preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[self presentViewController:ac animated:YES completion:nil];
|
||||
[ac addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction*action){
|
||||
|
||||
|
||||
}]];
|
||||
[ac addAction:[UIAlertAction actionWithTitle:@"放弃" style:UIAlertActionStyleDefault handler:^(UIAlertAction*action){
|
||||
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
}]];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
_geocodesearch.delegate=self;// 此处记得不用的时候需要置nil,
|
||||
_locService.delegate=self;
|
||||
|
||||
|
||||
}
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
// 禁用 iOS7 返回手势
|
||||
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
_locService.delegate=nil;
|
||||
// 开启
|
||||
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)creatTab{
|
||||
|
||||
|
||||
self.tableView=[[UITableView alloc]initWithFrame:CGRectMake(0,0, self.view.frame.size.width,self.view.frame.size.height) style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.showsVerticalScrollIndicator = NO;
|
||||
|
||||
self.tableView.backgroundColor = TABLE_BACKGROUD_COLOR;
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
// UITapGestureRecognizer*tabGestrueRecognizer=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tabViewGestrue)];
|
||||
//tabGestrueRecognizer.delegate =self;
|
||||
// [self.tableView addGestureRecognizer:tabGestrueRecognizer];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (section ==0) {
|
||||
return 7;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section ==0 && indexPath.row ==0) {
|
||||
|
||||
IfishShopEdite1Cell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishShopEdite1Cell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishShopEdite1Cell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.ShopName.text = self.shopInfo.shopsName;
|
||||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.tag = CELL1_TAG;
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==1){
|
||||
|
||||
IfishShopEdite2ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishShopEdite2ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishShopEdite2ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.titleName.text = @"微信账号";
|
||||
cell.infoFiled.placeholder = @"请输入微信账号";
|
||||
cell.infoFiled.text = self.shopInfo.wechat;
|
||||
[cell.infoFiled keybordViewAddDoneView];
|
||||
|
||||
|
||||
cell.tag = CELL2_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==2){
|
||||
IfishShopEdite2ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishShopEdite2ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishShopEdite2ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.titleName.text = @"联系电话";
|
||||
cell.infoFiled.keyboardType= UIKeyboardTypeNumberPad;
|
||||
cell.infoFiled.placeholder = @"请输入联系电话";
|
||||
cell.tag = CELL3_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.infoFiled.text = self.shopInfo.shopsPhone;
|
||||
[cell.infoFiled keybordViewAddDoneView];
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==3){
|
||||
|
||||
IfishShopEdite2ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishShopEdite2ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishShopEdite2ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.titleName.text = @"网店地址";
|
||||
cell.infoFiled.placeholder = @"请输入网店地址";
|
||||
cell.tag = CELL4_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.infoFiled.text = self.shopInfo.shoplink;
|
||||
[cell.infoFiled keybordViewAddDoneView];
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==4){
|
||||
|
||||
IfishSHopEdite6ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishSHopEdite6ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishSHopEdite6ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.locationLab.text = [NSString stringWithFormat:@"%@%@%@",self.privence,self.city,self.area];
|
||||
|
||||
cell.tag = CELL5_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==5){
|
||||
|
||||
IfishSHopEdite3ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishSHopEdite3ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishSHopEdite3ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
|
||||
cell.tag = CELL6_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.addressFiled.text = self.address;
|
||||
[cell.addressFiled keybordViewAddDoneView];
|
||||
return cell;
|
||||
}else if (indexPath.section ==0 && indexPath.row ==6){
|
||||
|
||||
IfishSHopEdite4ViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishSHopEdite4ViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishSHopEdite4ViewCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
[cell.LocationBtn addTarget:self action:@selector(userloactionAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell.tag = CELL7_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
}else if (indexPath.section ==1 && indexPath.row ==0){
|
||||
|
||||
IfishSHopEdite5VCell *cell = [tableView dequeueReusableCellWithIdentifier:@"IfishSHopEdite5VCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle]loadNibNamed:@"IfishSHopEdite5VCell" owner:self options:nil]lastObject];
|
||||
|
||||
}
|
||||
cell.tag = CELLIMG_TAG;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.shopImg.userInteractionEnabled = YES;
|
||||
if (self.shopInfo.picture4) {
|
||||
|
||||
if (![self.shopInfo.picture4 isEqualToString:@""]) {
|
||||
|
||||
//获取系统当前的时间戳
|
||||
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0];
|
||||
NSTimeInterval time=[dat timeIntervalSince1970]*1000;
|
||||
NSString *timeString = [NSString stringWithFormat:@"%.0f",time];
|
||||
|
||||
NSString * imgUrl = [NSString stringWithFormat:@"%@/shops/%@/%@?time=%@",JIEKOUPORTHTTP,self.shopInfo.userId,self.shopInfo.picture4,timeString];
|
||||
|
||||
[cell.shopImg sd_setImageWithURL:[NSURL URLWithString:imgUrl]];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[cell.changeImgBtn addTarget:self action:@selector(changeImgBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section ==0 &&indexPath.row==0) {
|
||||
return 44;
|
||||
}else if (indexPath.section ==0 &&indexPath.row==1){
|
||||
return 44;
|
||||
|
||||
}else if (indexPath.section ==0 &&indexPath.row==2){
|
||||
return 44;
|
||||
|
||||
}else if (indexPath.section ==0 &&indexPath.row==3){
|
||||
return 44;
|
||||
|
||||
}else if (indexPath.section ==0 &&indexPath.row==4){
|
||||
return 44;
|
||||
|
||||
}
|
||||
else if (indexPath.section ==0 &&indexPath.row==5){
|
||||
return 61;
|
||||
|
||||
}else if (indexPath.section ==0 &&indexPath.row==6){
|
||||
return 46;
|
||||
|
||||
}else if (indexPath.section ==1 &&indexPath.row==0){
|
||||
|
||||
//return 227;
|
||||
return self.view.frame.size.width * 0.56;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
|
||||
if (section==0) {
|
||||
return 5;
|
||||
}else{
|
||||
return 10 + 44;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
|
||||
return 0.1;
|
||||
|
||||
}
|
||||
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
if (section==0) {
|
||||
UIView *back=[[UIView alloc] init];
|
||||
back.backgroundColor = TABLE_HEADER_COLOR;
|
||||
return back;
|
||||
|
||||
}else{
|
||||
UIView *back=[[UIView alloc] init];
|
||||
back.frame = CGRectMake(0, 0,self.view.frame.size.width, 10+44);
|
||||
|
||||
back.backgroundColor = TABLE_HEADER_COLOR;
|
||||
|
||||
UIView *whiteback =[[UIView alloc] initWithFrame:CGRectMake(0, 10, self.view.frame.size.width, 43)];
|
||||
whiteback.backgroundColor = [UIColor whiteColor];
|
||||
[back addSubview:whiteback];
|
||||
UILabel *labe = [[UILabel alloc] initWithFrame:CGRectMake(15,15, 200, 20)];
|
||||
labe.text = @"店铺门面";
|
||||
labe.font = [UIFont systemFontOfSize:15];
|
||||
[whiteback addSubview:labe];
|
||||
return back;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (indexPath.section ==0 && indexPath.row ==4) {
|
||||
//选择城市
|
||||
[self xuanzeAddress];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark- 省市区选择器
|
||||
|
||||
-(void)xuanzeAddress{
|
||||
|
||||
[ChinaPlckerView customChinaPicker:self superView:self.view];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - ChinaPlckerViewDelegate
|
||||
- (void)chinaPlckerViewDelegateChinaModel:(ChinaArea *)chinaModel{
|
||||
|
||||
|
||||
// CertifyListViewFirstCell *cell =[self.view viewWithTag:CERTYVIEW_CELLTAGROW3];
|
||||
//
|
||||
//
|
||||
// cell.infoDetailTextfeild.text = [NSString stringWithFormat:@"%@%@%@",chinaModel.provinceModel.NAME,chinaModel.cityModel.NAME,chinaModel.areaModel.NAME];
|
||||
|
||||
|
||||
self.privence = chinaModel.provinceModel.NAME;
|
||||
self.city = chinaModel.cityModel.NAME;
|
||||
self.area = chinaModel.areaModel.NAME;
|
||||
|
||||
|
||||
[self.tableView reloadData];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark -使用定位地址
|
||||
-(void)userloactionAction{
|
||||
|
||||
IfishSHopEdite3ViewCell *lactioncell = [self.view viewWithTag:CELL6_TAG];
|
||||
|
||||
lactioncell.addressFiled.text = self.address;
|
||||
NSIndexPath *indepath =[NSIndexPath indexPathForRow:5 inSection:0];
|
||||
NSArray *arr = @[indepath];
|
||||
[self.tableView reloadRowsAtIndexPaths:arr withRowAnimation:UITableViewRowAnimationNone];
|
||||
|
||||
}
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
#pragma mark - 修改门面
|
||||
-(void)changeImgBtnAction{
|
||||
|
||||
[self picImgHandler];
|
||||
}
|
||||
|
||||
-(void)picImgHandler{
|
||||
|
||||
|
||||
self.photosheet=[[UIActionSheet alloc]initWithTitle:@"获取图片" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"拍照",@"从相册选择", nil];
|
||||
[self.photosheet showInView:self.view];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark--UIActionSheetDelegate IOS7
|
||||
|
||||
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
|
||||
|
||||
if (actionSheet==self.photosheet) {
|
||||
if (buttonIndex==actionSheet.cancelButtonIndex) {
|
||||
return;
|
||||
}
|
||||
|
||||
//自定义
|
||||
|
||||
|
||||
switch (buttonIndex) {
|
||||
case 0:
|
||||
{
|
||||
CusomeCameraViewController *customVc= [[CusomeCameraViewController alloc] init]
|
||||
;
|
||||
|
||||
customVc.tailoredImage = ^ (UIImage *image){
|
||||
IfishSHopEdite5VCell *cell = [self.view viewWithTag:CELLIMG_TAG];
|
||||
cell.shopImg.image = image;
|
||||
};
|
||||
[self.navigationController presentViewController:customVc animated:YES completion:^{
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
|
||||
UIImageWriteToSavedPhotosAlbum([[UIImage alloc] init], nil, nil, nil);
|
||||
|
||||
WFPhotosViewController *photosVC = [[WFPhotosViewController alloc] init];
|
||||
UINavigationController *naviVC = [[UINavigationController alloc] initWithRootViewController:photosVC];
|
||||
photosVC.tailoredImage = ^ (UIImage *image){
|
||||
IfishSHopEdite5VCell *cell = [self.view viewWithTag:CELLIMG_TAG];
|
||||
cell.shopImg.image = image;
|
||||
};
|
||||
[self presentViewController:naviVC animated:YES completion:nil];
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//裁剪图片,此处裁剪为125*125大的图,即为我们的缩略图
|
||||
- (UIImage *)wf_thumbnailsCutfullPhoto:(UIImage*)image
|
||||
{
|
||||
CGSize newSize;
|
||||
CGImageRef imageRef = nil;
|
||||
|
||||
if ((image.size.width / image.size.height) < (rectWidth / rectHeight)) {
|
||||
newSize.width = image.size.width;
|
||||
newSize.height = image.size.width * rectHeight / rectWidth;
|
||||
|
||||
imageRef = CGImageCreateWithImageInRect([image CGImage], CGRectMake(0, fabs(image.size.height - newSize.height) / 2, newSize.width, newSize.height));
|
||||
} else {
|
||||
newSize.height = image.size.height;
|
||||
newSize.width = image.size.height * rectWidth / rectHeight;
|
||||
|
||||
imageRef = CGImageCreateWithImageInRect([image CGImage], CGRectMake(fabs(image.size.width - newSize.width) / 2, 0, newSize.width, newSize.height));
|
||||
}
|
||||
UIImage *img = [UIImage imageWithCGImage:imageRef];
|
||||
CGImageRelease(imageRef);
|
||||
return img;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark --选取完成后调用方法
|
||||
|
||||
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
|
||||
|
||||
//裁剪后的图片
|
||||
IfishSHopEdite5VCell *cell = [self.view viewWithTag:CELLIMG_TAG];
|
||||
|
||||
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
|
||||
cell.shopImg.contentMode = UIViewContentModeScaleToFill;
|
||||
cell.shopImg.image = [self wf_thumbnailsCutfullPhoto:image];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
|
||||
}
|
||||
|
||||
//取消按钮的回调
|
||||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (UIImage *) scaleFromImage: (UIImage *) image toSize: (CGSize) size
|
||||
{
|
||||
UIGraphicsBeginImageContext(size);
|
||||
[image drawInRect:CGRectMake(0, 0, size.width, size.height)];
|
||||
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
return newImage;
|
||||
}
|
||||
|
||||
|
||||
- (UIImage *)thumbnailWithImageWithoutScale:(UIImage *)image size:(CGSize)asize
|
||||
{
|
||||
UIImage *newimage;
|
||||
if (nil == image) {
|
||||
newimage = nil;
|
||||
}
|
||||
else{
|
||||
CGSize oldsize = image.size;
|
||||
CGRect rect;
|
||||
if (asize.width/asize.height > oldsize.width/oldsize.height) {
|
||||
rect.size.width = asize.width*oldsize.height/oldsize.width;
|
||||
// rect.size.height = asize.height*oldsize.height/oldsize.width;
|
||||
rect.size.height = asize.width*oldsize.height/oldsize.width;
|
||||
rect.origin.x = (asize.width - rect.size.width)/2;
|
||||
|
||||
rect.origin.y = 0;
|
||||
}
|
||||
else{
|
||||
//rect.size.width = asize.width;
|
||||
rect.size.width = asize.height*oldsize.width/oldsize.height;
|
||||
rect.size.height = asize.height*oldsize.width/oldsize.height;
|
||||
rect.origin.x = 0;
|
||||
rect.origin.y = (asize.height - rect.size.height)/2;
|
||||
|
||||
}
|
||||
UIGraphicsBeginImageContext(asize);
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
|
||||
UIRectFill(CGRectMake(0, 0, asize.width, asize.height));//clear background
|
||||
[image drawInRect:rect];
|
||||
newimage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
}
|
||||
return newimage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark- 提交
|
||||
|
||||
-(void)tiJiaoClick{
|
||||
|
||||
IfishShopEdite2ViewCell *weichatcell =[self.view viewWithTag:CELL2_TAG];
|
||||
|
||||
IfishShopEdite2ViewCell *phonecell =[self.view viewWithTag:CELL3_TAG];
|
||||
|
||||
IfishShopEdite2ViewCell *shopLinkcell =[self.view viewWithTag:CELL4_TAG];
|
||||
|
||||
IfishSHopEdite5VCell *Imgcell = [self.view viewWithTag:CELLIMG_TAG];
|
||||
|
||||
if (phonecell.infoFiled.text.length ==0) {
|
||||
|
||||
[self.view makeToast:@"请正确输入正确的手机号或电话"];
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
IfishSHopEdite3ViewCell *addersscell =[self.view viewWithTag:CELL6_TAG];
|
||||
if (addersscell.addressFiled.text.length>20){
|
||||
|
||||
[self.view makeToast:@"详细地址不能超过20个字"];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (addersscell.addressFiled.text.length==0){
|
||||
|
||||
[self.view makeToast:@"详细地址不能为空"];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
IfishSHopEdite6ViewCell *loactioncell = [self.view viewWithTag:CELL5_TAG];
|
||||
|
||||
if (loactioncell.locationLab.text.length == 0) {
|
||||
[self.view makeToast:@"请选择省市区"];
|
||||
return;
|
||||
}
|
||||
|
||||
[self.view makeToastActivity];
|
||||
|
||||
if (self.privence==nil) {
|
||||
|
||||
self.privence = @"无";
|
||||
}
|
||||
|
||||
if (self.city==nil) {
|
||||
self.city = @"无";
|
||||
|
||||
}
|
||||
|
||||
if (self.area ==nil) {
|
||||
//有省份无地区
|
||||
self.area =@"无";
|
||||
}
|
||||
UIImage* imgdata=Imgcell.shopImg.image;
|
||||
NSString *url = IfishUpdateBaseShopsInfoV3;
|
||||
|
||||
NSDictionary *paras = @{
|
||||
@"shopsId":self.shopInfo.shopsId,
|
||||
@"shopsPhone":phonecell.infoFiled.text,
|
||||
@"shopsProvince":self.privence,
|
||||
@"shopsCity":self.city,
|
||||
@"shopsArea":self.area,
|
||||
@"shopsAddress":addersscell.addressFiled.text,
|
||||
@"file4":@"png",
|
||||
@"weixinCode":weichatcell.infoFiled.text,
|
||||
@"shopLink":shopLinkcell.infoFiled.text
|
||||
};
|
||||
|
||||
[AFHttpTool updateBaseShopsInfo:paras formatImg:imgdata requsetUrl:url success:^(id response) {
|
||||
NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
NSLog(@"result:%@",resultDic[@"result"]);
|
||||
[self.view hideToastActivity];
|
||||
_isUpdate = YES;
|
||||
|
||||
if ([resultDic[@"result"] isEqualToString:@"100"]) {
|
||||
|
||||
[self.view makeToast:@"提交成功"];
|
||||
NSDictionary*shopsInfoDic= resultDic[@"data"];
|
||||
CertificationShopModel *shopInfo=[[CertificationShopModel alloc] init];
|
||||
shopInfo.picture1 = shopsInfoDic[@"picture1"];
|
||||
shopInfo.picture2 = shopsInfoDic[@"picture2"];
|
||||
shopInfo.picture3 = shopsInfoDic[@"picture3"];
|
||||
shopInfo.picture4 = shopsInfoDic[@"picture4"];
|
||||
shopInfo.reason = shopsInfoDic[@"reason"];
|
||||
shopInfo.shopsAddress = shopsInfoDic[@"shopsAddress"];
|
||||
shopInfo.shopsArea = shopsInfoDic[@"shopsArea"];
|
||||
shopInfo.shopsCity = shopsInfoDic[@"shopsCity"];
|
||||
shopInfo.shopsId = shopsInfoDic[@"shopsId"];
|
||||
shopInfo.shopsName = shopsInfoDic[@"shopsName"];
|
||||
shopInfo.shopsPhone = shopsInfoDic[@"shopsPhone"];
|
||||
shopInfo.shopsProvince = shopsInfoDic[@"shopsProvince"];
|
||||
shopInfo.status = shopsInfoDic[@"status"];
|
||||
shopInfo.userId = shopsInfoDic[@"userId"];
|
||||
shopInfo.userName = shopsInfoDic[@"userName"];
|
||||
shopInfo.userImg = shopsInfoDic[@"userImg"];
|
||||
shopInfo.wechat = shopsInfoDic[@"weixinCode"];
|
||||
shopInfo.shoplink = shopsInfoDic[@"shopLink"];
|
||||
shopInfo.remark = shopsInfoDic[@"remark"];
|
||||
[[DataCenter defaultDtacenter]setValue:shopInfo forKey:@"ShopsInfo"];
|
||||
|
||||
_getInfTimer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(delayDissMiss) userInfo:nil repeats:NO];
|
||||
;
|
||||
|
||||
|
||||
}else if ([resultDic[@"result"] isEqualToString:@"101"]){
|
||||
|
||||
[self.view makeToast:@"提交失败错误码101"];
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
[self.view makeToast:@"提交失败,请检查网络"];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)delayDissMiss
|
||||
{
|
||||
|
||||
[_getInfTimer invalidate];
|
||||
_getInfTimer = nil;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
|
||||
}
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// IfishSHopEdite3ViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishSHopEdite3ViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UITextField *addressFiled;
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// IfishSHopEdite3ViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishSHopEdite3ViewCell.h"
|
||||
|
||||
@implementation IfishSHopEdite3ViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishSHopEdite3ViewCell" id="KGk-i7-Jjw" customClass="IfishSHopEdite3ViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="61"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请填写和营业执照一样的详细地址" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="lFp-gx-a0y">
|
||||
<rect key="frame" x="15" y="10" width="304" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="g3b-ar-RkK">
|
||||
<rect key="frame" x="0.0" y="59" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="addressFiled" destination="lFp-gx-a0y" id="Vg4-mF-jNb"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="25" y="51.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// IfishSHopEdite4ViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishSHopEdite4ViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIButton *LocationBtn;
|
||||
|
||||
@end
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// IfishSHopEdite4ViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishSHopEdite4ViewCell.h"
|
||||
|
||||
@implementation IfishSHopEdite4ViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
self.LocationBtn.layer.masksToBounds = YES;
|
||||
self.LocationBtn.layer.cornerRadius = 5;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishSHopEdite4ViewCell" id="KGk-i7-Jjw" customClass="IfishSHopEdite4ViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="46"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="45"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sgX-xV-67m">
|
||||
<rect key="frame" x="195" y="10" width="111" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="1" green="0.66274509803921566" blue="0.33725490196078434" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<state key="normal" title="使用定位地址"/>
|
||||
</button>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="LocationBtn" destination="sgX-xV-67m" id="5K3-X2-sLP"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// IfishSHopEdite5VCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishSHopEdite5VCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *shopImg;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *changeImgBtn;
|
||||
|
||||
@end
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// IfishSHopEdite5VCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishSHopEdite5VCell.h"
|
||||
|
||||
@implementation IfishSHopEdite5VCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.changeImgBtn.layer.masksToBounds = YES;
|
||||
self.changeImgBtn.layer.cornerRadius = 5;
|
||||
NSString *str= @" 修改";
|
||||
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:str];
|
||||
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
|
||||
attch.image = [UIImage imageNamed:@"control_iocn_redact"];
|
||||
attch.bounds = CGRectMake(0,0,12,12);
|
||||
NSAttributedString *attristr=[NSAttributedString attributedStringWithAttachment:attch];
|
||||
[attri insertAttributedString:attristr atIndex:0];
|
||||
|
||||
[self.changeImgBtn setAttributedTitle:attri forState:UIControlStateNormal];
|
||||
|
||||
[attri addAttribute:NSForegroundColorAttributeName value:[UIColor whiteColor] range:NSMakeRange(0,str.length+1)];
|
||||
[attri addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0,str.length+1)];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishSHopEdite5VCell" id="KGk-i7-Jjw" customClass="IfishSHopEdite5VCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="179"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shopdetail_palceholder.png" translatesAutoresizingMaskIntoConstraints="NO" id="jOv-MG-TEf">
|
||||
<rect key="frame" x="15" y="12" width="290" height="162"/>
|
||||
</imageView>
|
||||
<button opaque="NO" alpha="0.40000000000000002" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uCz-0y-wkW">
|
||||
<rect key="frame" x="219" y="22" width="77" height="30"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="77" id="d3v-Qr-5tW"/>
|
||||
<constraint firstAttribute="height" constant="30" id="oK5-AI-cnR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<state key="normal" title="修改"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="jOv-MG-TEf" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="4" id="2ix-3q-qTa"/>
|
||||
<constraint firstItem="jOv-MG-TEf" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="7" id="KOs-pM-zuT"/>
|
||||
<constraint firstItem="jOv-MG-TEf" firstAttribute="top" secondItem="uCz-0y-wkW" secondAttribute="bottom" constant="-40" id="M0k-Ge-tgZ"/>
|
||||
<constraint firstItem="uCz-0y-wkW" firstAttribute="leading" secondItem="jOv-MG-TEf" secondAttribute="trailing" constant="-86" id="guI-kn-7Ps"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="jOv-MG-TEf" secondAttribute="bottom" constant="-3" id="hTs-mk-ODY"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="jOv-MG-TEf" secondAttribute="trailing" constant="7" id="npK-NT-Rgw"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="changeImgBtn" destination="uCz-0y-wkW" id="Orx-u6-B6m"/>
|
||||
<outlet property="shopImg" destination="jOv-MG-TEf" id="5rh-eY-cmm"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="26" y="56"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="shopdetail_palceholder.png" width="690" height="389"/>
|
||||
</resources>
|
||||
</document>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// IfishSHopEdite6ViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishSHopEdite6ViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *locationLab;
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// IfishSHopEdite6ViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishSHopEdite6ViewCell.h"
|
||||
|
||||
@implementation IfishSHopEdite6ViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishSHopEdite6ViewCell" id="KGk-i7-Jjw" customClass="IfishSHopEdite6ViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="店铺地址" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zBs-gb-slg">
|
||||
<rect key="frame" x="15" y="11" width="79" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="请选择省市区" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tag-pm-yo1">
|
||||
<rect key="frame" x="94" y="11" width="218" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wQQ-nV-xcv">
|
||||
<rect key="frame" x="0.0" y="43" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="locationLab" destination="tag-pm-yo1" id="Rp8-wK-M4m"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// IfishShopEdite1Cell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishShopEdite1Cell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ShopName;
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// IfishShopEdite1Cell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishShopEdite1Cell.h"
|
||||
|
||||
@implementation IfishShopEdite1Cell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishShopEdite1Cell" id="KGk-i7-Jjw" customClass="IfishShopEdite1Cell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3B9-5M-mUG">
|
||||
<rect key="frame" x="21" y="11" width="291" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="alt-jM-A7A">
|
||||
<rect key="frame" x="0.0" y="43" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="ShopName" destination="3B9-5M-mUG" id="Wd2-Mm-pCW"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// IfishShopEdite2ViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface IfishShopEdite2ViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleName;
|
||||
@property (weak, nonatomic) IBOutlet UITextField *infoFiled;
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// IfishShopEdite2ViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/2/15.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IfishShopEdite2ViewCell.h"
|
||||
|
||||
@implementation IfishShopEdite2ViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="IfishShopEdite2ViewCell" id="KGk-i7-Jjw" customClass="IfishShopEdite2ViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入微信账号" textAlignment="natural" minimumFontSize="10" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Deg-hB-VRa">
|
||||
<rect key="frame" x="107" y="6" width="205" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iEb-o0-cY7">
|
||||
<rect key="frame" x="15" y="43" width="305" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.93725490199999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="lab" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LbN-t2-dmP">
|
||||
<rect key="frame" x="15" y="11" width="71" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="infoFiled" destination="Deg-hB-VRa" id="ehN-Gp-EYS"/>
|
||||
<outlet property="titleName" destination="LbN-t2-dmP" id="5n9-wY-Q1C"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
Reference in New Issue
Block a user