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
50c40fc7
Commit
50c40fc7
authored
May 12, 2016
by
zhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
6d9432e9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
21 deletions
+112
-21
FollowHeartViewController.h
Lighting/Class/FollowHeartViewController.h
+1
-0
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+23
-4
FootSubView.h
Lighting/Class/FootSubView.h
+2
-1
FootSubView.m
Lighting/Class/FootSubView.m
+31
-10
RightSubView.h
Lighting/Class/RightSubView.h
+1
-1
RightSubView.m
Lighting/Class/RightSubView.m
+34
-5
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+20
-0
No files found.
Lighting/Class/FollowHeartViewController.h
View file @
50c40fc7
...
...
@@ -19,4 +19,5 @@
@property
(
nonatomic
,
strong
)
FootSubView
*
footSubView
;
@property
(
nonatomic
,
strong
)
SeceneLibraryView
*
seceneLibraryView
;
@property
(
nonatomic
,
strong
)
ProductLibraryView
*
productLibraryView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@end
Lighting/Class/FollowHeartViewController.m
View file @
50c40fc7
...
...
@@ -7,6 +7,8 @@
//
#import "FollowHeartViewController.h"
#import <QuartzCore/QuartzCore.h>
#import "ImageCropperView.h"
@interface
FollowHeartViewController
()
...
...
@@ -22,9 +24,9 @@
}
-
(
void
)
configSubView
{
UIImageView
*
i
mageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"backView.png"
]];
i
mageView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
[
self
.
view
addSubview
:
i
mageView
];
self
.
backGroundI
mageView
=
[[
UIImageView
alloc
]
initWithImage
:[
UIImage
imageNamed
:
@"backView.png"
]];
self
.
backGroundI
mageView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
[
self
.
view
addSubview
:
self
.
backGroundI
mageView
];
self
.
leftSubView
=
[[
LeftSubView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
200
,
ScreenHeight
-
200
)];
self
.
leftSubView
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
leftSubView
];
...
...
@@ -44,7 +46,7 @@
}
#pragma
left
subView delegate
#pragma subView delegate
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
{
switch
(
btnTag
)
{
...
...
@@ -96,6 +98,23 @@
}
}
//场景赋图回调
-
(
void
)
resetSuperBackGroundImage
:
(
UIImage
*
)
image
{
self
.
backGroundImageView
.
image
=
image
;
}
//产品附图回调
-
(
void
)
addProductImage
:
(
UIImage
*
)
image
{
ImageCropperView
*
cropper
=
[[
ImageCropperView
alloc
]
initWithFrame
:
CGRectMake
(
400
,
300
,
300
,
300
)];
// cropper.center=self.view.center;
// cropper.bounds=CGRectMake(0, 0, 200, 200);
cropper
.
layer
.
borderWidth
=
1
.
0
;
cropper
.
layer
.
borderColor
=
[
UIColor
blueColor
].
CGColor
;
// [cropper setup];
cropper
.
image
=
image
;
[
self
.
view
addSubview
:
cropper
];
}
-
(
void
)
setViewAnimations
:
(
UIButton
*
)
sender
{
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
...
...
Lighting/Class/FootSubView.h
View file @
50c40fc7
...
...
@@ -12,10 +12,11 @@
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
-
(
void
)
resetSuperBackGroundImage
:(
UIImage
*
)
image
;
@end
@interface
FootSubView
:
UIView
@interface
FootSubView
:
UIView
<
UIGestureRecognizerDelegate
>
@property
(
nonatomic
,
assign
)
id
<
FootViewBtnClickdelegate
>
delegate
;
@property
(
nonatomic
,
strong
)
UIScrollView
*
scrollView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
...
...
Lighting/Class/FootSubView.m
View file @
50c40fc7
...
...
@@ -33,21 +33,42 @@
[
button
addTarget
:
self
action
:
@selector
(
footBtnDidSelected
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
button
];
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
.
scrollView
.
contentSize
=
CGSizeMake
((
self
.
dataArray
.
count
+
1
)
*
(
100
+
10
),
0
);
for
(
int
i
=
0
;
i
<
self
.
dataArray
.
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
// 定义图片名,通过循环把所有的图片添加到scrollView中
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"backView"
];
imageView
.
frame
=
CGRectMake
(
i
*
(
100
+
10
),
30
,
100
,
100
);
imageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
[
self
.
scrollView
addSubview
:
imageView
];
}
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self
.
scrollView
.
showsHorizontalScrollIndicator
=
NO
;
[
self
addSubview
:
self
.
scrollView
];
UIButton
*
button
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
i
*
(
100
+
10
),
30
,
100
,
100
)];
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"backView"
];
[
button
setImage
:[
UIImage
imageNamed
:
imageName
]
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
(
@"%d"
,(
sender
.
tag
));
if
([
self
.
delegate
respondsToSelector
:
@selector
(
resetSuperBackGroundImage
:)])
{
[
self
.
delegate
resetSuperBackGroundImage
:
sender
.
imageView
.
image
];
}
// resetSuperBackGroundImage
}
//长按
-
(
void
)
longPress
{
NSLog
(
@"长按"
);
}
-
(
void
)
footBtnDidSelected
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
buttonClick
:
withButton
:
)])
{
...
...
Lighting/Class/RightSubView.h
View file @
50c40fc7
...
...
@@ -12,7 +12,7 @@
//回调
-
(
void
)
buttonClick
:
(
NSInteger
)
btnTag
withButton
:
(
UIButton
*
)
button
;
-
(
void
)
addProductImage
:(
UIImage
*
)
image
;
@end
@interface
RightSubView
:
UIView
...
...
Lighting/Class/RightSubView.m
View file @
50c40fc7
...
...
@@ -36,18 +36,47 @@
// contentSize的y值为0表示在垂直方向上不做滚动
self
.
scrollView
.
contentSize
=
CGSizeMake
(
0
,
(
self
.
dataArray
.
count
+
1
)
*
(
100
+
10
));
for
(
int
i
=
0
;
i
<
self
.
dataArray
.
count
;
i
++
)
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
init
];
// 定义图片名,通过循环把所有的图片添加到scrollView中
UIButton
*
button
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
80
,
20
+
i
*
(
100
+
10
),
100
,
100
)];
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"05产品库-详情_03"
];
imageView
.
frame
=
CGRectMake
(
80
,
20
+
i
*
(
100
+
10
),
100
,
100
);
imageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
[
self
.
scrollView
addSubview
:
imageView
];
[
button
setImage
:[
UIImage
imageNamed
:
imageName
]
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
];
// UIImageView *imageView = [[UIImageView alloc] init];
// // 定义图片名,通过循环把所有的图片添加到scrollView中
// NSString *imageName = [NSString stringWithFormat:@"05产品库-详情_03" ];
// imageView.frame = CGRectMake(80, 20+i*(100+10), 100, 100);
// imageView.image = [UIImage imageNamed:imageName];
// [self.scrollView addSubview:imageView];
}
// 禁用滚动条,只设置水平方向的滚动条即可,竖直方向的滚动范围是0,所以没必要设置
self
.
scrollView
.
showsVerticalScrollIndicator
=
NO
;
[
self
addSubview
:
self
.
scrollView
];
}
//单次点击
-
(
void
)
clicked
:
(
UIButton
*
)
sender
{
NSLog
(
@"%d"
,(
sender
.
tag
));
if
([
self
.
delegate
respondsToSelector
:
@selector
(
addProductImage
:)])
{
[
self
.
delegate
addProductImage
:
sender
.
imageView
.
image
];
}
// resetSuperBackGroundImage
}
//长按
-
(
void
)
longPress
{
NSLog
(
@"长按"
);
}
-
(
void
)
rightBtnDidSelected
:
(
UIButton
*
)
sender
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
buttonClick
:
withButton
:
)])
{
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
50c40fc7
...
...
@@ -14,6 +14,8 @@
04A14A251CE0FC3A00DAD5F3
/* LeftSubView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A14A241CE0FC3A00DAD5F3
/* LeftSubView.m */
;
};
04A14A281CE0FC5600DAD5F3
/* RightSubView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A14A271CE0FC5600DAD5F3
/* RightSubView.m */
;
};
04A14A2B1CE0FC7F00DAD5F3
/* FootSubView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04A14A2A1CE0FC7F00DAD5F3
/* FootSubView.m */
;
};
04F0044A1CE4234700887E9D
/* ImageCropperView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F004471CE4234600887E9D
/* ImageCropperView.m */
;
};
04F0044B1CE4234700887E9D
/* UIImage+Rotation.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04F004491CE4234600887E9D
/* UIImage+Rotation.m */
;
};
2906B5D71CD89246000849B4
/* ClientDetailsTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2906B5D61CD89246000849B4
/* ClientDetailsTableViewCell.m */
;
};
2928F7E71CD087FE0036D761
/* BaseViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2928F7E61CD087FE0036D761
/* BaseViewController.m */
;
};
2928F8321CD09E320036D761
/* Toolview.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2928F8311CD09E320036D761
/* Toolview.m */
;
};
...
...
@@ -114,6 +116,10 @@
04A14A271CE0FC5600DAD5F3
/* RightSubView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
RightSubView.m
;
sourceTree
=
"<group>"
;
};
04A14A291CE0FC7F00DAD5F3
/* FootSubView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FootSubView.h
;
sourceTree
=
"<group>"
;
};
04A14A2A1CE0FC7F00DAD5F3
/* FootSubView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FootSubView.m
;
sourceTree
=
"<group>"
;
};
04F004461CE4234600887E9D
/* ImageCropperView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
ImageCropperView.h
;
path
=
../../../../Desktop/ImageCropperView.h
;
sourceTree
=
"<group>"
;
};
04F004471CE4234600887E9D
/* ImageCropperView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
ImageCropperView.m
;
path
=
../../../../Desktop/ImageCropperView.m
;
sourceTree
=
"<group>"
;
};
04F004481CE4234600887E9D
/* UIImage+Rotation.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
"UIImage+Rotation.h"
;
path
=
"../../../../Desktop/UIImage+Rotation.h"
;
sourceTree
=
"<group>"
;
};
04F004491CE4234600887E9D
/* UIImage+Rotation.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
"UIImage+Rotation.m"
;
path
=
"../../../../Desktop/UIImage+Rotation.m"
;
sourceTree
=
"<group>"
;
};
18E6D8479D48A4650167EAF2
/* libPods.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libPods.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
2906B5D51CD89246000849B4
/* ClientDetailsTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ClientDetailsTableViewCell.h
;
sourceTree
=
"<group>"
;
};
2906B5D61CD89246000849B4
/* ClientDetailsTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ClientDetailsTableViewCell.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -342,6 +348,17 @@
name
=
views
;
sourceTree
=
"<group>"
;
};
04F004451CE4231C00887E9D
/* tools */
=
{
isa
=
PBXGroup
;
children
=
(
04F004461CE4234600887E9D
/* ImageCropperView.h */
,
04F004471CE4234600887E9D
/* ImageCropperView.m */
,
04F004481CE4234600887E9D
/* UIImage+Rotation.h */
,
04F004491CE4234600887E9D
/* UIImage+Rotation.m */
,
);
name
=
tools
;
sourceTree
=
"<group>"
;
};
2906B5D31CD8920F000849B4
/* Controller */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -737,6 +754,7 @@
29BB27691CD9DDF3009A0813
/* FollowHeartVC */
=
{
isa
=
PBXGroup
;
children
=
(
04F004451CE4231C00887E9D
/* tools */
,
0470D60E1CE292EF00647F0F
/* subView */
,
04A14A221CE0FB8400DAD5F3
/* views */
,
29BB276A1CD9DE74009A0813
/* FollowHeartViewController.h */
,
...
...
@@ -1097,6 +1115,7 @@
2998763F1CD9985B00C90D0A
/* AttachmentInformationTableViewCell.m in Sources */
,
293393551CD3379E000D997B
/* ShoppingTableViewCell.m in Sources */
,
29EAAE951CDC414C00C4DBA2
/* SeceneLibraryCollectionViewCell.m in Sources */
,
04F0044A1CE4234700887E9D
/* ImageCropperView.m in Sources */
,
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
,
29A938221CDADE4700F21E54
/* ProductDetailsTableViewCell.m in Sources */
,
2992493D1CDB3E8900786B1E
/* GenerateOrdersModifyTableViewCell.m in Sources */
,
...
...
@@ -1137,6 +1156,7 @@
29706DB21CD082990003C412
/* Lighting.xcdatamodeld in Sources */
,
29834EB91CDF1FB3001A484F
/* screeningFirstView.m in Sources */
,
299249401CDB4D1D00786B1E
/* AddaddressViewController.m in Sources */
,
04F0044B1CE4234700887E9D
/* UIImage+Rotation.m in Sources */
,
299249371CDB3C6500786B1E
/* GenerateOrdersViewController.m in Sources */
,
2992493A1CDB3E4500786B1E
/* GenerateOrdersTableViewCell.m in Sources */
,
2962D0811CD1E6010058829D
/* UIView+Frame.m in Sources */
,
...
...
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