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
e3ce2411
Commit
e3ce2411
authored
Jun 13, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化体验中心选中商品、场景选中动画
parent
74a498e8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
71 additions
and
4094 deletions
+71
-4094
CameraView.h
Lighting/Class/CameraView.h
+0
-25
CameraView.m
Lighting/Class/CameraView.m
+0
-194
CustomShopingSeclectButton.h
Lighting/Class/CustomShopingSeclectButton.h
+0
-13
CustomShopingSeclectButton.m
Lighting/Class/CustomShopingSeclectButton.m
+0
-21
CustomTOGoodsEntity.h
Lighting/Class/CustomTOGoodsEntity.h
+0
-14
CustomTOGoodsEntity.m
Lighting/Class/CustomTOGoodsEntity.m
+0
-13
CustomUIImagePickerController.h
Lighting/Class/CustomUIImagePickerController.h
+0
-13
CustomUIImagePickerController.m
Lighting/Class/CustomUIImagePickerController.m
+0
-17
FollowHeartViewController.h
Lighting/Class/FollowHeartViewController.h
+0
-46
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+0
-443
FootSubView.h
Lighting/Class/FootSubView.h
+0
-27
FootSubView.m
Lighting/Class/FootSubView.m
+0
-117
HelpViewController.h
Lighting/Class/HelpViewController.h
+0
-18
HelpViewController.m
Lighting/Class/HelpViewController.m
+0
-88
LeftSubView.h
Lighting/Class/LeftSubView.h
+0
-30
LeftSubView.m
Lighting/Class/LeftSubView.m
+0
-94
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+0
-3
NSObject+UIImagePickerController.h
Lighting/Class/NSObject+UIImagePickerController.h
+0
-13
NSObject+UIImagePickerController.m
Lighting/Class/NSObject+UIImagePickerController.m
+0
-34
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+0
-8
PersonInformationTableViewCell.m
Lighting/Class/PersonInformationTableViewCell.m
+1
-1
ProductCollectionPictureCell.h
Lighting/Class/ProductCollectionPictureCell.h
+0
-30
ProductCollectionPictureCell.m
Lighting/Class/ProductCollectionPictureCell.m
+0
-47
ProductLibraryView.h
Lighting/Class/ProductLibraryView.h
+0
-67
ProductLibraryView.m
Lighting/Class/ProductLibraryView.m
+0
-674
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+1
-4
RightSubView.h
Lighting/Class/RightSubView.h
+0
-26
RightSubView.m
Lighting/Class/RightSubView.m
+0
-120
SecenTableViewCell.h
Lighting/Class/SecenTableViewCell.h
+0
-13
SecenTableViewCell.m
Lighting/Class/SecenTableViewCell.m
+0
-28
SeceneCollectionPictureCell.h
Lighting/Class/SeceneCollectionPictureCell.h
+0
-14
SeceneCollectionPictureCell.m
Lighting/Class/SeceneCollectionPictureCell.m
+0
-28
SeceneLibraryView.h
Lighting/Class/SeceneLibraryView.h
+0
-56
SeceneLibraryView.m
Lighting/Class/SeceneLibraryView.m
+0
-379
ShareViewController.h
Lighting/Class/ShareViewController.h
+0
-65
ShareViewController.m
Lighting/Class/ShareViewController.m
+0
-181
ShoppingCell.h
Lighting/Class/ShoppingCell.h
+0
-94
ShoppingCell.m
Lighting/Class/ShoppingCell.m
+0
-146
ShoppingView.h
Lighting/Class/ShoppingView.h
+0
-33
ShoppingView.m
Lighting/Class/ShoppingView.m
+0
-367
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+0
-1
ImageCropperView.h
Lighting/Class/tools/ImageCropperView.h
+0
-34
ImageCropperView.m
Lighting/Class/tools/ImageCropperView.m
+0
-168
UIImage+Rotation.h
Lighting/Class/tools/UIImage+Rotation.h
+0
-16
UIImage+Rotation.m
Lighting/Class/tools/UIImage+Rotation.m
+0
-44
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+6
-172
Info.plist
Lighting/Lighting/Info.plist
+1
-1
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+3
-18
ExperienceCentreViewController.h
Lighting/Tools/ExperienceCentreViewController.h
+8
-0
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+40
-19
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+0
-10
SceneSectionHeaderView.m
Lighting/Tools/SceneSectionHeaderView.m
+2
-0
SceneViewController.m
Lighting/Tools/SceneViewController.m
+9
-7
No files found.
Lighting/Class/CameraView.h
deleted
100644 → 0
View file @
74a498e8
//
// CameraView.h
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
#import "DeviceDirectionManager.h"
@protocol
AddCustomPicturedelegate
<
NSObject
>
@required
//回调
-
(
void
)
addCustomPictureImage
:
(
UIImage
*
)
image
;
-
(
void
)
restCamerBtnImage
;
@end
@interface
CameraView
:
BaseViewController
<
UIGestureRecognizerDelegate
,
UIImagePickerControllerDelegate
,
UINavigationControllerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
AddCustomPicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIView
*
subView
;
@property
(
nonatomic
,
strong
)
UIImage
*
customImage
;
@end
Lighting/Class/CameraView.m
deleted
100644 → 0
View file @
74a498e8
//
// CameraView.m
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CameraView.h"
#import "NSObject+UIImagePickerController.h"
#import "CustomUIImagePickerController.h"
@interface
CameraView
()
{
UIImagePickerController
*
_imagePickerController
;
}
@end
@implementation
CameraView
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
_imagePickerController
=
[[
CustomUIImagePickerController
alloc
]
init
];
_imagePickerController
.
delegate
=
self
;
_imagePickerController
.
modalTransitionStyle
=
UIModalTransitionStyleFlipHorizontal
;
_imagePickerController
.
allowsEditing
=
YES
;
[
self
initView
];
// Do any additional setup after loading the view.
}
-
(
void
)
initView
{
self
.
subView
=
[[
UIView
alloc
]
init
];
self
.
subView
.
bounds
=
CGRectMake
(
0
,
0
,
300
,
150
);
self
.
subView
.
center
=
self
.
view
.
center
;
self
.
subView
.
layer
.
masksToBounds
=
YES
;
self
.
subView
.
layer
.
cornerRadius
=
10
;
self
.
subView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
self
.
subView
];
UIButton
*
btn1
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
300
,
50
)];
[
btn1
setTitle
:
@"拍照"
forState
:
UIControlStateNormal
];
[
btn1
setTitleColor
:[
UIColor
blueColor
]
forState
:
UIControlStateNormal
];
btn1
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
btn1
.
tag
=
101
;
[
btn1
addTarget
:
self
action
:
@selector
(
selectedBtn
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
subView
addSubview
:
btn1
];
UIButton
*
btn2
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
50
,
300
,
50
)];
[
btn2
setTitle
:
@"从相册中选取"
forState
:
UIControlStateNormal
];
[
btn2
setTitleColor
:[
UIColor
blueColor
]
forState
:
UIControlStateNormal
];
btn2
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
btn2
.
tag
=
102
;
[
btn2
addTarget
:
self
action
:
@selector
(
selectedBtn
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
subView
addSubview
:
btn2
];
UIButton
*
btn3
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
100
,
300
,
50
)];
[
btn3
setTitle
:
@"取消"
forState
:
UIControlStateNormal
];
[
btn3
setTitleColor
:[
UIColor
blueColor
]
forState
:
UIControlStateNormal
];
btn3
.
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
btn3
.
tag
=
103
;
[
btn3
addTarget
:
self
action
:
@selector
(
selectedBtn
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
subView
addSubview
:
btn3
];
//点击手势
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
DismissScreenView
:
)];
tap
.
delegate
=
self
;
tap
.
cancelsTouchesInView
=
NO
;
[[
UIApplication
sharedApplication
].
keyWindow
addGestureRecognizer
:
tap
];
}
-
(
void
)
selectedBtn
:
(
UIButton
*
)
sender
{
switch
(
sender
.
tag
)
{
case
101
:
//拍照
{
[
self
selectImageFromCamera
];
}
break
;
case
102
:
//从相册中选取
{
[
self
selectImageFromAlbum
];
}
break
;
case
103
:
//取消
{
[
self
DismissScreenView
];
}
break
;
default
:
break
;
}
}
#pragma mark 从摄像头获取图片或视频
-
(
void
)
selectImageFromCamera
{
_imagePickerController
.
sourceType
=
UIImagePickerControllerSourceTypeCamera
;
//在打开相机之前,设置屏幕为支持竖屏
[
DeviceDirectionManager
instance
].
isHorizontal
=
YES
;
[
self
presentViewController
:
_imagePickerController
animated
:
YES
completion
:
nil
];
}
#pragma mark 从相册获取图片
-
(
void
)
selectImageFromAlbum
{
//NSLog(@"相册");
_imagePickerController
.
sourceType
=
UIImagePickerControllerSourceTypePhotoLibrary
;
//在打开相册之前,设置屏幕为支持竖屏
[
DeviceDirectionManager
instance
].
isHorizontal
=
YES
;
[
self
presentViewController
:
_imagePickerController
animated
:
YES
completion
:
nil
];
}
//适用获取所有媒体资源,只需判断资源类型
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
NSString
*
mediaType
=
[
info
objectForKey
:
UIImagePickerControllerMediaType
];
//判断资源类型
if
([
mediaType
isEqualToString
:(
NSString
*
)
kUTTypeImage
]){
//如果是图片
self
.
customImage
=
info
[
UIImagePickerControllerEditedImage
];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
addCustomPictureImage
:)])
{
[
self
.
delegate
addCustomPictureImage
:
self
.
customImage
];
}
}
else
{
}
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
DeviceDirectionManager
instance
].
isHorizontal
=
NO
;
}
-
(
void
)
imagePickerControllerDidCancel
:
(
UIImagePickerController
*
)
picker
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
DeviceDirectionManager
instance
].
isHorizontal
=
NO
;
}
#pragma mark 图片保存完毕的回调
-
(
void
)
image
:
(
UIImage
*
)
image
didFinishSavingWithError
:
(
NSError
*
)
error
contextInfo
:
(
void
*
)
contextInf
{
}
#pragma mark 视频保存完毕的回调
-
(
void
)
video
:
(
NSString
*
)
videoPath
didFinishSavingWithError
:
(
NSError
*
)
error
contextInfo
:
(
void
*
)
contextInf
{
if
(
error
)
{
NSLog
(
@"保存视频过程中发生错误,错误信息:%@"
,
error
.
localizedDescription
);
}
else
{
NSLog
(
@"视频保存成功."
);
}
}
//取消按钮
-
(
void
)
DismissScreenView
{
if
(
self
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
restCamerBtnImage
)])
{
[
self
.
delegate
restCamerBtnImage
];
}
[
self
.
view
removeFromSuperview
];
}
}
//取消当前页面点击手势
-
(
void
)
DismissScreenView
:
(
UITapGestureRecognizer
*
)
sender
{
CGPoint
point
=
[
sender
locationInView
:
self
.
view
];
if
(
point
.
x
<
self
.
subView
.
frame
.
origin
.
x
||
point
.
x
>
self
.
subView
.
frame
.
origin
.
x
+
self
.
subView
.
frame
.
size
.
width
||
point
.
y
<
self
.
subView
.
frame
.
origin
.
y
||
point
.
y
>
self
.
subView
.
frame
.
origin
.
y
+
self
.
subView
.
frame
.
size
.
height
)
{
if
(
self
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
restCamerBtnImage
)])
{
[
self
.
delegate
restCamerBtnImage
];
}
[
self
.
view
removeFromSuperview
];
}
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#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
Lighting/Class/CustomShopingSeclectButton.h
deleted
100644 → 0
View file @
74a498e8
//
// CustomShopingSeclectButton.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
CustomShopingSeclectButton
:
UIButton
@property
(
nonatomic
,
strong
)
NSIndexPath
*
customIndexPath
;
@end
Lighting/Class/CustomShopingSeclectButton.m
deleted
100644 → 0
View file @
74a498e8
//
// CustomShopingSeclectButton.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CustomShopingSeclectButton.h"
@implementation
CustomShopingSeclectButton
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
Lighting/Class/CustomTOGoodsEntity.h
deleted
100644 → 0
View file @
74a498e8
//
// CustomTOGoodsEntity.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "opple_objc_json_client.h"
@interface
CustomTOGoodsEntity
:
NSObject
@property
(
nonatomic
,
strong
)
TOGoodsEntity
*
tOGoodsEntity
;
//商品
@property
(
nonatomic
,
strong
)
NSString
*
count
;
//商品数量
@end
Lighting/Class/CustomTOGoodsEntity.m
deleted
100644 → 0
View file @
74a498e8
//
// CustomTOGoodsEntity.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CustomTOGoodsEntity.h"
@implementation
CustomTOGoodsEntity
@end
Lighting/Class/CustomUIImagePickerController.h
deleted
100644 → 0
View file @
74a498e8
//
// CustomUIImagePickerController.h
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
CustomUIImagePickerController
:
UIImagePickerController
-
(
NSUInteger
)
supportedInterfaceOrientations
;
@end
Lighting/Class/CustomUIImagePickerController.m
deleted
100644 → 0
View file @
74a498e8
//
// CustomUIImagePickerController.m
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "CustomUIImagePickerController.h"
@implementation
CustomUIImagePickerController
//指定 UIImagePickerController只支持横屏
-
(
NSUInteger
)
supportedInterfaceOrientations
{
return
UIInterfaceOrientationMaskLandscape
;
}
@end
Lighting/Class/FollowHeartViewController.h
deleted
100644 → 0
View file @
74a498e8
//
// FollowHeartViewController.h
// Lighting
//
// Created by 曹云霄 on 16/5/4.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
#import "LeftSubView.h"
#import "RightSubView.h"
#import "FootSubView.h"
#import "SeceneLibraryView.h"
#import "ProductLibraryView.h"
#import "ShoppingView.h"
#import "ShareViewController.h"
#import "CameraView.h"
#import "HelpViewController.h"
#import "ImageCropperView.h"
@protocol
FollowHeartViewAddpicturedelegate
<
NSObject
>
@required
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
@end
@interface
FollowHeartViewController
:
BaseViewController
<
LeftViewBtnClickdelegate
,
RightViewBtnClickdelegate
,
FootViewBtnClickdelegate
,
UIGestureRecognizerDelegate
,
AddSecenePicturedelegate
,
AddProductPicturedelegate
,
SharePicturedelegate
,
AddCustomPicturedelegate
,
Shoppingdelegate
,
ImageCropperDelegate
,
HelpButtondelegate
,
UIPopoverPresentationControllerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
FollowHeartViewAddpicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
LeftSubView
*
leftSubView
;
@property
(
nonatomic
,
strong
)
RightSubView
*
rightSubView
;
@property
(
nonatomic
,
strong
)
FootSubView
*
footSubView
;
@property
(
nonatomic
,
strong
)
SeceneLibraryView
*
seceneLibraryView
;
@property
(
nonatomic
,
strong
)
ProductLibraryView
*
productLibraryView
;
@property
(
nonatomic
,
strong
)
ShoppingView
*
shoppingView
;
@property
(
nonatomic
,
strong
)
CameraView
*
cameraView
;
@property
(
nonatomic
,
strong
)
HelpViewController
*
helpView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
zoomButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
temporaryBtn
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productModelArray
;
@end
Lighting/Class/FollowHeartViewController.m
deleted
100644 → 0
View file @
74a498e8
This diff is collapsed.
Click to expand it.
Lighting/Class/FootSubView.h
deleted
100644 → 0
View file @
74a498e8
//
// FootSubView.h
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
FootViewBtnClickdelegate
<
NSObject
>
@required
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
-
(
void
)
resetSuperBackGroundImage
:(
UIImage
*
)
image
;
@end
@interface
FootSubView
:
UIView
<
UIGestureRecognizerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
FootViewBtnClickdelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
@property
(
nonatomic
,
strong
)
UIButton
*
selectBtn
;
-
(
void
)
addFootSubViewImage
:(
UIImage
*
)
image
;
@end
Lighting/Class/FootSubView.m
deleted
100644 → 0
View file @
74a498e8
//
// FootSubView.m
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "FootSubView.h"
@implementation
FootSubView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initdata
];
[
self
initSubView
];
}
return
self
;
}
-
(
void
)
initdata
{
// NSString *imageName = [NSString stringWithFormat:@"backView" ];
// UIImage *image=[UIImage imageNamed:imageName];
self
.
dataArray
=
[[
NSMutableArray
alloc
]
init
];
// 待接收
}
-
(
void
)
initSubView
{
self
.
selectBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
selectBtn
.
frame
=
CGRectMake
(
30
,
50
,
60
,
60
);
[
self
.
selectBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"场景2"
]
forState
:
UIControlStateNormal
];
self
.
selectBtn
.
tag
=
200
;
[
self
.
selectBtn
addTarget
:
self
action
:
@selector
(
footBtnDidSelected
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
self
.
selectBtn
];
self
.
scrollView
=
[[
UIScrollView
alloc
]
initWithFrame
:
CGRectMake
(
100
,
0
,
self
.
frame
.
size
.
width
-
100
,
self
.
frame
.
size
.
height
)];
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self
.
scrollView
.
showsHorizontalScrollIndicator
=
NO
;
[
self
addSubview
:
self
.
scrollView
];
// contentSize的y值为0表示在垂直方向上不做滚动
[
self
showSecenePicture
];
}
-
(
void
)
showSecenePicture
{
[
self
.
scrollView
.
subviews
makeObjectsPerformSelector
:
@selector
(
removeFromSuperview
)];
self
.
scrollView
.
contentSize
=
CGSizeMake
((
self
.
dataArray
.
count
+
1
)
*
(
100
+
10
),
0
);
for
(
int
i
=
0
;
i
<
self
.
dataArray
.
count
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
i
*
(
125
+
10
),
30
,
125
,
100
)];
UIImage
*
image
=
[
self
.
dataArray
objectAtIndex
:
i
];
[
button
setImage
:
image
forState
:
UIControlStateNormal
];
button
.
tag
=
100
+
i
;
[
button
addTarget
:
self
action
:
@selector
(
clicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UILongPressGestureRecognizer
*
longPressGR
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
longPress
:
)];
longPressGR
.
minimumPressDuration
=
0
.
5
;
[
button
addGestureRecognizer
:
longPressGR
];
[
self
.
scrollView
addSubview
:
button
];
}
}
//单次点击 设置为背景色
-
(
void
)
clicked
:
(
UIButton
*
)
sender
{
NSLog
(
@"%ld"
,(
long
)(
sender
.
tag
));
if
([
self
.
delegate
respondsToSelector
:
@selector
(
resetSuperBackGroundImage
:)])
{
[
self
.
delegate
resetSuperBackGroundImage
:
sender
.
imageView
.
image
];
}
// resetSuperBackGroundImage
}
//长按 删除已添加
-
(
void
)
longPress
:
(
id
)
sender
{
UILongPressGestureRecognizer
*
longPress
=
sender
;
if
(
longPress
.
state
==
UIGestureRecognizerStateBegan
)
{
NSInteger
index
=
longPress
.
view
.
tag
-
100
;
if
(
self
.
dataArray
.
count
>
index
)
{
[
self
.
dataArray
removeObjectAtIndex
:
index
];
[
self
showSecenePicture
];
}
}
else
{
}
NSLog
(
@"长按"
);
}
//回调
-
(
void
)
footBtnDidSelected
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
buttonClick
:
withButton
:
)])
{
[
self
.
delegate
buttonClick
:
sender
.
tag
withButton
:
sender
];
}
}
-
(
void
)
addFootSubViewImage
:
(
UIImage
*
)
image
{
[
self
.
dataArray
addObject
:
image
];
[
self
showSecenePicture
];
//重新绘制图片数量
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
Lighting/Class/HelpViewController.h
deleted
100644 → 0
View file @
74a498e8
//
// HelpViewController.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@protocol
HelpButtondelegate
<
NSObject
>
@required
-
(
void
)
restHelpBtnImage
;
@end
@interface
HelpViewController
:
BaseViewController
<
UIGestureRecognizerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
HelpButtondelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
helpArray
;
@end
Lighting/Class/HelpViewController.m
deleted
100644 → 0
View file @
74a498e8
//
// HelpViewController.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "HelpViewController.h"
@interface
HelpViewController
()
@end
@implementation
HelpViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
self
.
helpArray
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"返回"
,
@"添加至购物袋"
,
@"分享方案"
,
@"自定义场景"
,
@"全屏"
,
@"帮助"
,
nil
];
[
self
initView
];
}
-
(
void
)
initView
{
for
(
int
i
=
0
;
i
<
self
.
helpArray
.
count
;
i
++
)
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
button
.
tag
=
100
+
i
;
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"lefttool1"
]
forState
:
UIControlStateNormal
];
switch
(
i
)
{
case
0
:
button
.
frame
=
CGRectMake
(
90
,
30
+
(
60
+
15
)
*
i
,
100
,
60
);
break
;
case
1
:
button
.
frame
=
CGRectMake
(
75
,
30
+
(
60
+
15
)
*
i
,
200
,
60
);
break
;
case
2
:
button
.
frame
=
CGRectMake
(
80
,
30
+
(
60
+
15
)
*
i
,
150
,
60
);
break
;
case
3
:
button
.
frame
=
CGRectMake
(
75
,
30
+
(
60
+
15
)
*
i
,
200
,
60
);
break
;
case
4
:
button
.
frame
=
CGRectMake
(
90
,
30
+
(
60
+
15
)
*
i
,
100
,
60
);
break
;
case
5
:
button
.
frame
=
CGRectMake
(
90
,
30
+
(
60
+
15
)
*
i
,
100
,
60
);
break
;
default
:
break
;
}
[
button
setTitle
:[
self
.
helpArray
objectAtIndex
:
i
]
forState
:
UIControlStateNormal
];
[
button
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
[
self
.
view
addSubview
:
button
];
}
UIButton
*
sencenBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
25
,
self
.
view
.
frame
.
size
.
height
-
155
,
150
,
60
)];
[
sencenBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"downtool"
]
forState
:
UIControlStateNormal
];
[
sencenBtn
setTitle
:
@"选择场景"
forState
:
UIControlStateNormal
];
sencenBtn
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
8
,
0
);
[
sencenBtn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
[
self
.
view
addSubview
:
sencenBtn
];
UIButton
*
productBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
self
.
view
.
frame
.
size
.
width
-
245
,
self
.
view
.
frame
.
size
.
height
-
210
,
150
,
60
)];
[
productBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"righttool"
]
forState
:
UIControlStateNormal
];
[
productBtn
setTitle
:
@"选择产品"
forState
:
UIControlStateNormal
];
[
productBtn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
[
self
.
view
addSubview
:
productBtn
];
//点击手势
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
DismissScreenView
:
)];
tap
.
delegate
=
self
;
tap
.
cancelsTouchesInView
=
NO
;
[[
UIApplication
sharedApplication
].
keyWindow
addGestureRecognizer
:
tap
];
}
//取消当前页面点击手势
-
(
void
)
DismissScreenView
:
(
UITapGestureRecognizer
*
)
sender
{
// CGPoint point = [sender locationInView:self.view];
if
(
self
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
restHelpBtnImage
)])
{
[
self
.
delegate
restHelpBtnImage
];
}
[
self
.
view
removeFromSuperview
];
}
}
@end
Lighting/Class/LeftSubView.h
deleted
100644 → 0
View file @
74a498e8
//
// LeftSubView.h
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
LeftViewBtnClickdelegate
<
NSObject
>
@required
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
@end
@interface
LeftSubView
:
UIView
@property
(
nonatomic
,
assign
)
id
<
LeftViewBtnClickdelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
helpArray
;
@property
(
nonatomic
,
strong
)
UIButton
*
fanHuiBtn
;
//返回
@property
(
nonatomic
,
strong
)
UIButton
*
shoppingBtn
;
//购物车
@property
(
nonatomic
,
strong
)
UIButton
*
shareBtn
;
//分享
@property
(
nonatomic
,
strong
)
UIButton
*
camerBtn
;
//自定义场景
@property
(
nonatomic
,
strong
)
UIButton
*
fullViewBtn
;
//全屏
@property
(
nonatomic
,
strong
)
UIButton
*
helpBtn
;
//帮助
@end
Lighting/Class/LeftSubView.m
deleted
100644 → 0
View file @
74a498e8
//
// LeftSubView.m
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "LeftSubView.h"
@implementation
LeftSubView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initdata
];
[
self
initSubView
];
}
return
self
;
}
-
(
void
)
initdata
{
self
.
dataArray
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"返回"
,
@"购物车"
,
@"分享"
,
@"自定义场景"
,
@"全屏"
,
@"帮助"
,
nil
];
self
.
helpArray
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"返回"
,
@"添加至购物袋"
,
@"分享方案"
,
@"自定义场景"
,
@"全屏"
,
@"帮助"
,
nil
];
}
-
(
void
)
initSubView
{
for
(
int
i
=
0
;
i
<
self
.
dataArray
.
count
;
i
++
)
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
button
.
tag
=
100
+
i
;
button
.
frame
=
CGRectMake
(
30
,
30
+
(
60
+
15
)
*
i
,
60
,
60
);
[
button
addTarget
:
self
action
:
@selector
(
leftBtnDidSelected
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
switch
(
i
)
{
case
0
:
{
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"reBackBtn"
]
forState
:
UIControlStateNormal
];
self
.
fanHuiBtn
=
button
;
//返回
// UIView *view=[[UIView alloc]initWithFrame:CGRectMake(100, 30+(60 +15)*i+10, 100, 40)];
// view.backgroundColor=[UIColor whiteColor];
// UILabel *lable=
// [self addSubview:view];
}
break
;
case
1
:
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"gouwuche"
]
forState
:
UIControlStateNormal
];
self
.
shoppingBtn
=
button
;
//购物车
break
;
case
2
:
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"fenxiang"
]
forState
:
UIControlStateNormal
];
self
.
shareBtn
=
button
;
//分享
break
;
case
3
:
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"customchangjing"
]
forState
:
UIControlStateNormal
];
self
.
camerBtn
=
button
;
//自定义场景
break
;
case
4
:
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"quanping"
]
forState
:
UIControlStateNormal
];
self
.
fullViewBtn
=
button
;
//全屏
break
;
case
5
:
[
button
setBackgroundImage
:[
UIImage
imageNamed
:
@"bangzhu"
]
forState
:
UIControlStateNormal
];
self
.
helpBtn
=
button
;
//帮助
break
;
default
:
break
;
}
[
self
addSubview
:
button
];
}
}
-
(
void
)
leftBtnDidSelected
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
buttonClick
:
withButton
:
)])
{
[
self
.
delegate
buttonClick
:
sender
.
tag
withButton
:
sender
];
}
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
Lighting/Class/Login/LoginViewController.m
View file @
e3ce2411
...
...
@@ -10,7 +10,6 @@
#import "CustomTabbarController.h"
#import "AppDelegate.h"
#import "authenticateView.h"
#import "FollowHeartViewController.h"
#import "SceneLibraryViewController.h"
#import "ProductLibraryViewController.h"
#import "AllCustomerViewController.h"
...
...
@@ -20,7 +19,6 @@
@property
(
nonatomic
,
strong
)
MMDrawerController
*
drawerController
;
@property
(
nonatomic
,
strong
)
CustomTabbarController
*
customtabbar
;
@property
(
nonatomic
,
strong
)
FollowHeartViewController
*
followHeartView
;
/**
* 验证身份View
...
...
@@ -94,7 +92,6 @@
self
.
userNameLoginView
.
layer
.
masksToBounds
=
YES
;
self
.
userNameLoginView
.
layer
.
cornerRadius
=
10
;
self
.
forgotPasswordButton
.
titleLabel
.
font
=
[
UIFont
boldSystemFontOfSize
:
16
];
self
.
followHeartView
=
[[
FollowHeartViewController
alloc
]
init
];
//加载本地的用户名密码
self
.
userNameString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
USERNAME
];
...
...
Lighting/Class/NSObject+UIImagePickerController.h
deleted
100644 → 0
View file @
74a498e8
//
// NSObject+UIImagePickerController.h
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface
NSObject
(
UIImagePickerController
)
-
(
NSUInteger
)
supportedInterfaceOrientations
;
@end
Lighting/Class/NSObject+UIImagePickerController.m
deleted
100644 → 0
View file @
74a498e8
//
// NSObject+UIImagePickerController.m
// Lighting
//
// Created by mac on 16/5/24.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "NSObject+UIImagePickerController.h"
@implementation
NSObject
(
UIImagePickerController
)
//指定 UIImagePickerController只支持横屏
//-(NSUInteger)supportedInterfaceOrientations
//{
// return UIInterfaceOrientationMaskLandscape;
//}
//设置状态栏
-
(
UIStatusBarStyle
)
preferredStatusBarStyle
{
return
UIStatusBarStyleLightContent
;
}
-
(
BOOL
)
prefersStatusBarHidden
{
return
YES
;
}
-
(
BOOL
)
shouldAutorotate
{
return
YES
;
}
-
(
NSUInteger
)
supportedInterfaceOrientations
{
return
UIInterfaceOrientationMaskAll
;
}
@end
Lighting/Class/OrderdetailsViewController.m
View file @
e3ce2411
...
...
@@ -82,7 +82,6 @@
//附加信息cell
[
self
.
orderDetailsTableview
registerNib
:[
UINib
nibWithNibName
:
@"AdditionalTableViewCell"
bundle
:
nil
]
forCellReuseIdentifier
:
@"fifthcell"
];
if
(
self
.
isShowPayButton
)
{
[
self
CreateTableviewFooterView
];
}
}
...
...
@@ -117,10 +116,6 @@
}];
}
#pragma mark -TableviewHeader------根据不同的订单状态判断是否显示
-
(
void
)
CreateTableviewHeaderView
{
...
...
@@ -307,9 +302,6 @@
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
switch
(
indexPath
.
section
)
{
...
...
Lighting/Class/PersonInformationTableViewCell.m
View file @
e3ce2411
...
...
@@ -27,7 +27,7 @@
-
(
void
)
setModel
:
(
TOConsumerEntity
*
)
model
{
_model
=
model
;
[
self
.
customerHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
[
Customermanager
manager
].
model
.
picture
]
placeholderImage
:
ReplaceImage
];
[
self
.
customerHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
_
model
.
picture
]
placeholderImage
:
ReplaceImage
];
self
.
customerName
.
text
=
_model
.
name
;
self
.
companyName
.
text
=
_model
.
company
;
self
.
customerAddress
.
text
=
_model
.
address
;
...
...
Lighting/Class/ProductCollectionPictureCell.h
deleted
100644 → 0
View file @
74a498e8
//
// ProductCollectionPictureCell.h
// Lighting
//
// Created by mac on 16/5/18.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
ProductCollectionPictureCell
:
UICollectionViewCell
@property
(
strong
,
nonatomic
)
UIImageView
*
productImageView
;
//产品参数
@property
(
strong
,
nonatomic
)
UILabel
*
productParameter
;
// 产品价格
@property
(
strong
,
nonatomic
)
UILabel
*
productPrice
;
// 产品描述
@property
(
strong
,
nonatomic
)
UILabel
*
productDesce
;
@property
(
strong
,
nonatomic
)
TOGoodsEntity
*
productModel
;
@property
(
strong
,
nonatomic
)
UIView
*
subView
;
@end
Lighting/Class/ProductCollectionPictureCell.m
deleted
100644 → 0
View file @
74a498e8
//
// ProductCollectionPictureCell.m
// Lighting
//
// Created by mac on 16/5/18.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ProductCollectionPictureCell.h"
@implementation
ProductCollectionPictureCell
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
productImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
15
,
0
,
frame
.
size
.
width
-
30
,
2
*
frame
.
size
.
height
/
3
)];
[
self
addSubview
:
self
.
productImageView
];
self
.
subView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
2
*
frame
.
size
.
height
/
3
,
frame
.
size
.
width
,
frame
.
size
.
height
/
3
)];
[
self
.
subView
setBackgroundColor
:[
UIColor
whiteColor
]];
[
self
addSubview
:
self
.
subView
];
// 产品描述
self
.
productDesce
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
frame
.
size
.
width
,
frame
.
size
.
height
/
9
)];
self
.
productDesce
.
text
=
@"名称描述"
;
self
.
productDesce
.
textColor
=
[
UIColor
grayColor
];
self
.
productDesce
.
font
=
[
UIFont
systemFontOfSize
:
12
];
self
.
productDesce
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
subView
addSubview
:
self
.
productDesce
];
// 产品参数
self
.
productParameter
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
frame
.
size
.
height
/
9
,
frame
.
size
.
width
,
frame
.
size
.
height
/
9
)];
self
.
productParameter
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
productParameter
.
textColor
=
[
UIColor
grayColor
];
self
.
productParameter
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
self
.
subView
addSubview
:
self
.
productParameter
];
// 产品价格
self
.
productPrice
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
2
*
frame
.
size
.
height
/
9
,
frame
.
size
.
width
,
frame
.
size
.
height
/
9
)];
self
.
productPrice
.
textColor
=
[
UIColor
grayColor
];
self
.
productPrice
.
font
=
[
UIFont
systemFontOfSize
:
12
];
self
.
productPrice
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
subView
addSubview
:
self
.
productPrice
];
self
.
productModel
=
[[
TOGoodsEntity
alloc
]
init
];
}
return
self
;
}
@end
Lighting/Class/ProductLibraryView.h
deleted
100644 → 0
View file @
74a498e8
//
// ProductLibraryView.h
// Lighting
//
// Created by mac on 16/5/11.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ProductCollectionPictureCell.h"
@protocol
AddProductPicturedelegate
<
NSObject
>
@required
//回调
-
(
void
)
addProductImage
:
(
UIImage
*
)
image
productModel
:
(
TOGoodsEntity
*
)
productModel
;
-
(
void
)
restProductBtnImage
;
@end
@interface
ProductLibraryView
:
BaseViewController
<
UIGestureRecognizerDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UITableViewDataSource
,
UICollectionViewDataSource
,
UICollectionViewDelegate
,
UICollectionViewDelegateFlowLayout
,
UITextFieldDelegate
>
@property
(
nonatomic
,
strong
)
id
<
AddProductPicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIView
*
subView
;
@property
(
nonatomic
,
strong
)
UIView
*
headerView
;
@property
(
nonatomic
,
strong
)
UITableView
*
seceneTableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
pictureTableView
;
@property
(
nonatomic
,
strong
)
UIButton
*
kongJianBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
fengGeBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
leiXingBtn
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
nameData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrayData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array1
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array3
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
//筛选数据源
@property
(
nonatomic
,
strong
)
NSMutableArray
*
screeningDatas
;
@property
(
nonatomic
,
strong
)
GoodsFilter
*
goodsFilter
;
//商品数据源对象
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
//商品iD
@property
(
nonatomic
,
copy
)
NSString
*
goodsID
;
//当前页数
@property
(
nonatomic
,
assign
)
int
indexPage
;
// 搜索code
@property
(
nonatomic
,
copy
)
NSString
*
selectedCode
;
/**
* 筛选模型
*/
@property
(
nonatomic
,
strong
)
GoodsCondition
*
condtionModel
;
/**
* 总页数
*/
@property
(
nonatomic
,
assign
)
int
totalPages
;
/**
* 当前筛选按钮选中状态
*/
@property
(
nonatomic
,
assign
)
NSInteger
selectedIndex
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
cellArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
showSection
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
typeBtnArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
sectionBtnArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
cellBtnArray
;
@property
(
nonatomic
,
strong
)
UITextField
*
searchTextField
;
@end
Lighting/Class/ProductLibraryView.m
deleted
100644 → 0
View file @
74a498e8
This diff is collapsed.
Click to expand it.
Lighting/Class/ProductLibraryViewController.m
View file @
e3ce2411
...
...
@@ -451,12 +451,10 @@
//控点
CGPoint
controlPoint
=
CGPointMake
(
endPoint
.
x
,
startPoint
.
x
);
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
size
.
width
,
size
.
height
)];
imageView
.
backgroundColor
=
kTCColor
(
252
,
248
,
239
);
imageView
.
image
=
image
;
imageView
.
center
=
point
;
[
self
.
view
.
window
.
layer
addSublayer
:
imageView
.
layer
];
//路径曲线
...
...
@@ -466,11 +464,10 @@
controlPoint
:
controlPoint
];
//关键帧
CAKeyframeAnimation
*
moveAnim
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
moveAnim
.
path
=
movePath
.
CGPath
;
moveAnim
.
removedOnCompletion
=
YES
;
//
旋转
变化
//
缩小
变化
CABasicAnimation
*
scaleAnim
=
[
CABasicAnimation
animationWithKeyPath
:
@"transform"
];
scaleAnim
.
fromValue
=
[
NSValue
valueWithCATransform3D
:
CATransform3DIdentity
];
//x,y轴缩小到0.1,Z 轴不变
...
...
Lighting/Class/RightSubView.h
deleted
100644 → 0
View file @
74a498e8
//
// RightSubView.h
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol
RightViewBtnClickdelegate
<
NSObject
>
@required
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
-
(
void
)
resetSubProductImage
:(
UIImage
*
)
image
productModel
:(
TOGoodsEntity
*
)
productModel
;
@end
@interface
RightSubView
:
UIView
@property
(
nonatomic
,
assign
)
id
<
RightViewBtnClickdelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productModelArray
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
assign
)
BOOL
isSelected
;
@property
(
nonatomic
,
strong
)
UIButton
*
selectBtn
;
-
(
void
)
addRightSubViewImage
:(
UIImage
*
)
image
productModel
:(
TOGoodsEntity
*
)
productModel
;
@end
Lighting/Class/RightSubView.m
deleted
100644 → 0
View file @
74a498e8
//
// RightSubView.m
// Lighting
//
// Created by mac on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "RightSubView.h"
@implementation
RightSubView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
[
self
initdata
];
[
self
initSubView
];
}
return
self
;
}
-
(
void
)
initdata
{
// NSString *imageName = [NSString stringWithFormat:@"05产品库-详情_03" ];
// UIImage *image= [UIImage imageNamed:imageName];
self
.
dataArray
=
[[
NSMutableArray
alloc
]
init
];
self
.
productModelArray
=
[[
NSMutableArray
alloc
]
init
];
// 待接收
}
-
(
void
)
initSubView
{
self
.
selectBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
selectBtn
.
frame
=
CGRectMake
(
self
.
frame
.
size
.
width
-
100
,
self
.
frame
.
size
.
height
-
60
,
60
,
60
);
self
.
selectBtn
.
tag
=
300
;
[
self
.
selectBtn
setBackgroundImage
:[
UIImage
imageNamed
:
@"产品2"
]
forState
:
UIControlStateNormal
];
[
self
.
selectBtn
addTarget
:
self
action
:
@selector
(
rightBtnDidSelected
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
self
.
selectBtn
];
self
.
scrollView
=
[[
UIScrollView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
-
100
)];
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self
.
scrollView
.
showsVerticalScrollIndicator
=
NO
;
[
self
addSubview
:
self
.
scrollView
];
[
self
showProductPicture
];
}
-
(
void
)
showProductPicture
{
[
self
.
scrollView
.
subviews
makeObjectsPerformSelector
:
@selector
(
removeFromSuperview
)];
// contentSize的y值为0表示在垂直方向上不做滚动
self
.
scrollView
.
contentSize
=
CGSizeMake
(
0
,
(
self
.
dataArray
.
count
+
1
)
*
(
100
+
10
));
for
(
int
i
=
0
;
i
<
self
.
dataArray
.
count
;
i
++
)
{
UIButton
*
button
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
80
,
20
+
i
*
(
100
+
10
),
100
,
75
)];
UIImage
*
image
=
[
self
.
dataArray
objectAtIndex
:
i
];
[
button
setImage
:
image
forState
:
UIControlStateNormal
];
button
.
tag
=
100
+
i
;
[
button
addTarget
:
self
action
:
@selector
(
clicked
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UILongPressGestureRecognizer
*
longPressGR
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
longPress
:
)];
longPressGR
.
minimumPressDuration
=
0
.
5
;
[
button
addGestureRecognizer
:
longPressGR
];
[
self
.
scrollView
addSubview
:
button
];
}
}
//单次点击
-
(
void
)
clicked
:
(
UIButton
*
)
sender
{
NSLog
(
@"%ld"
,(
long
)(
sender
.
tag
));
if
([
self
.
delegate
respondsToSelector
:
@selector
(
resetSubProductImage
:
productModel
:
)])
{
[
self
.
delegate
resetSubProductImage
:
sender
.
imageView
.
image
productModel
:[
self
.
productModelArray
objectAtIndex
:
sender
.
tag
-
100
]];
}
// resetSuperBackGroundImage
}
//长按
-
(
void
)
longPress
:
(
id
)
sender
{
UILongPressGestureRecognizer
*
longPress
=
sender
;
if
(
longPress
.
state
==
UIGestureRecognizerStateBegan
)
{
NSInteger
index
=
longPress
.
view
.
tag
-
100
;
if
(
self
.
dataArray
.
count
>
index
)
{
[
self
.
dataArray
removeObjectAtIndex
:
index
];
[
self
.
productModelArray
removeObjectAtIndex
:
index
];
[
self
showProductPicture
];
}
}
else
{
}
NSLog
(
@"长按"
);
}
-
(
void
)
rightBtnDidSelected
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
buttonClick
:
withButton
:
)])
{
[
self
.
delegate
buttonClick
:
sender
.
tag
withButton
:
sender
];
}
}
-
(
void
)
addRightSubViewImage
:
(
UIImage
*
)
image
productModel
:
(
TOGoodsEntity
*
)
productModel
{
[
self
.
productModelArray
addObject
:
productModel
];
[
self
.
dataArray
addObject
:
image
];
[
self
showProductPicture
];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
Lighting/Class/SecenTableViewCell.h
deleted
100644 → 0
View file @
74a498e8
//
// SecenTableViewCell.h
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SecenTableViewCell
:
UITableViewCell
@end
Lighting/Class/SecenTableViewCell.m
deleted
100644 → 0
View file @
74a498e8
//
// SecenTableViewCell.m
// Lighting
//
// Created by mac on 16/5/30.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "SecenTableViewCell.h"
@implementation
SecenTableViewCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
frame
.
size
.
height
,
self
.
frame
.
size
.
width
,
1
)];
lable
.
backgroundColor
=
[
UIColor
grayColor
];
[
self
addSubview
:
lable
];
}
@end
Lighting/Class/SeceneCollectionPictureCell.h
deleted
100644 → 0
View file @
74a498e8
//
// SeceneCollectionPictureCell.h
// Lighting
//
// Created by mac on 16/5/17.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SeceneCollectionPictureCell
:
UICollectionViewCell
@property
(
nonatomic
,
strong
)
TOSceneEntity
*
model
;
@property
(
strong
,
nonatomic
)
UIImageView
*
imageView
;
@end
Lighting/Class/SeceneCollectionPictureCell.m
deleted
100644 → 0
View file @
74a498e8
//
// SeceneCollectionPictureCell.m
// Lighting
//
// Created by mac on 16/5/17.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "SeceneCollectionPictureCell.h"
@implementation
SeceneCollectionPictureCell
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
frame
.
size
.
width
,
frame
.
size
.
height
)];
[
self
addSubview
:
self
.
imageView
];
}
return
self
;
}
#pragma mark -赋值
-
(
void
)
setModel
:(
TOSceneEntity
*
)
model
{
_model
=
model
;
[
self
.
imageView
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
pricure
]
placeholderImage
:
REPLACEIMAGE
];
}
@end
Lighting/Class/SeceneLibraryView.h
deleted
100644 → 0
View file @
74a498e8
//
// SeceneLibraryView.h
// Lighting
//
// Created by mac on 16/5/11.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SeceneCollectionPictureCell.h"
#import "screeningButton.h"
#import "SecenTableViewCell.h"
@protocol
AddSecenePicturedelegate
<
NSObject
>
@required
//回调
-
(
void
)
addSeceneImage
:
(
UIImage
*
)
image
;
-
(
void
)
restSeceneBtnImage
;
@end
@interface
SeceneLibraryView
:
BaseViewController
<
UIGestureRecognizerDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UICollectionViewDataSource
,
UICollectionViewDelegate
,
UICollectionViewDelegateFlowLayout
>
@property
(
nonatomic
,
assign
)
id
<
AddSecenePicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIView
*
subView
;
@property
(
nonatomic
,
strong
)
UIView
*
headerView
;
@property
(
nonatomic
,
strong
)
UITableView
*
seceneTableView
;
@property
(
nonatomic
,
strong
)
UITableView
*
pictureTableView
;
@property
(
nonatomic
,
strong
)
UIButton
*
kongJianBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
fengGeBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
leiXingBtn
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
arrayData
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array1
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array3
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
@property
(
nonatomic
,
strong
)
SceneFilter
*
filter
;
//筛选数据源
@property
(
nonatomic
,
strong
)
SceneResponse
*
response
;
// 列表数据
@property
(
nonatomic
,
strong
)
NSArray
*
imageArray
;
//筛选cell个数图片
@property
(
strong
,
nonatomic
)
screeningButton
*
StyleButton
;
//风格按钮
@property
(
strong
,
nonatomic
)
screeningButton
*
SpaceButton
;
//房型按钮
/**
* 当前页数
*/
@property
(
nonatomic
,
assign
)
int
indexPage
;
/**
* 总页数
*/
@property
(
nonatomic
,
assign
)
int
totalPages
;
/**
* 搜索模型
*/
@property
(
nonatomic
,
strong
)
SceneCondition
*
conditionModel
;
@property
(
nonatomic
,
strong
)
NSString
*
isSelectBtnType
;
@property
(
nonatomic
,
strong
)
NSString
*
isSelectCell
;
@end
Lighting/Class/SeceneLibraryView.m
deleted
100644 → 0
View file @
74a498e8
This diff is collapsed.
Click to expand it.
Lighting/Class/ShareViewController.h
deleted
100644 → 0
View file @
74a498e8
//
// ShareViewController.h
// Lighting
//
// Created by mac on 16/5/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@protocol
SharePicturedelegate
<
NSObject
>
//回调
-
(
void
)
ShareProductImage
:
(
UIImage
*
)
image
;
/**
* 上传图片进度(显示)
*/
-
(
void
)
UploadImageProgress
:(
double
)
progress
;
/**
* 上传完成
*/
-
(
void
)
UploadImageSuccess
;
/**
* 上传失败
*/
-
(
void
)
UploadImageFailue
;
/**
* code不为0
*/
-
(
void
)
CodeNotEqualZero
:(
NSString
*
)
message
;
//界面消失
-
(
void
)
resetShareBtn
;
@end
@interface
ShareViewController
:
BaseViewController
@property
(
nonatomic
,
assign
)
id
<
SharePicturedelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIButton
*
weiXinFriend
;
@property
(
nonatomic
,
strong
)
UIButton
*
weiXinFriendCircle
;
@property
(
nonatomic
,
strong
)
UIButton
*
sinaMicroBlog
;
/**
* 传入商品ID字符串(多个商品时用逗号隔开)
*/
@property
(
nonatomic
,
copy
)
NSString
*
goodsIDs
;
/**
* 传入分享图片
*/
@property
(
nonatomic
,
strong
)
UIImage
*
shareImage
;
@end
Lighting/Class/ShareViewController.m
deleted
100644 → 0
View file @
74a498e8
//
// ShareViewController.m
// Lighting
//
// Created by mac on 16/5/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ShareViewController.h"
@interface
ShareViewController
()
@end
@implementation
ShareViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
[
self
initSubview
];
}
-
(
void
)
initSubview
{
self
.
weiXinFriend
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
25
,
25
,
60
,
60
)];
[
self
.
weiXinFriend
setBackgroundImage
:[
UIImage
imageNamed
:
@"wechat"
]
forState
:
UIControlStateNormal
];
self
.
weiXinFriend
.
tag
=
101
;
[
self
.
weiXinFriend
addTarget
:
self
action
:
@selector
(
sharePicture
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
weiXinFriend
];
UILabel
*
lable1
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
25
+
5
,
90
,
60
,
40
)];
lable1
.
text
=
@"微信好友"
;
lable1
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
self
.
view
addSubview
:
lable1
];
self
.
weiXinFriendCircle
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
25
+
25
+
60
,
25
,
60
,
60
)];
[
self
.
weiXinFriendCircle
setBackgroundImage
:[
UIImage
imageNamed
:
@"Friends-Circle"
]
forState
:
UIControlStateNormal
];
self
.
weiXinFriendCircle
.
tag
=
102
;
[
self
.
weiXinFriendCircle
addTarget
:
self
action
:
@selector
(
sharePicture
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
weiXinFriendCircle
];
UILabel
*
lable2
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
25
+
25
+
60
,
90
,
60
,
40
)];
lable2
.
text
=
@"微信朋友圈"
;
lable2
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
self
.
view
addSubview
:
lable2
];
self
.
sinaMicroBlog
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
25
+
25
+
60
+
25
+
60
,
25
,
60
,
60
)];
[
self
.
sinaMicroBlog
setBackgroundImage
:[
UIImage
imageNamed
:
@"weibo"
]
forState
:
UIControlStateNormal
];
self
.
sinaMicroBlog
.
tag
=
103
;
[
self
.
sinaMicroBlog
addTarget
:
self
action
:
@selector
(
sharePicture
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
sinaMicroBlog
];
UILabel
*
lable3
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
25
+
25
+
60
+
25
+
60
+
5
,
90
,
60
,
40
)];
lable3
.
text
=
@"新浪微博"
;
lable3
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
self
.
view
addSubview
:
lable3
];
}
#pragma mark -分享
-
(
void
)
sharePicture
:
(
UIButton
*
)
sender
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
1
.
0
);
// 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
self
.
goodsIDs
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
//上传图片
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:
SERVERREQUESTURL
(
SHARE
)
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSString
*
shareWeb
=
returnValue
[
@"data"
][
@"url"
];
switch
(
sender
.
tag
)
{
case
101
:
//微信好友
{
//自定义样式
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatSessionData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatSession
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信好友成功"
];
}
}];
}
break
;
case
102
:
//微信朋友圈
{
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatTimelineData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatTimeline
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信朋友圈成功"
];
}
}];
}
break
;
case
103
:
//新浪微博
{
//自定义分享样式
[
UMSocialData
defaultData
].
extConfig
.
sinaData
.
shareText
=
[
NSString
stringWithFormat
:
@"%@%@"
,
@"欧普照明"
,
shareWeb
];
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToSina
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
shareResponse
){
if
(
shareResponse
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享新浪微博成功"
];
}
}];
}
break
;
default
:
break
;
}
}
else
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
CodeNotEqualZero
:)])
{
[
self
.
delegate
CodeNotEqualZero
:
returnValue
[
@"message"
]];
}
}
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageSuccess
)])
{
[
self
.
delegate
UploadImageSuccess
];
}
}
else
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageProgress
:)])
{
[
self
.
delegate
UploadImageProgress
:
progress
];
}
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
NSError
*
error
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageFailue
)])
{
[
self
.
delegate
UploadImageFailue
];
}
}];
}
//实现回调方法:
-
(
void
)
didFinishGetUMSocialDataInViewController
:
(
UMSocialResponseEntity
*
)
response
{
//根据`responseCode`得到发送结果,如果分享成功
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
//得到分享到的微博平台名
NSLog
(
@"share to sns name is %@"
,[[
response
.
data
allKeys
]
objectAtIndex
:
0
]);
}
}
-
(
void
)
viewDidDisappear
:
(
BOOL
)
animated
;
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
resetShareBtn
)])
{
[
self
.
delegate
resetShareBtn
];
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#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
Lighting/Class/ShoppingCell.h
deleted
100644 → 0
View file @
74a498e8
//
// ShoppingCell.h
// Lighting
//
// Created by mac on 16/5/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ShopcarModel.h"
#import "CustomTOGoodsEntity.h"
#import "CustomShopingSeclectButton.h"
@interface
ShoppingCell
:
UITableViewCell
/**
* 选中
*/
@property
(
strong
,
nonatomic
)
CustomShopingSeclectButton
*
selectedButton
;
/**
* 商品图片
*/
@property
(
strong
,
nonatomic
)
UIImageView
*
goodsImageView
;
/**
* 商品信息
*/
@property
(
strong
,
nonatomic
)
UILabel
*
goodsInformationLabe
;
/**
* 吊牌价格
*/
@property
(
strong
,
nonatomic
)
UILabel
*
tagsPriceLabe
;
/**
* 成交价格
*/
@property
(
strong
,
nonatomic
)
UITextField
*
clinchTextfield
;
/**
* 减号
*/
@property
(
strong
,
nonatomic
)
UIButton
*
reduceButton
;
/**
* 商品数量
*/
@property
(
strong
,
nonatomic
)
UILabel
*
goodsNumbersLabe
;
/**
* 加号
*/
@property
(
strong
,
nonatomic
)
UIButton
*
addButton
;
/**
* 产品金额
*/
@property
(
strong
,
nonatomic
)
UILabel
*
productPriceLabe
;
/**
* 数据源model
*/
@property
(
nonatomic
,
strong
)
ShopcarModel
*
model
;
@property
(
nonatomic
,
strong
)
CustomTOGoodsEntity
*
customGoods
;
@property
(
nonatomic
,
assign
)
int
value
;
/**
* 传入cel下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
cellindex
;
/**
* 传回选中状态
*/
@property
(
nonatomic
,
copy
)
void
(
^
returnCellblock
)(
NSInteger
index
);
//选中索引
//@property (strong, nonatomic) NSIndexPath *indexpath;
/**
* 成交价背景View
*/
@property
(
strong
,
nonatomic
)
UIView
*
ClinchPriceBackView
;
/**
* 商品数量
*/
//@property (nonatomic,assign) id<ChangeGoodsNumberDelegate>delegate;
@end
Lighting/Class/ShoppingCell.m
deleted
100644 → 0
View file @
74a498e8
//
// ShoppingCell.m
// Lighting
//
// Created by mac on 16/5/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ShoppingCell.h"
#define Width 760
#define Height 90
#define Gap 5
@implementation
ShoppingCell
-
(
instancetype
)
initWithStyle
:(
UITableViewCellStyle
)
style
reuseIdentifier
:(
NSString
*
)
reuseIdentifier
{
self
=
[
super
initWithStyle
:
style
reuseIdentifier
:
reuseIdentifier
];
if
(
self
)
{
self
.
value
=
1
;
self
.
customGoods
=
[[
CustomTOGoodsEntity
alloc
]
init
];
[
self
bulidLayout
];
}
return
self
;
}
-
(
void
)
bulidLayout
{
// 选中
self
.
selectedButton
=
[[
CustomShopingSeclectButton
alloc
]
initWithFrame
:
CGRectMake
(
20
,
25
,
30
,
Height
-
60
)];
[
self
.
selectedButton
setBackgroundImage
:[
UIImage
imageNamed
:
@"box-副本"
]
forState
:
UIControlStateNormal
];
// box-副本
[
self
.
contentView
addSubview
:
self
.
selectedButton
];
// 商品图片
self
.
goodsImageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
Width
/
12
,
0
,
2
*
Width
/
12
,
Height
)];
self
.
goodsImageView
.
image
=
[
UIImage
imageNamed
:
@"05产品库-详情_03"
];
//05产品库-详情_03
[
self
.
contentView
addSubview
:
self
.
goodsImageView
];
// 商品信息
self
.
goodsInformationLabe
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
3
*
Width
/
12
,
0
,
4
*
Width
/
12
,
Height
)];
self
.
goodsInformationLabe
.
text
=
@"吊灯jkdsfhkdhfkdsh
\n
2000133434"
;
self
.
goodsInformationLabe
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
goodsInformationLabe
.
numberOfLines
=
0
;
[
self
.
contentView
addSubview
:
self
.
goodsInformationLabe
];
// 吊牌价格
self
.
tagsPriceLabe
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
7
*
Width
/
12
,
0
,
2
*
Width
/
12
,
Height
)];
self
.
tagsPriceLabe
.
text
=
@"¥5500"
;
self
.
tagsPriceLabe
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
self
.
tagsPriceLabe
];
//// 成交价格
// self.clinchTextfield=[[UITextField alloc]initWithFrame:CGRectMake(8*Width/15, 0, 2*Width/15, Height)];
// self.clinchTextfield.text=@"$5500";
// [self.contentView addSubview:self.clinchTextfield];
// 数量减
self
.
reduceButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
9
*
Width
/
12
,
20
,
Width
/
12
-
5
,
Height
-
40
)];
[
self
.
reduceButton
setTitle
:
@"-"
forState
:
UIControlStateNormal
];
self
.
reduceButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
];
self
.
reduceButton
.
backgroundColor
=
RGB
(
249
,
244
,
241
,
1
);
[
self
.
reduceButton
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
self
.
reduceButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
];
self
.
reduceButton
.
tag
=
100
;
[
self
.
reduceButton
addTarget
:
self
action
:
@selector
(
resetVale
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
self
.
reduceButton
];
// 商品数量
self
.
goodsNumbersLabe
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
10
*
Width
/
12
,
20
,
Width
/
12
,
Height
-
40
)];
self
.
goodsNumbersLabe
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
self
.
value
];
self
.
goodsNumbersLabe
.
layer
.
masksToBounds
=
YES
;
self
.
goodsNumbersLabe
.
layer
.
cornerRadius
=
5
;
self
.
goodsNumbersLabe
.
layer
.
borderWidth
=
1
;
self
.
goodsNumbersLabe
.
layer
.
borderColor
=
[
UIColor
grayColor
].
CGColor
;
self
.
goodsNumbersLabe
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
self
.
goodsNumbersLabe
];
// 数量加
self
.
addButton
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
11
*
Width
/
12
+
5
,
20
,
Width
/
12
-
5
,
Height
-
40
)];
[
self
.
addButton
setTitle
:
@"+"
forState
:
UIControlStateNormal
];
self
.
addButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
];
self
.
addButton
.
backgroundColor
=
RGB
(
249
,
244
,
241
,
1
);
[
self
.
addButton
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
self
.
addButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
18
.
0
];
self
.
addButton
.
tag
=
200
;
[
self
.
addButton
addTarget
:
self
action
:
@selector
(
resetVale
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
self
.
addButton
];
UILabel
*
lable
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
15
,
Height
-
1
,
Width
-
20
,
1
)];
lable
.
backgroundColor
=
[
UIColor
grayColor
];
[
self
.
contentView
addSubview
:
lable
];
//// 产品金额
// self.productPriceLabe=[[UILabel alloc]initWithFrame:CGRectMake(13*Width/15, 0, 2*Width/15, Height)];
// self.productPriceLabe.text=@"$5500";
// self.productPriceLabe.textColor=[UIColor redColor];
// [self.contentView addSubview:self.productPriceLabe];
}
-
(
void
)
resetVale
:
(
UIButton
*
)
sender
{
switch
(
sender
.
tag
)
{
case
100
:
//减少
{
if
(
self
.
value
<=
1
)
{
[
self
ErrorMBProgressView
:
@"不能小于1"
];
return
;
}
else
{
self
.
value
-=
1
;
}
}
break
;
case
200
:
//增加
{
// //不能大于库存
// [self ErrorMBProgressView:@"超过库存"];
self
.
value
+=
1
;
}
break
;
default
:
break
;
}
self
.
goodsNumbersLabe
.
text
=
[
NSString
stringWithFormat
:
@"%d"
,
self
.
value
];
}
#pragma mark -显示错误的提示框
-
(
void
)
ErrorMBProgressView
:
(
NSString
*
)
errorString
{
MBProgressHUD
*
hud
=
[
MBProgressHUD
showHUDAddedTo
:
self
.
superview
animated
:
YES
];
hud
.
labelText
=
errorString
;
hud
.
margin
=
10
.
f
;
hud
.
color
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
5
];
hud
.
minSize
=
CGSizeMake
(
250
,
70
);
hud
.
animationType
=
MBProgressHUDAnimationZoom
;
hud
.
mode
=
MBProgressHUDModeText
;
hud
.
removeFromSuperViewOnHide
=
YES
;
[
hud
hide
:
YES
afterDelay
:
1
.
0
f
];
}
-
(
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
Lighting/Class/ShoppingView.h
deleted
100644 → 0
View file @
74a498e8
//
// ShoppingView.h
// Lighting
//
// Created by mac on 16/5/23.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
#import "ShoppingCell.h"
#import "CustomShopingSeclectButton.h"
@protocol
Shoppingdelegate
<
NSObject
>
@required
-
(
void
)
restShoppingBtnImage
;
@end
@interface
ShoppingView
:
BaseViewController
<
UIGestureRecognizerDelegate
,
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
assign
)
id
<
Shoppingdelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIView
*
subView
;
@property
(
nonatomic
,
strong
)
UIView
*
headerView
;
@property
(
nonatomic
,
strong
)
UIView
*
toolView
;
@property
(
nonatomic
,
strong
)
UIView
*
footView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
nameDataArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productModelArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
selectTagArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
AddArray
;
@property
(
nonatomic
,
strong
)
UITableView
*
shoppingTableView
;
@property
(
nonatomic
,
assign
)
BOOL
isAllSelected
;
@property
(
nonatomic
,
strong
)
UIButton
*
allSelectBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
confirmAddBtn
;
@end
\ No newline at end of file
Lighting/Class/ShoppingView.m
deleted
100644 → 0
View file @
74a498e8
This diff is collapsed.
Click to expand it.
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
e3ce2411
...
...
@@ -10,7 +10,6 @@
#import "CustomTabbarController.h"
#import "Toolview.h"
#import "AppDelegate.h"
#import "FollowHeartViewController.h"
#import "SceneLibraryViewController.h"
#import "ProductLibraryViewController.h"
#import "CustomerManagementViewController.h"
...
...
Lighting/Class/tools/ImageCropperView.h
deleted
100755 → 0
View file @
74a498e8
//
// ImageCopperView.h
// PerfectImageCropper
//
// Created by mac on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
//
#import <UIKit/UIKit.h>
@class
ImageCropperView
;
@protocol
ImageCropperDelegate
<
NSObject
>
@required
//回调
-
(
void
)
removeSelfObject
:
(
ImageCropperView
*
)
Cropper
;
@end
@interface
ImageCropperView
:
UIImageView
@property
(
nonatomic
,
assign
)
id
<
ImageCropperDelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
TOGoodsEntity
*
GoodsEntity
;
-
(
void
)
setup
;
@end
//
//@protocol ImageCropperDelegate <NSObject>
//
//@required
//- (void)imageCropper:(ImageCropperView *)cropper didFinishCroppingWithImage:(UIImage *)image;
//- (void)removeSelfObject:(ImageCropperView*)Cropper;
//@end
Lighting/Class/tools/ImageCropperView.m
deleted
100755 → 0
View file @
74a498e8
//
// ImageCopperView.m
// PerfectImageCropper
//
// Created by mac on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
//
#import "ImageCropperView.h"
#import <QuartzCore/QuartzCore.h>
#include <math.h>
#import "UIImage+Rotation.h"
@implementation
ImageCropperView
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setup
];
}
return
self
;
}
-
(
void
)
setup
{
self
.
clipsToBounds
=
YES
;
self
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
setUserInteractionEnabled
:
YES
];
[
self
setMultipleTouchEnabled
:
YES
];
// 旋转手势
UIRotationGestureRecognizer
*
rotationGestureRecognizer
=
[[
UIRotationGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
rotateView
:
)];
[
self
addGestureRecognizer
:
rotationGestureRecognizer
];
// 缩放手势
UIPinchGestureRecognizer
*
pinchGestureRecognizer
=
[[
UIPinchGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
pinchView
:
)];
[
self
addGestureRecognizer
:
pinchGestureRecognizer
];
// 移动手势
UIPanGestureRecognizer
*
panGestureRecognizer
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
panView
:
)];
[
panGestureRecognizer
setMinimumNumberOfTouches
:
1
];
[
panGestureRecognizer
setMaximumNumberOfTouches
:
1
];
[
self
addGestureRecognizer
:
panGestureRecognizer
];
//// 旋转
// UIRotationGestureRecognizer *rotateGes = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotateImage:)];
// [self addGestureRecognizer:rotateGes];
//
//// 放大缩小
// UIPinchGestureRecognizer *scaleGes = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scaleImage:)];
// [self addGestureRecognizer:scaleGes];
//
//
//// 移动
// UIPanGestureRecognizer *moveGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(moveImage:)];
// [moveGes setMinimumNumberOfTouches:1];
// [moveGes setMaximumNumberOfTouches:1];
// [self addGestureRecognizer:moveGes];
// 长按
UILongPressGestureRecognizer
*
longPressGR
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
handleLongPress2
:
)];
longPressGR
.
allowableMovement
=
NO
;
longPressGR
.
minimumPressDuration
=
0
.
5
;
[
self
addGestureRecognizer
:
longPressGR
];
}
// 处理旋转手势
-
(
void
)
rotateView
:
(
UIRotationGestureRecognizer
*
)
rotationGestureRecognizer
{
UIView
*
view
=
rotationGestureRecognizer
.
view
;
if
(
rotationGestureRecognizer
.
state
==
UIGestureRecognizerStateBegan
||
rotationGestureRecognizer
.
state
==
UIGestureRecognizerStateChanged
)
{
view
.
transform
=
CGAffineTransformRotate
(
view
.
transform
,
rotationGestureRecognizer
.
rotation
);
[
rotationGestureRecognizer
setRotation
:
0
];
}
}
// 处理缩放手势
-
(
void
)
pinchView
:
(
UIPinchGestureRecognizer
*
)
pinchGestureRecognizer
{
UIView
*
view
=
pinchGestureRecognizer
.
view
;
if
(
pinchGestureRecognizer
.
state
==
UIGestureRecognizerStateBegan
||
pinchGestureRecognizer
.
state
==
UIGestureRecognizerStateChanged
)
{
view
.
transform
=
CGAffineTransformScale
(
view
.
transform
,
pinchGestureRecognizer
.
scale
,
pinchGestureRecognizer
.
scale
);
pinchGestureRecognizer
.
scale
=
1
;
}
}
// 处理拖拉手势
-
(
void
)
panView
:
(
UIPanGestureRecognizer
*
)
panGestureRecognizer
{
UIView
*
view
=
panGestureRecognizer
.
view
;
if
(
panGestureRecognizer
.
state
==
UIGestureRecognizerStateBegan
||
panGestureRecognizer
.
state
==
UIGestureRecognizerStateChanged
)
{
CGPoint
translation
=
[
panGestureRecognizer
translationInView
:
view
.
superview
];
[
view
setCenter
:(
CGPoint
){
view
.
center
.
x
+
translation
.
x
,
view
.
center
.
y
+
translation
.
y
}];
[
panGestureRecognizer
setTranslation
:
CGPointZero
inView
:
view
.
superview
];
}
}
//float _lastTransX = 0.0, _lastTransY = 0.0;
//- (void)moveImage:(UIPanGestureRecognizer *)sender
//{
// CGPoint translatedPoint = [sender translationInView:self];
//
// if([sender state] == UIGestureRecognizerStateBegan) {
// _lastTransX = 0.0;
// _lastTransY = 0.0;
// }
//
// CGAffineTransform trans = CGAffineTransformMakeTranslation(translatedPoint.x - _lastTransX, translatedPoint.y - _lastTransY);
// CGAffineTransform newTransform = CGAffineTransformConcat(self.transform, trans);
// _lastTransX = translatedPoint.x;
// _lastTransY = translatedPoint.y;
//
// self.transform = newTransform;
//}
//
//float _lastScale = 1.0;
//- (void)scaleImage:(UIPinchGestureRecognizer *)sender
//{
// if([sender state] == UIGestureRecognizerStateBegan) {
//
// _lastScale = 2.0;
// return;
// }
//
// CGFloat scale = [sender scale]/_lastScale;
//
// CGAffineTransform currentTransform = self.transform;
// CGAffineTransform newTransform = CGAffineTransformScale(currentTransform, scale, scale);
// [self setTransform:newTransform];
//
// _lastScale = [sender scale];
//}
//
//float _lastRotation = 0.0;
////旋转
//- (void)rotateImage:(UIRotationGestureRecognizer *)sender
//{
// if([sender state] == UIGestureRecognizerStateEnded) {
//
// _lastRotation = 0.0;
// return;
// }
//
// CGFloat rotation = -_lastRotation + [sender rotation];
//
// CGAffineTransform currentTransform = self.transform;
// CGAffineTransform newTransform = CGAffineTransformRotate(currentTransform,rotation);
// [self setTransform:newTransform];
//
// _lastRotation = [sender rotation];
//
//}
//长按响应的事件
-
(
void
)
handleLongPress2
:
(
id
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
removeSelfObject
:)])
{
[
self
.
delegate
removeSelfObject
:
self
];
}
// [self removeFromSuperview];
}
@end
Lighting/Class/tools/UIImage+Rotation.h
deleted
100755 → 0
View file @
74a498e8
//
// UIImage+Rotation.h
// PerfectImageCropper
//
// Created by mac on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
UIImage
(
Rotation
)
-
(
UIImage
*
)
imageRotatedByRadians
:(
CGFloat
)
radians
;
-
(
UIImage
*
)
imageRotatedByDegrees
:(
CGFloat
)
degrees
;
@end
Lighting/Class/tools/UIImage+Rotation.m
deleted
100755 → 0
View file @
74a498e8
//
// UIImage+Rotation.m
// PerfectImageCropper
//
// Created by mac on 16/5/12.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "UIImage+Rotation.h"
CGFloat
DegreesToRadians
(
CGFloat
degrees
)
{
return
degrees
*
M_PI
/
180
;};
CGFloat
RadiansToDegrees
(
CGFloat
radians
)
{
return
radians
*
180
/
M_PI
;};
@implementation
UIImage
(
Rotation
)
-
(
UIImage
*
)
imageRotatedByRadians
:(
CGFloat
)
radians
{
return
[
self
imageRotatedByDegrees
:
RadiansToDegrees
(
radians
)];
}
-
(
UIImage
*
)
imageRotatedByDegrees
:(
CGFloat
)
degrees
{
UIView
*
rotatedViewBox
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
size
.
width
,
self
.
size
.
height
)];
CGAffineTransform
t
=
CGAffineTransformMakeRotation
(
DegreesToRadians
(
degrees
));
rotatedViewBox
.
transform
=
t
;
CGSize
rotatedSize
=
rotatedViewBox
.
frame
.
size
;
UIGraphicsBeginImageContext
(
rotatedSize
);
CGContextRef
bitmap
=
UIGraphicsGetCurrentContext
();
CGContextTranslateCTM
(
bitmap
,
rotatedSize
.
width
/
2
,
rotatedSize
.
height
/
2
);
CGContextRotateCTM
(
bitmap
,
DegreesToRadians
(
degrees
));
CGContextScaleCTM
(
bitmap
,
1
.
0
,
-
1
.
0
);
CGContextDrawImage
(
bitmap
,
CGRectMake
(
-
self
.
size
.
width
/
2
,
-
self
.
size
.
height
/
2
,
self
.
size
.
width
,
self
.
size
.
height
),
[
self
CGImage
]);
UIImage
*
resImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
return
resImage
;
}
@end
;
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
e3ce2411
This diff is collapsed.
Click to expand it.
Lighting/Lighting/Info.plist
View file @
e3ce2411
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0.
2
<
/string
>
<
string
>
1.0.
3
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
e3ce2411
...
...
@@ -620,7 +620,7 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"ysN-Xc-Pna"
>
<rect
key=
"frame"
x=
"104"
y=
"43"
width=
"180"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"
s
ystem"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"
boldS
ystem"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
...
...
@@ -807,7 +807,7 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"02b-vz-geR"
>
<rect
key=
"frame"
x=
"564"
y=
"16"
width=
"267"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"
s
ystem"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"
boldS
ystem"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
...
...
@@ -1084,21 +1084,6 @@
</objects>
<point
key=
"canvasLocation"
x=
"1784"
y=
"2690"
/>
</scene>
<!--Follow Heart View Controller-->
<scene
sceneID=
"uXu-cw-nA9"
>
<objects>
<viewController
storyboardIdentifier=
"followheart"
id=
"l1V-0r-KUU"
customClass=
"FollowHeartViewController"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"l3N-MD-Pvy"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"1024"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<navigationItem
key=
"navigationItem"
id=
"Qee-hH-9DX"
/>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"1zC-Ze-yjb"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"1784"
y=
"3790"
/>
</scene>
<!--Scene Library View Controller-->
<scene
sceneID=
"11E-ZI-kT0"
>
<objects>
...
...
@@ -2658,7 +2643,7 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"dAD-mk-dai"
>
<rect
key=
"frame"
x=
"210"
y=
"75"
width=
"230"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"
s
ystem"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"
boldS
ystem"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
...
...
Lighting/Tools/ExperienceCentreViewController.h
View file @
e3ce2411
...
...
@@ -103,7 +103,15 @@
*/
@property
(
nonatomic
,
assign
)
BOOL
boolValue
;
/**
* 选中场景临时数组
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
sceneTempArray
;
/**
* 选中产品临时数组
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productTempArray
;
...
...
Lighting/Tools/ExperienceCentreViewController.m
View file @
e3ce2411
...
...
@@ -34,7 +34,6 @@
-
(
NSMutableArray
*
)
sceneDatasArray
{
if
(
!
_sceneDatasArray
)
{
_sceneDatasArray
=
[
NSMutableArray
array
];
}
return
_sceneDatasArray
;
...
...
@@ -44,7 +43,6 @@
-
(
NSMutableArray
*
)
productDatasArray
{
if
(
!
_productDatasArray
)
{
_productDatasArray
=
[
NSMutableArray
array
];
}
return
_productDatasArray
;
...
...
@@ -54,12 +52,27 @@
-
(
NSMutableArray
*
)
shareGoodsArray
{
if
(
!
_shareGoodsArray
)
{
_shareGoodsArray
=
[
NSMutableArray
array
];
}
return
_shareGoodsArray
;
}
-
(
NSMutableArray
*
)
sceneTempArray
{
if
(
!
_sceneTempArray
)
{
_sceneTempArray
=
[
NSMutableArray
array
];
}
return
_sceneTempArray
;
}
-
(
NSMutableArray
*
)
productTempArray
{
if
(
!
_productTempArray
)
{
_productTempArray
=
[
NSMutableArray
array
];
}
return
_productTempArray
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
...
...
@@ -459,35 +472,33 @@
if
(
isScene
)
{
//场景
SceneListModel
*
sceneModel
=
[(
SceneListModel
*
)
model
copy
];
for
(
SceneListModel
*
objc
in
self
.
sceneDatasArray
)
{
if
([
objc
.
fid
isEqualToString
:
sceneModel
.
fid
])
{
for
(
int
i
=
0
;
i
<
self
.
sceneDatasArray
.
count
;
i
++
)
{
SceneListModel
*
model
=
[
self
.
sceneDatasArray
objectAtIndex_opple
:
i
];
if
([
model
.
fid
isEqualToString
:
sceneModel
.
fid
])
{
isThere
(
YES
);
[
self
.
sceneDatasArray
removeObject
:
objc
];
[
self
.
sceneScrollview
reloadData
];
[
self
.
sceneDatasArray
removeObject
:
model
];
[
self
.
sceneScrollview
deleteItemsAtIndexPaths
:@[[
NSIndexPath
indexPathForItem
:
i
inSection
:
0
]]
];
return
;
}
}
isThere
(
NO
);
sceneModel
.
isSelectedSate
=
NO
;
[
self
.
sceneDatasArray
addObject
:
sceneModel
];
SHARED_APPDELEGATE
.
sceneArray
=
self
.
sceneDatasArray
;
[
self
.
sceneTempArray
addObject
:
sceneModel
];
}
else
{
//产品
TOGoodsEntityModel
*
goodsModel
=
[(
TOGoodsEntityModel
*
)
model
copy
];
for
(
TOGoodsEntityModel
*
objc
in
self
.
productDatasArray
)
{
if
([
objc
.
fid
isEqualToString
:
goodsModel
.
fid
])
{
for
(
int
i
=
0
;
i
<
self
.
productDatasArray
.
count
;
i
++
)
{
TOGoodsEntityModel
*
model
=
[
self
.
productDatasArray
objectAtIndex_opple
:
i
];
if
([
model
.
fid
isEqualToString
:
goodsModel
.
fid
])
{
isThere
(
YES
);
[
self
.
productDatasArray
removeObject
:
objc
];
[
self
.
productScrollview
reloadData
];
[
self
.
productDatasArray
removeObject
:
model
];
[
self
.
productScrollview
deleteRowsAtIndexPaths
:@[[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
]]
withRowAnimation
:
UITableViewRowAnimationFade
];
return
;
}
}
isThere
(
NO
);
goodsModel
.
isSelectedState
=
NO
;
[
self
.
productDatasArray
addObject
:
goodsModel
];
SHARED_APPDELEGATE
.
productArray
=
self
.
productDatasArray
;
[
self
.
productTempArray
addObject
:
goodsModel
];
}
}
...
...
@@ -496,12 +507,22 @@
{
if
(
isScene
)
{
[
self
.
sceneScrollview
reloadData
];
SceneListModel
*
model
=
[
self
.
sceneTempArray
firstObject
];
model
.
isSelectedSate
=
NO
;
[
self
.
sceneDatasArray
addObject
:
model
];
SHARED_APPDELEGATE
.
sceneArray
=
self
.
sceneDatasArray
;
[
self
.
sceneTempArray
removeObjectAtIndex
:
0
];
[
self
.
sceneScrollview
insertItemsAtIndexPaths
:@[[
NSIndexPath
indexPathForItem
:
self
.
sceneDatasArray
.
count
-
1
inSection
:
0
]]];
[
self
.
sceneScrollview
selectItemAtIndexPath
:[
NSIndexPath
indexPathForRow
:
self
.
sceneDatasArray
.
count
-
1
inSection
:
0
]
animated
:
YES
scrollPosition
:
UICollectionViewScrollPositionRight
];
}
else
{
[
self
.
productScrollview
reloadData
];
TOGoodsEntityModel
*
goodsModel
=
[
self
.
productTempArray
firstObject
];
goodsModel
.
isSelectedState
=
NO
;
[
self
.
productDatasArray
addObject
:
goodsModel
];
SHARED_APPDELEGATE
.
productArray
=
self
.
productDatasArray
;
[
self
.
productTempArray
removeObjectAtIndex
:
0
];
[
self
.
productScrollview
insertRowsAtIndexPaths
:@[[
NSIndexPath
indexPathForRow
:
self
.
productDatasArray
.
count
-
1
inSection
:
0
]]
withRowAnimation
:
UITableViewRowAnimationFade
];
[
self
.
productScrollview
scrollToRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
self
.
productDatasArray
.
count
-
1
inSection
:
0
]
atScrollPosition
:
UITableViewScrollPositionBottom
animated
:
YES
];
}
}
...
...
Lighting/Tools/PrefixHeader.pch
View file @
e3ce2411
...
...
@@ -45,13 +45,11 @@
*/
#define NavigationHeight 64
/**
* 默认显示头像
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
/**
* 屏幕的物理高度
*/
...
...
@@ -92,8 +90,6 @@
*/
#define kMainBlueColor [UIColor colorWithRed:89/255.0 green:172/255.0 blue:220/255.0 alpha:1.0]
/**
* 默认圆角系数
*/
...
...
@@ -121,9 +117,6 @@
*/
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
/**
* 搜索框输入通知
*/
...
...
@@ -134,7 +127,6 @@
*/
#define POPROOTCONTROLLER @"POPROOTCONTROLLER"
/**
* 储存本地的搜索历史文件名
*/
...
...
@@ -172,13 +164,11 @@
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
/**
* 一键分享显示文本
*/
#define ShareTitle @"欧立方体验中心一键分享"
/**
* 无数据友好图片
*/
...
...
Lighting/Tools/SceneSectionHeaderView.m
View file @
e3ce2411
...
...
@@ -28,6 +28,8 @@
[
self
.
sectionButton
setTitleColor
:
kTCColor
(
170
,
170
,
170
)
forState
:
UIControlStateNormal
];
self
.
sectionButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
13
];
[
self
.
sectionButton
setTitleColor
:
kMainBlueColor
forState
:
UIControlStateSelected
];
[
self
.
sectionButton
setBackgroundColor
:
kTCColor
(
255
,
255
,
255
)];
[
self
addSubview
:
self
.
sectionButton
];
//横线
...
...
Lighting/Tools/SceneViewController.m
View file @
e3ce2411
...
...
@@ -694,16 +694,19 @@
break
;
}
if
(
self
.
rightSelectedIndex
==
2
)
{
BOOL
boolValue
=
[[
self
.
openArray
objectAtIndex_opple
:
button
.
tag
-
100
]
boolValue
];
NSMutableIndexSet
*
index
=
[[
NSMutableIndexSet
alloc
]
init
];
for
(
int
i
=
0
;
i
<
self
.
openArray
.
count
;
i
++
)
{
[
self
.
openArray
replaceObjectAtIndex
:
i
withObject
:
@"0"
];
if
([[
self
.
openArray
objectAtIndex_opple
:
i
]
isEqualToString
:
@"1"
])
{
[
self
.
openArray
replaceObjectAtIndex
:
i
withObject
:
@"0"
];
[
index
addIndex
:
i
];
}
else
if
(
i
==
button
.
tag
-
100
)
{
[
index
addIndex
:
i
];
}
}
[
self
.
openArray
replaceObjectAtIndex
:
button
.
tag
-
100
withObject
:
boolValue
?
@"0"
:
@"1"
];
[
self
.
screeningTableView
reloadSections
:
index
withRowAnimation
:
UITableViewRowAnimationMiddle
];
[
self
.
screeningTableView
reloadSections
:
index
withRowAnimation
:
UITableViewRowAnimationTop
];
}
else
{
[
self
.
sceneOrProductClollectionView
.
mj_header
beginRefreshing
];
...
...
@@ -836,12 +839,11 @@
//路径曲线
UIBezierPath
*
movePath
=
[
UIBezierPath
bezierPath
];
[
movePath
moveToPoint
:
imageView
.
center
];
[
movePath
addQuadCurveToPoint
:
endPoint
controlPoint
:
controlPoint
];
[
movePath
addQuadCurveToPoint
:
endPoint
controlPoint
:
controlPoint
];
//关键帧
CAKeyframeAnimation
*
moveAnim
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
moveAnim
.
path
=
movePath
.
CGPath
;
moveAnim
.
calculationMode
=
kCAAnimationLinear
;
moveAnim
.
removedOnCompletion
=
YES
;
//旋转变化
...
...
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