Commit 2905d553 authored by 曹云霄's avatar 曹云霄

debug

parent d1211c25
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
//在打开相册之前,设置屏幕为支持竖屏 //在打开相册之前,设置屏幕为支持竖屏
[DeviceDirectionManager instance].isHorizontal=YES; [DeviceDirectionManager instance].isHorizontal=YES;
[self presentViewController:_imagePickerController animated:YES completion:nil]; [self presentViewController:_imagePickerController animated:YES completion:nil];
} }
......
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
self.footSubView.frame=CGRectMake(0, ScreenHeight, ScreenWidth, 150); self.footSubView.frame=CGRectMake(0, ScreenHeight, ScreenWidth, 150);
self.temporaryBtn.frame=CGRectMake(sender.frame.origin.x, 20, sender.frame.size.width, sender.frame.size.height); self.temporaryBtn.frame=CGRectMake(sender.frame.origin.x, 20, sender.frame.size.width, sender.frame.size.height);
[UIView commitAnimations]; [UIView commitAnimations];
self.temporaryBtn.hidden=YES; // self.temporaryBtn.hidden=YES;
} }
-(void)addHelpView:(UIButton *)btn -(void)addHelpView:(UIButton *)btn
{ {
...@@ -397,6 +397,14 @@ ...@@ -397,6 +397,14 @@
}); });
} }
#pragma mark -code不等于0
- (void)CodeNotEqualZero:(NSString *)message
{
[self ErrorMBProgressView:message];
}
- (void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)popoverPresentationController - (void)popoverPresentationControllerDidDismissPopover:(UIPopoverPresentationController *)popoverPresentationController
{ {
[self.leftSubView.shareBtn setBackgroundImage:[UIImage imageNamed:@"fenxiang"] forState:UIControlStateNormal]; [self.leftSubView.shareBtn setBackgroundImage:[UIImage imageNamed:@"fenxiang"] forState:UIControlStateNormal];
......
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
#pragma mark -筛选 #pragma mark -筛选
- (void)ScreeningButtonClick - (void)ScreeningButtonClick
{ {
//
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"]; // ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen; // ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController; // UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
......
...@@ -29,6 +29,13 @@ ...@@ -29,6 +29,13 @@
* 上传失败 * 上传失败
*/ */
- (void)UploadImageFailue; - (void)UploadImageFailue;
/**
* code不为0
*/
- (void)CodeNotEqualZero:(NSString *)message;
//界面消失 //界面消失
- (void)resetShareBtn ; - (void)resetShareBtn ;
......
...@@ -115,7 +115,10 @@ ...@@ -115,7 +115,10 @@
} }
}else }else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; if ([self.delegate respondsToSelector:@selector(CodeNotEqualZero:)]) {
[self.delegate CodeNotEqualZero:returnValue[@"message"]];
}
} }
}WithprogressBlock:^(double progress) { }WithprogressBlock:^(double progress) {
...@@ -143,7 +146,6 @@ ...@@ -143,7 +146,6 @@
[self.delegate UploadImageFailue]; [self.delegate UploadImageFailue];
} }
[self ErrorMBProgressView:error.localizedDescription];
}]; }];
} }
//实现回调方法: //实现回调方法:
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
2936F29B1D01868E007CA67C /* ShareGoodsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2936F2991D01868E007CA67C /* ShareGoodsViewController.xib */; }; 2936F29B1D01868E007CA67C /* ShareGoodsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2936F2991D01868E007CA67C /* ShareGoodsViewController.xib */; };
2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2942F8A51CDD80C2005B377E /* authenticateView.m */; }; 2942F8A61CDD80C2005B377E /* authenticateView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2942F8A51CDD80C2005B377E /* authenticateView.m */; };
2942F8A81CDD80CE005B377E /* authenticateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2942F8A71CDD80CE005B377E /* authenticateView.xib */; }; 2942F8A81CDD80CE005B377E /* authenticateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2942F8A71CDD80CE005B377E /* authenticateView.xib */; };
29498C541D050DFC004FA79B /* UIImagePickerController+SupportDirection.m in Sources */ = {isa = PBXBuildFile; fileRef = 29498C531D050DFC004FA79B /* UIImagePickerController+SupportDirection.m */; };
2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2949BABC1CD2EFA00049385A /* InformationTableViewCell.m */; }; 2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2949BABC1CD2EFA00049385A /* InformationTableViewCell.m */; };
2949BAC21CD3055A0049385A /* MMExampleDrawerVisualStateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2949BAC11CD3055A0049385A /* MMExampleDrawerVisualStateManager.m */; }; 2949BAC21CD3055A0049385A /* MMExampleDrawerVisualStateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2949BAC11CD3055A0049385A /* MMExampleDrawerVisualStateManager.m */; };
294CF0EC1CEDCF480055F1D8 /* PromptinformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 294CF0EB1CEDCF480055F1D8 /* PromptinformationView.m */; }; 294CF0EC1CEDCF480055F1D8 /* PromptinformationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 294CF0EB1CEDCF480055F1D8 /* PromptinformationView.m */; };
...@@ -273,6 +274,8 @@ ...@@ -273,6 +274,8 @@
2942F8A41CDD80C2005B377E /* authenticateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = authenticateView.h; sourceTree = "<group>"; }; 2942F8A41CDD80C2005B377E /* authenticateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = authenticateView.h; sourceTree = "<group>"; };
2942F8A51CDD80C2005B377E /* authenticateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = authenticateView.m; sourceTree = "<group>"; }; 2942F8A51CDD80C2005B377E /* authenticateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = authenticateView.m; sourceTree = "<group>"; };
2942F8A71CDD80CE005B377E /* authenticateView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = authenticateView.xib; sourceTree = "<group>"; }; 2942F8A71CDD80CE005B377E /* authenticateView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = authenticateView.xib; sourceTree = "<group>"; };
29498C521D050DFC004FA79B /* UIImagePickerController+SupportDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImagePickerController+SupportDirection.h"; sourceTree = "<group>"; };
29498C531D050DFC004FA79B /* UIImagePickerController+SupportDirection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImagePickerController+SupportDirection.m"; sourceTree = "<group>"; };
2949BABB1CD2EFA00049385A /* InformationTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InformationTableViewCell.h; sourceTree = "<group>"; }; 2949BABB1CD2EFA00049385A /* InformationTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InformationTableViewCell.h; sourceTree = "<group>"; };
2949BABC1CD2EFA00049385A /* InformationTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InformationTableViewCell.m; sourceTree = "<group>"; }; 2949BABC1CD2EFA00049385A /* InformationTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InformationTableViewCell.m; sourceTree = "<group>"; };
2949BAC01CD3055A0049385A /* MMExampleDrawerVisualStateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleDrawerVisualStateManager.h; sourceTree = "<group>"; }; 2949BAC01CD3055A0049385A /* MMExampleDrawerVisualStateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMExampleDrawerVisualStateManager.h; sourceTree = "<group>"; };
...@@ -679,6 +682,7 @@ ...@@ -679,6 +682,7 @@
2928F7DE1CD085430036D761 /* Tools */ = { 2928F7DE1CD085430036D761 /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29498C511D050DB3004FA79B /* UIImagePickerController */,
29808A611CFEC287001D1020 /* Experiencecentre */, 29808A611CFEC287001D1020 /* Experiencecentre */,
29F14B931CF6A4B50005D3E5 /* Scanner */, 29F14B931CF6A4B50005D3E5 /* Scanner */,
2902E1301CF2907200268161 /* RefreshHeader */, 2902E1301CF2907200268161 /* RefreshHeader */,
...@@ -829,6 +833,15 @@ ...@@ -829,6 +833,15 @@
name = view; name = view;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29498C511D050DB3004FA79B /* UIImagePickerController */ = {
isa = PBXGroup;
children = (
29498C521D050DFC004FA79B /* UIImagePickerController+SupportDirection.h */,
29498C531D050DFC004FA79B /* UIImagePickerController+SupportDirection.m */,
);
name = UIImagePickerController;
sourceTree = "<group>";
};
2949BABA1CD2EF800049385A /* view */ = { 2949BABA1CD2EF800049385A /* view */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1687,6 +1700,7 @@ ...@@ -1687,6 +1700,7 @@
29706DA61CD082990003C412 /* main.m in Sources */, 29706DA61CD082990003C412 /* main.m in Sources */,
044CD6EE1CEB771C0004A715 /* SeceneCollectionPictureCell.m in Sources */, 044CD6EE1CEB771C0004A715 /* SeceneCollectionPictureCell.m in Sources */,
2936F2961D017BBD007CA67C /* GoodsImageView.m in Sources */, 2936F2961D017BBD007CA67C /* GoodsImageView.m in Sources */,
29498C541D050DFC004FA79B /* UIImagePickerController+SupportDirection.m in Sources */,
291D6A621CFFE212007891AE /* DataDictModel.m in Sources */, 291D6A621CFFE212007891AE /* DataDictModel.m in Sources */,
29A938251CDAE31200F21E54 /* ProductDetailsHeaderView.m in Sources */, 29A938251CDAE31200F21E54 /* ProductDetailsHeaderView.m in Sources */,
291D6A6B1D000A2A007891AE /* ProductScreeningCollectionViewCell.m in Sources */, 291D6A6B1D000A2A007891AE /* ProductScreeningCollectionViewCell.m in Sources */,
......
...@@ -28,20 +28,12 @@ ...@@ -28,20 +28,12 @@
} }
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(nullable UIWindow *)window
{ {
//判断是否是横屏 //判断是否是横屏
if ( [[DeviceDirectionManager instance] isHorizontal]) { if ( [[DeviceDirectionManager instance] isHorizontal]) {
return UIInterfaceOrientationMaskAll ; return UIInterfaceOrientationMaskAll ;
} else{
}else{
return UIInterfaceOrientationMaskLandscape; return UIInterfaceOrientationMaskLandscape;
} }
} }
//分享回调 //分享回调
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
......
...@@ -12,13 +12,14 @@ ...@@ -12,13 +12,14 @@
#import "ProductScreeningTableViewCell.h" #import "ProductScreeningTableViewCell.h"
#import "GoodsImageView.h" #import "GoodsImageView.h"
#import "ShareGoodsViewController.h" #import "ShareGoodsViewController.h"
#import "DeviceDirectionManager.h"
#define LEFTWIDTH 100 #define LEFTWIDTH 100
#define RIGHTWIDTH 200 #define RIGHTWIDTH 200
#define TOPWIDTH 300 #define TOPWIDTH 300
@interface ExperienceCentreViewController ()<AddImagesDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UITableViewDelegate,UITableViewDataSource,UIGestureRecognizerDelegate,SharePicturedelegate> @interface ExperienceCentreViewController ()<AddImagesDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UITableViewDelegate,UITableViewDataSource,UIGestureRecognizerDelegate,SharePicturedelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
/** /**
* 选中场景数据 * 选中场景数据
...@@ -227,10 +228,63 @@ ...@@ -227,10 +228,63 @@
#pragma mark -拍照 #pragma mark -拍照
- (IBAction)TakingPhotoButtonClickAction:(UIButton *)sender { - (IBAction)TakingPhotoButtonClickAction:(UIButton *)sender {
UIAlertController *alertView = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleAlert];
UIImagePickerController *PcCamera = [[UIImagePickerController alloc]init];
PcCamera.delegate = self;
[DeviceDirectionManager instance].isHorizontal=YES;
[alertView addAction:[UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//拍照
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[PcCamera setSourceType:UIImagePickerControllerSourceTypeCamera];
PcCamera.allowsEditing = YES;
[self presentViewController:PcCamera animated:YES completion:nil];
}
else
{
[self ErrorMBProgressView:@"相机无法使用"];
}
}]];
[alertView addAction:[UIAlertAction actionWithTitle:@"从相册选择" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//从相册中选择
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
[PcCamera setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
PcCamera.allowsEditing = YES;
[self presentViewController:PcCamera animated:YES completion:nil];
}
else
{
[self ErrorMBProgressView:@"相册无法打开"];
}
}]];
[alertView addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alertView dismissViewControllerAnimated:YES completion:nil];
}]];
[self presentViewController:alertView animated:YES completion:nil];
}
#pragma mark -拍照、从相册选择
#pragma -mark -UIImagePickerControllerDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
{
[self dismissViewControllerAnimated:YES completion:nil];
UIImage *Headimage = [info objectForKey:UIImagePickerControllerOriginalImage];
self.sceneImageView.image = Headimage;
} }
#pragma mark -截屏 #pragma mark -截屏
- (UIImage *)capture - (UIImage *)capture
{ {
...@@ -245,11 +299,6 @@ ...@@ -245,11 +299,6 @@
return img; return img;
} }
#pragma mark -全屏 #pragma mark -全屏
- (IBAction)AmplificationButtonClickAction:(UIButton *)sender { - (IBAction)AmplificationButtonClickAction:(UIButton *)sender {
...@@ -294,8 +343,6 @@ ...@@ -294,8 +343,6 @@
} }
/**************************功能区**************************/ /**************************功能区**************************/
#pragma mark -场景筛选 #pragma mark -场景筛选
- (IBAction)SceneSelectedButtonClickAction:(UIButton *)sender { - (IBAction)SceneSelectedButtonClickAction:(UIButton *)sender {
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
*/ */
- (void)UploadImageFailue; - (void)UploadImageFailue;
/**
* code不为0
*/
- (void)CodeNotEqualZero:(NSString *)message;
@end @end
......
...@@ -84,7 +84,10 @@ ...@@ -84,7 +84,10 @@
} }
}else }else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; if ([self.delegate respondsToSelector:@selector(CodeNotEqualZero:)]) {
[self.delegate CodeNotEqualZero:returnValue[@"message"]];
}
} }
}WithprogressBlock:^(double progress) { }WithprogressBlock:^(double progress) {
......
//
// UIImagePickerController+SupportDirection.h
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImagePickerController (SupportDirection)
@end
//
// UIImagePickerController+SupportDirection.m
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "UIImagePickerController+SupportDirection.h"
@implementation UIImagePickerController (SupportDirection)
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
@end
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