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
0029765a
Commit
0029765a
authored
Jul 13, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化场景库图片下标误差
parent
6a4e5533
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
43 deletions
+11
-43
FullScreenViewController.h
Lighting/Class/FullScreen/FullScreenViewController.h
+1
-2
FullScreenViewController.m
Lighting/Class/FullScreen/FullScreenViewController.m
+8
-37
ProductDetailsViewController.m
...roductLibraryVC/Controller/ProductDetailsViewController.m
+1
-1
SceneLibraryViewController.h
...VC/SceneLibraryVC/Controller/SceneLibraryViewController.h
+0
-2
SceneLibraryViewController.m
...VC/SceneLibraryVC/Controller/SceneLibraryViewController.m
+1
-1
No files found.
Lighting/Class/FullScreen/FullScreenViewController.h
View file @
0029765a
...
...
@@ -23,11 +23,10 @@
@property
(
nonatomic
,
assign
)
BOOL
isProductLibrary
;
/**
* 应该现在的下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
current
i
ndex
;
@property
(
nonatomic
,
assign
)
NSInteger
current
I
ndex
;
@end
Lighting/Class/FullScreen/FullScreenViewController.m
View file @
0029765a
...
...
@@ -23,10 +23,6 @@
*/
@property
(
nonatomic
,
strong
)
UIButton
*
backButton
;
/**
* 保存当前下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
currentIndex
;
@end
...
...
@@ -34,8 +30,6 @@
static
NSString
*
const
reuseIdentifier
=
@"Cell"
;
#pragma mark -初始化
-
(
instancetype
)
init
{
...
...
@@ -52,8 +46,6 @@ static NSString * const reuseIdentifier = @"Cell";
return
[
super
initWithCollectionViewLayout
:
layout
];
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
...
...
@@ -61,18 +53,15 @@ static NSString * const reuseIdentifier = @"Cell";
[
self
CreateBackView
];
}
#pragma amrk 返回View
-
(
void
)
CreateBackView
{
//产品列表调用
if
(
self
.
isProductLibrary
)
{
self
.
backButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
backButton
.
frame
=
CGRectMake
(
30
,
10
,
100
,
64
);
[
self
.
backButton
setImage
:
TCImage
(
@"2-副本"
)
forState
:
UIControlStateNormal
];
[
self
.
backButton
addTarget
:
self
action
:
@selector
(
B
ackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backButton
addTarget
:
self
action
:
@selector
(
b
ackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
backButton
];
}
else
//场景列表调用
...
...
@@ -84,7 +73,7 @@ static NSString * const reuseIdentifier = @"Cell";
UIButton
*
backButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backButton
.
frame
=
CGRectMake
(
30
,
0
,
100
,
64
);
[
backButton
setImage
:
TCImage
(
@"quanping"
)
forState
:
UIControlStateNormal
];
[
backButton
addTarget
:
self
action
:
@selector
(
B
ackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
backButton
addTarget
:
self
action
:
@selector
(
b
ackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backView
addSubview
:
backButton
];
//体验中心
...
...
@@ -95,31 +84,24 @@ static NSString * const reuseIdentifier = @"Cell";
tiYanCenterButton
.
layer
.
borderWidth
=
1
;
tiYanCenterButton
.
layer
.
borderColor
=
[
UIColor
whiteColor
].
CGColor
;
[
tiYanCenterButton
setTitle
:
@"体验中心"
forState
:
UIControlStateNormal
];
[
tiYanCenterButton
addTarget
:
self
action
:
@selector
(
G
otoTiYanCenterButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
tiYanCenterButton
addTarget
:
self
action
:
@selector
(
g
otoTiYanCenterButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backView
addSubview
:
tiYanCenterButton
];
}
[
self
.
collectionView
setContentOffset
:
CGPointMake
(
ScreenWidth
*
self
.
current
i
ndex
,
0
)];
[
self
.
collectionView
setContentOffset
:
CGPointMake
(
ScreenWidth
*
self
.
current
I
ndex
,
0
)];
}
#pragma mark -返回
-
(
void
)
B
ackButtonClick
-
(
void
)
b
ackButtonClick
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark -体验中心
-
(
void
)
G
otoTiYanCenterButtonClick
-
(
void
)
g
otoTiYanCenterButtonClick
{
ExperienceCentreViewController
*
ExperienceCenter
=
[[
BaseViewController
getMainStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"ExperienceCentre"
];
TOSceneEntity
*
sceneModel
=
[
self
.
datasArray
objectAtIndex_opple
:
self
.
currentIndex
];
SceneListModel
*
model
=
[[
SceneListModel
alloc
]
init
];
model
.
fid
=
sceneModel
.
fid
;
model
.
sceneCode
=
sceneModel
.
sceneCode
;
model
.
name
=
sceneModel
.
name
;
model
.
pricure
=
sceneModel
.
pricure
;
model
.
category
=
sceneModel
.
category
;
model
.
style
=
sceneModel
.
style
;
model
.
space
=
sceneModel
.
space
;
SceneListModel
*
model
=
[[
SceneListModel
alloc
]
initWithDictionary
:[
sceneModel
toDictionary
]
error
:
nil
];
model
.
isSelectedSate
=
YES
;
[
ExperienceCenter
.
sceneDatasArray
addObject
:
model
];
ExperienceCenter
.
boolValue
=
YES
;
...
...
@@ -167,43 +149,32 @@ static NSString * const reuseIdentifier = @"Cell";
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
self
.
isProductLibrary
)
{
if
(
self
.
backButton
.
frame
.
origin
.
y
==
10
)
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
CGRect
frame
=
self
.
backButton
.
frame
;
frame
.
origin
.
y
=
-
64
;
self
.
backButton
.
frame
=
frame
;
}];
}
else
if
(
self
.
backButton
.
frame
.
origin
.
y
==
-
64
)
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
CGRect
frame
=
self
.
backButton
.
frame
;
frame
.
origin
.
y
=
10
;
self
.
backButton
.
frame
=
frame
;
}];
}
}
else
{
}
else
{
if
(
self
.
backView
.
frame
.
origin
.
y
==
0
)
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
CGRect
frame
=
self
.
backView
.
frame
;
frame
.
origin
.
y
=
-
64
;
self
.
backView
.
frame
=
frame
;
}];
}
else
if
(
self
.
backView
.
frame
.
origin
.
y
==
-
64
)
{
[
UIView
animateWithDuration
:
0
.
3
animations
:
^
{
CGRect
frame
=
self
.
backView
.
frame
;
frame
.
origin
.
y
=
0
;
self
.
backView
.
frame
=
frame
;
...
...
Lighting/Class/RIghtVC/ProductLibraryVC/Controller/ProductDetailsViewController.m
View file @
0029765a
...
...
@@ -181,7 +181,7 @@
FullScreenViewController
*
fullScreenVC
=
[[
FullScreenViewController
alloc
]
init
];
fullScreenVC
.
datasArray
=
self
.
imagesArray
;
fullScreenVC
.
isProductLibrary
=
YES
;
fullScreenVC
.
current
i
ndex
=
self
.
imageIndex
;
fullScreenVC
.
current
I
ndex
=
self
.
imageIndex
;
[
self
presentViewController
:
fullScreenVC
animated
:
YES
completion
:
nil
];
}
...
...
Lighting/Class/RIghtVC/SceneLibraryVC/Controller/SceneLibraryViewController.h
View file @
0029765a
...
...
@@ -22,7 +22,6 @@
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
accordingStyle
;
/**
* 背景View
*/
...
...
@@ -33,7 +32,6 @@
*/
@property
(
strong
,
nonatomic
)
ScreeningButton
*
styleButton
;
/**
* 房型按钮
*/
...
...
Lighting/Class/RIghtVC/SceneLibraryVC/Controller/SceneLibraryViewController.m
View file @
0029765a
...
...
@@ -176,7 +176,7 @@
{
FullScreenViewController
*
fullScreenVC
=
[[
FullScreenViewController
alloc
]
init
];
fullScreenVC
.
datasArray
=
self
.
responseArray
;
fullScreenVC
.
current
i
ndex
=
indexPath
.
row
;
fullScreenVC
.
current
I
ndex
=
indexPath
.
row
;
[
self
presentViewController
:
fullScreenVC
animated
:
YES
completion
:
nil
];
}
...
...
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