Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Opple-iOS
Commits
2905d553
Commit
2905d553
authored
Jun 06, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
d1211c25
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
140 additions
and
23 deletions
+140
-23
CameraView.m
Lighting/Class/CameraView.m
+0
-1
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+9
-1
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+1
-1
ShareViewController.h
Lighting/Class/ShareViewController.h
+7
-0
ShareViewController.m
Lighting/Class/ShareViewController.m
+4
-2
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+14
-0
AppDelegate.m
Lighting/Lighting/AppDelegate.m
+1
-9
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+55
-8
ShareGoodsViewController.h
Lighting/Tools/ShareGoodsViewController.h
+6
-0
ShareGoodsViewController.m
Lighting/Tools/ShareGoodsViewController.m
+4
-1
UIImagePickerController+SupportDirection.h
Lighting/Tools/UIImagePickerController+SupportDirection.h
+13
-0
UIImagePickerController+SupportDirection.m
Lighting/Tools/UIImagePickerController+SupportDirection.m
+26
-0
No files found.
Lighting/Class/CameraView.m
View file @
2905d553
...
...
@@ -111,7 +111,6 @@
//在打开相册之前,设置屏幕为支持竖屏
[
DeviceDirectionManager
instance
].
isHorizontal
=
YES
;
[
self
presentViewController
:
_imagePickerController
animated
:
YES
completion
:
nil
];
}
...
...
Lighting/Class/FollowHeartViewController.m
View file @
2905d553
...
...
@@ -180,7 +180,7 @@
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
);
[
UIView
commitAnimations
];
self
.
temporaryBtn
.
hidden
=
YES
;
//
self.temporaryBtn.hidden=YES;
}
-
(
void
)
addHelpView
:
(
UIButton
*
)
btn
{
...
...
@@ -397,6 +397,14 @@
});
}
#pragma mark -code不等于0
-
(
void
)
CodeNotEqualZero
:
(
NSString
*
)
message
{
[
self
ErrorMBProgressView
:
message
];
}
-
(
void
)
popoverPresentationControllerDidDismissPopover
:
(
UIPopoverPresentationController
*
)
popoverPresentationController
{
[
self
.
leftSubView
.
shareBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"fenxiang"
]
forState
:
UIControlStateNormal
];
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
2905d553
...
...
@@ -519,7 +519,7 @@
#pragma mark -筛选
-
(
void
)
ScreeningButtonClick
{
//
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
...
...
Lighting/Class/ShareViewController.h
View file @
2905d553
...
...
@@ -29,6 +29,13 @@
* 上传失败
*/
-
(
void
)
UploadImageFailue
;
/**
* code不为0
*/
-
(
void
)
CodeNotEqualZero
:(
NSString
*
)
message
;
//界面消失
-
(
void
)
resetShareBtn
;
...
...
Lighting/Class/ShareViewController.m
View file @
2905d553
...
...
@@ -115,7 +115,10 @@
}
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
CodeNotEqualZero
:)])
{
[
self
.
delegate
CodeNotEqualZero
:
returnValue
[
@"message"
]];
}
}
}
WithprogressBlock
:^
(
double
progress
)
{
...
...
@@ -143,7 +146,6 @@
[
self
.
delegate
UploadImageFailue
];
}
[
self
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
//实现回调方法:
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
2905d553
...
...
@@ -66,6 +66,7 @@
2936F29B1D01868E007CA67C
/* ShareGoodsViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F2991D01868E007CA67C
/* ShareGoodsViewController.xib */
;
};
2942F8A61CDD80C2005B377E
/* authenticateView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A51CDD80C2005B377E
/* authenticateView.m */
;
};
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 */
;
};
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BAC11CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m */
;
};
294CF0EC1CEDCF480055F1D8
/* PromptinformationView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294CF0EB1CEDCF480055F1D8
/* PromptinformationView.m */
;
};
...
...
@@ -273,6 +274,8 @@
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>"
;
};
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>"
;
};
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>"
;
};
...
...
@@ -679,6 +682,7 @@
2928F7DE1CD085430036D761
/* Tools */
=
{
isa
=
PBXGroup
;
children
=
(
29498C511D050DB3004FA79B
/* UIImagePickerController */
,
29808A611CFEC287001D1020
/* Experiencecentre */
,
29F14B931CF6A4B50005D3E5
/* Scanner */
,
2902E1301CF2907200268161
/* RefreshHeader */
,
...
...
@@ -829,6 +833,15 @@
name
=
view
;
sourceTree
=
"<group>"
;
};
29498C511D050DB3004FA79B
/* UIImagePickerController */
=
{
isa
=
PBXGroup
;
children
=
(
29498C521D050DFC004FA79B
/* UIImagePickerController+SupportDirection.h */
,
29498C531D050DFC004FA79B
/* UIImagePickerController+SupportDirection.m */
,
);
name
=
UIImagePickerController
;
sourceTree
=
"<group>"
;
};
2949BABA1CD2EF800049385A
/* view */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1687,6 +1700,7 @@
29706DA61CD082990003C412
/* main.m in Sources */
,
044CD6EE1CEB771C0004A715
/* SeceneCollectionPictureCell.m in Sources */
,
2936F2961D017BBD007CA67C
/* GoodsImageView.m in Sources */
,
29498C541D050DFC004FA79B
/* UIImagePickerController+SupportDirection.m in Sources */
,
291D6A621CFFE212007891AE
/* DataDictModel.m in Sources */
,
29A938251CDAE31200F21E54
/* ProductDetailsHeaderView.m in Sources */
,
291D6A6B1D000A2A007891AE
/* ProductScreeningCollectionViewCell.m in Sources */
,
...
...
Lighting/Lighting/AppDelegate.m
View file @
2905d553
...
...
@@ -28,20 +28,12 @@
}
-
(
NSUInteger
)
application
:(
UIApplication
*
)
application
supportedInterfaceOrientationsForWindow
:(
nullable
UIWindow
*
)
window
{
//判断是否是横屏
if
(
[[
DeviceDirectionManager
instance
]
isHorizontal
])
{
return
UIInterfaceOrientationMaskAll
;
}
else
{
}
else
{
return
UIInterfaceOrientationMaskLandscape
;
}
}
//分享回调
-
(
BOOL
)
application
:(
UIApplication
*
)
application
openURL
:(
NSURL
*
)
url
sourceApplication
:(
NSString
*
)
sourceApplication
annotation
:(
id
)
annotation
...
...
Lighting/Tools/ExperienceCentreViewController.m
View file @
2905d553
...
...
@@ -12,13 +12,14 @@
#import "ProductScreeningTableViewCell.h"
#import "GoodsImageView.h"
#import "ShareGoodsViewController.h"
#import "DeviceDirectionManager.h"
#define LEFTWIDTH 100
#define RIGHTWIDTH 200
#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 @@
#pragma mark -拍照
-
(
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 -截屏
-
(
UIImage
*
)
capture
{
...
...
@@ -245,11 +299,6 @@
return
img
;
}
#pragma mark -全屏
-
(
IBAction
)
AmplificationButtonClickAction
:
(
UIButton
*
)
sender
{
...
...
@@ -294,8 +343,6 @@
}
/**************************功能区**************************/
#pragma mark -场景筛选
-
(
IBAction
)
SceneSelectedButtonClickAction
:
(
UIButton
*
)
sender
{
...
...
Lighting/Tools/ShareGoodsViewController.h
View file @
2905d553
...
...
@@ -30,6 +30,12 @@
*/
-
(
void
)
UploadImageFailue
;
/**
* code不为0
*/
-
(
void
)
CodeNotEqualZero
:(
NSString
*
)
message
;
@end
...
...
Lighting/Tools/ShareGoodsViewController.m
View file @
2905d553
...
...
@@ -84,7 +84,10 @@
}
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
CodeNotEqualZero
:)])
{
[
self
.
delegate
CodeNotEqualZero
:
returnValue
[
@"message"
]];
}
}
}
WithprogressBlock
:^
(
double
progress
)
{
...
...
Lighting/Tools/UIImagePickerController+SupportDirection.h
0 → 100644
View file @
2905d553
//
// UIImagePickerController+SupportDirection.h
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
UIImagePickerController
(
SupportDirection
)
@end
Lighting/Tools/UIImagePickerController+SupportDirection.m
0 → 100644
View file @
2905d553
//
// 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment