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
92a4b538
Commit
92a4b538
authored
May 19, 2016
by
ZCJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
ff5c95b0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
303 additions
and
102 deletions
+303
-102
FollowHeartViewController.h
Lighting/Class/FollowHeartViewController.h
+5
-3
FollowHeartViewController.m
Lighting/Class/FollowHeartViewController.m
+4
-1
ProductLibraryView.h
Lighting/Class/ProductLibraryView.h
+12
-0
ProductLibraryView.m
Lighting/Class/ProductLibraryView.m
+154
-0
SeceneCollectionPictureCell.h
Lighting/Class/SeceneCollectionPictureCell.h
+1
-0
SeceneCollectionPictureCell.m
Lighting/Class/SeceneCollectionPictureCell.m
+8
-1
SeceneLibraryView.h
Lighting/Class/SeceneLibraryView.h
+8
-1
SeceneLibraryView.m
Lighting/Class/SeceneLibraryView.m
+104
-89
Podfile.lock
Lighting/Podfile.lock
+6
-6
podfile
Lighting/podfile
+1
-1
No files found.
Lighting/Class/FollowHeartViewController.h
View file @
92a4b538
...
...
@@ -28,8 +28,10 @@
@property
(
nonatomic
,
strong
)
FootSubView
*
footSubView
;
@property
(
nonatomic
,
strong
)
SeceneLibraryView
*
seceneLibraryView
;
@property
(
nonatomic
,
strong
)
ProductLibraryView
*
productLibraryView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
zoomButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
temporaryBtn
;
@property
(
nonatomic
,
strong
)
UIImageView
*
backGroundImageView
;
@property
(
nonatomic
,
strong
)
UIButton
*
zoomButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
temporaryBtn
;
@end
Lighting/Class/FollowHeartViewController.m
View file @
92a4b538
...
...
@@ -158,6 +158,7 @@
//添加场景
-
(
void
)
addSceneLibraryView
{
self
.
seceneLibraryView
=
[[
SeceneLibraryView
alloc
]
init
];
self
.
seceneLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
seceneLibraryView
.
delegate
=
self
;
...
...
@@ -167,7 +168,7 @@
-
(
void
)
addProductLibraryView
{
self
.
productLibraryView
=
[[
ProductLibraryView
alloc
]
init
];
self
.
productLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
productLibraryView
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
productLibraryView
.
delegate
=
self
;
[
self
.
view
addSubview
:
self
.
productLibraryView
.
view
];
}
...
...
@@ -176,6 +177,8 @@
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
...
...
Lighting/Class/ProductLibraryView.h
View file @
92a4b538
...
...
@@ -33,4 +33,16 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array2
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
array3
;
@property
(
nonatomic
,
strong
)
UICollectionView
*
collectionView
;
/**
* 筛选数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
screeningDatas
;
/**
* 商品数据源对象
*/
@property
(
nonatomic
,
strong
)
GoodsResponse
*
datasArray
;
/**
* 商品iD
*/
@property
(
nonatomic
,
copy
)
NSString
*
goodsID
;
@end
Lighting/Class/ProductLibraryView.m
View file @
92a4b538
...
...
@@ -11,9 +11,21 @@
@implementation
ProductLibraryView
-
(
void
)
viewDidLoad
{
[
self
initdata
];
[
self
getScreeningdatas
];
[
self
initSubView
];
}
/**
* 初始化筛选数据源
*/
-
(
NSMutableArray
*
)
screeningDatas
{
if
(
_screeningDatas
==
nil
)
{
_screeningDatas
=
[
NSMutableArray
array
];
}
return
_screeningDatas
;
}
//- (instancetype)initWithFrame:(CGRect)frame
//{
...
...
@@ -32,7 +44,146 @@
self
.
array3
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"田园"
,
@"宫廷"
,
@"乡村"
,
@"日式风格"
,
@"欧式风格"
,
@"混搭风格"
,
@"现代简约"
,
nil
];
self
.
arrayData
=
self
.
array3
;
}
//#pragma mark -热门搜索
//- (void)setSelectedCode:(NSString *)selectedCode
//{
// _selectedCode = selectedCode;
// //默认数据
// GoodsCondition *conditon = [[GoodsCondition alloc]init];
// //分页数据
// DataPage *Newpage = [[DataPage alloc]init];
// Newpage.page = 0;
// conditon.page = Newpage;
// conditon.categoryEquals = _selectedCode;
//
// __weak typeof(self)weakSelf = self;
// [self getGoodsListdatas:conditon returnResponse:^(GoodsResponse *response) {
//
// if (response.goodsEntity.count == 0) {
//
// [self ErrorMBProgressView:@"暂无数据"];
// }else
// {
// weakSelf.datasArray = response;
// [weakSelf.productCollectionView reloadData];
// }
// }];
//
//}
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListDatas
{
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
0
;
conditon
.
page
=
Newpage
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
if
(
response
.
goodsEntity
.
count
==
0
)
{
[
self
ErrorMBProgressView
:
@"暂无数据"
];
}
else
{
weakSelf
.
datasArray
=
response
;
// [weakSelf.productCollectionView reloadData];
}
}];
}
#pragma mark -获取产品筛选数据
-
(
void
)
getScreeningdatas
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/getGoodsFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
space
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
material
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
price
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"%@"
,
error
);
}];
}
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListdatas
:
(
GoodsCondition
*
)
conditon
returnResponse
:
(
void
(
^
)(
GoodsResponse
*
))
finish
{
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
GoodsResponse
*
sponse
=
[[
GoodsResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
//返回结果
finish
(
sponse
);
}
else
{
[
self
ErrorMBProgressView
:
@"暂无数据"
];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
//#pragma mark -获取商品详情
//- (void)getGoodsListDetails
//
//{
// [self CreateMBProgressHUDLoding];
// NSString *url = [NSString stringWithFormat:@"%@%@%@",ServerAddress,@"/goods/getGoods/",_goodsID];
// [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:url WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
//
// [self RemoveMBProgressHUDLoding];
// if ([returnValue[@"code"] isEqualToNumber:@0]) {
//
// self.entity = [[TOGoodsEntity alloc]initWithDictionary:returnValue[@"data"] error:nil];
// [self HeaderViewAssignment];
// [self.productDetilsTableview reloadData];
// }
// else
// {
// [self ErrorMBProgressView:returnValue[@"message"]];
// }
//
//
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
//
// } WithFailureBlock:^(id error) {
//
// [self RemoveMBProgressHUDLoding];
// NSLog(@"%@",error);
// }];
//}
-
(
void
)
initSubView
{
for
(
int
i
=
0
;
i
<
self
.
nameData
.
count
;
i
++
)
{
...
...
@@ -61,6 +212,8 @@
tap
.
cancelsTouchesInView
=
NO
;
[[
UIApplication
sharedApplication
].
keyWindow
addGestureRecognizer
:
tap
];
[
self
initSubViews
];
[
self
getGoodsListDatas
];
}
...
...
@@ -95,6 +248,7 @@
[
self
.
collectionView
registerClass
:[
ProductCollectionPictureCell
class
]
forCellWithReuseIdentifier
:
@"UICollectionViewCell"
];
[
self
.
subView
addSubview
:
self
.
collectionView
];
}
-
(
void
)
selectedType
:
(
UIButton
*
)
sender
{
...
...
Lighting/Class/SeceneCollectionPictureCell.h
View file @
92a4b538
...
...
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface
SeceneCollectionPictureCell
:
UICollectionViewCell
@property
(
nonatomic
,
strong
)
TOSceneEntity
*
model
;
@property
(
strong
,
nonatomic
)
UIImageView
*
imageView
;
@end
Lighting/Class/SeceneCollectionPictureCell.m
View file @
92a4b538
...
...
@@ -13,9 +13,16 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
self
.
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
frame
.
size
.
width
,
frame
.
size
.
height
)];
self
.
imageView
.
image
=
[
UIImage
imageNamed
:
@"backView"
];
[
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
View file @
92a4b538
...
...
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#import "SeceneCollectionPictureCell.h"
#import "screeningButton.h"
@protocol
AddSecenePicturedelegate
<
NSObject
>
@required
...
...
@@ -27,9 +28,15 @@ UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
@property
(
nonatomic
,
strong
)
UIButton
*
kongJianBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
fengGeBtn
;
@property
(
nonatomic
,
strong
)
UIButton
*
leiXingBtn
;
@property
(
nonatomic
,
strong
)
NS
Mutable
Array
*
arrayData
;
@property
(
nonatomic
,
strong
)
NSArray
*
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
;
//房型按钮
@end
Lighting/Class/SeceneLibraryView.m
View file @
92a4b538
...
...
@@ -14,128 +14,128 @@
@implementation
SeceneLibraryView
-
(
void
)
viewDidLoad
{
[
self
initdata
];
[
self
initView
];
[
self
initdata
];
[
self
getdatasAction
];
[
self
initView
];
}
-
(
void
)
initdata
{
self
.
arrayData
=
[[
NSArray
alloc
]
init
];
}
#pragma mark -获取场景筛选数据
-
(
void
)
getdatasAction
{
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/scene/getSceneFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
filter
=
[[
SceneFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
self
.
arrayData
=
self
.
filter
.
styles
;
[
self
.
seceneTableView
reloadData
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
//- (instancetype)initWithFrame:(CGRect)frame
//{
// if (self = [super initWithFrame:frame]) {
// [self initdata];
// [self initView];
// }
// return self;
//}
//#pragma mark -获取场景筛选数据
//- (void)getdatasAction
//{
//
// [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/getSceneFilter"] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
//
// if ([returnValue[@"code"] isEqualToNumber:@0]) {
//
// self.filter = [[SceneFilter alloc]initWithDictionary:returnValue[@"data"] error:nil];
//
// }
// else
// {
// [self ErrorMBProgressView:returnValue[@"message"]];
// }
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
// } WithFailureBlock:^(id error) {
//
// }];
//}
//
//
//#pragma mark -获取场景列表数据
//- (void)getSceneLibrarydatas:(SceneCondition *)condition
//{
// [self CreateMBProgressHUDLoding];
// [[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/scene/query"] WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
//
//
// [self RemoveMBProgressHUDLoding];
// if ([returnValue[@"code"] isEqualToNumber:@0]) {
//
// self.response = [[SceneResponse alloc]initWithDictionary:returnValue[@"data"] error:nil];
// [self.seceneLibararyCollectionView reloadData];
// }
// else
// {
// [self ErrorMBProgressView:returnValue[@"message"]];
// }
//
// } WithErrorCodeBlock:^(id errorCodeValue) {
//
// } WithFailureBlock:^(id error) {
//
// [self RemoveMBProgressHUDLoding];
// }];
//}
-
(
void
)
initdata
#pragma mark -获取场景列表数据
-
(
void
)
getSceneLibrarydatas
:
(
SceneCondition
*
)
condition
{
self
.
arrayData
=
[[
NSMutableArray
alloc
]
init
];
self
.
array1
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"玄关"
,
@"客厅"
,
@"餐厅"
,
@"主卧室"
,
@"次卧室"
,
@"书房"
,
@"儿童房"
,
@"过厅"
,
@"过道"
,
@"厨房"
,
@"卫生间"
,
@"休闲空间"
,
nil
];
self
.
array2
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"现代简约"
,
@"欧式古典"
,
@"新古典"
,
@"中式"
,
@"新中式"
,
@"混搭"
,
@"小美式风格"
,
@"古典美式风格"
,
@"地中海"
,
@"东南亚"
,
@"日式"
,
@"法式"
,
nil
];
self
.
array3
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"田园"
,
@"宫廷"
,
@"乡村"
,
@"日式风格"
,
@"欧式风格"
,
@"混搭风格"
,
@"现代简约"
,
nil
];
self
.
arrayData
=
self
.
array1
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/scene/query"
]
WithRequestType
:
0
WithParameter
:
condition
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
response
=
[[
SceneResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
collectionView
reloadData
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
-
(
void
)
initView
{
// 空间
// 空间
self
.
kongJianBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
kongJianBtn
.
frame
=
CGRectMake
(
ScreenWidth
-
250
,
52
,
100
,
46
)
;
self
.
kongJianBtn
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
kongJianBtn
setTitle
:
@"空间 "
forState
:
UIControlStateNormal
];
[
self
.
kongJianBtn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
self
.
kongJianBtn
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
60
,
0
,
0
);
self
.
kongJianBtn
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
60
,
0
,
0
);
[
self
.
kongJianBtn
addTarget
:
self
action
:
@selector
(
selectedType
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
kongJianBtn
.
tag
=
101
;
self
.
kongJianBtn
.
layer
.
masksToBounds
=
YES
;
self
.
kongJianBtn
.
layer
.
cornerRadius
=
15
;
[
self
.
view
addSubview
:
self
.
kongJianBtn
];
// 风格
// 风格
self
.
fengGeBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
fengGeBtn
.
frame
=
CGRectMake
(
ScreenWidth
-
250
,
102
,
100
,
46
)
;
self
.
fengGeBtn
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
fengGeBtn
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
fengGeBtn
setTitle
:
@"风格 "
forState
:
UIControlStateNormal
];
[
self
.
fengGeBtn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
self
.
fengGeBtn
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
60
,
0
,
0
);
[
self
.
fengGeBtn
addTarget
:
self
action
:
@selector
(
selectedType
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
fengGeBtn
.
tag
=
102
;
self
.
fengGeBtn
.
layer
.
masksToBounds
=
YES
;
self
.
fengGeBtn
.
layer
.
cornerRadius
=
15
;
[
self
.
view
addSubview
:
self
.
fengGeBtn
];
//类型
self
.
leiXingBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
leiXingBtn
.
frame
=
CGRectMake
(
ScreenWidth
-
250
,
152
,
100
,
46
)
;
self
.
leiXingBtn
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
leiXingBtn
setTitle
:
@"类型 "
forState
:
UIControlStateNormal
];
[
self
.
leiXingBtn
setTitleColor
:[
UIColor
blackColor
]
forState
:
UIControlStateNormal
];
self
.
leiXingBtn
.
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
60
,
0
,
0
);
[
self
.
leiXingBtn
addTarget
:
self
action
:
@selector
(
selectedType
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
leiXingBtn
.
tag
=
103
;
self
.
leiXingBtn
.
layer
.
masksToBounds
=
YES
;
self
.
leiXingBtn
.
layer
.
cornerRadius
=
15
;
[
self
.
view
addSubview
:
self
.
leiXingBtn
];
//
//
类型
//
self.leiXingBtn=[UIButton buttonWithType:UIButtonTypeCustom];
//
self.leiXingBtn.frame=CGRectMake(ScreenWidth-250, 152, 100, 46) ;
//
self.leiXingBtn.backgroundColor=[UIColor whiteColor];
//
[self.leiXingBtn setTitle:@"类型 " forState:UIControlStateNormal];
//
[self.leiXingBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//
self.leiXingBtn.contentEdgeInsets = UIEdgeInsetsMake(0, 60, 0, 0);
//
[self.leiXingBtn addTarget:self action:@selector(selectedType:) forControlEvents:UIControlEventTouchUpInside];
//
self.leiXingBtn.tag=103;
//
self.leiXingBtn.layer.masksToBounds = YES;
//
self.leiXingBtn.layer.cornerRadius = 15;
//
[self.view addSubview:self.leiXingBtn];
self
.
subView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
100
,
50
,
ScreenWidth
-
300
,
ScreenHeight
-
200
)];
self
.
subView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
100
,
50
,
ScreenWidth
-
300
,
ScreenHeight
-
200
)];
self
.
subView
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
self
.
subView
];
//点击手势
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
DismissScreenView
:
)];
tap
.
delegate
=
self
;
tap
.
cancelsTouchesInView
=
NO
;
[[
UIApplication
sharedApplication
].
keyWindow
addGestureRecognizer
:
tap
];
[
self
initSubViews
];
//默认数据
SceneCondition
*
condition
=
[[
SceneCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
condition
.
page
=
page
;
[
self
getSceneLibrarydatas
:
condition
];
}
-
(
void
)
initSubViews
{
...
...
@@ -173,11 +173,11 @@
switch
(
sender
.
tag
)
{
case
101
:
// 空间
self
.
arrayData
=
self
.
array1
;
self
.
arrayData
=
self
.
filter
.
space
;
;
break
;
case
102
:
// 风格
self
.
arrayData
=
self
.
array2
;
self
.
arrayData
=
self
.
filter
.
styles
;
;
break
;
case
103
:
// 类型
...
...
@@ -192,7 +192,17 @@
//定义展示的Section的个数
-
(
NSInteger
)
numberOfSectionsInCollectionView
:
(
UICollectionView
*
)
collectionView
{
return
10
;
if
(
self
.
response
.
list
.
count
/
3
==
0
&&
self
.
response
.
list
.
count
%
3
!=
0
)
{
return
1
;
}
else
{
if
(
self
.
response
.
list
.
count
%
3
==
0
)
{
return
self
.
response
.
list
.
count
/
3
;
}
else
{
return
self
.
response
.
list
.
count
/
3
+
1
;
}
}
}
//定义展示的UICollectionViewCell的个数
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
...
...
@@ -205,7 +215,7 @@
{
static
NSString
*
CellIdentifier
=
@"UICollectionViewCell"
;
SeceneCollectionPictureCell
*
cell
=
(
SeceneCollectionPictureCell
*
)[
collectionView
dequeueReusableCellWithReuseIdentifier
:
CellIdentifier
forIndexPath
:
indexPath
];
cell
.
model
=
[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
];
return
cell
;
}
...
...
@@ -268,7 +278,7 @@
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
cell
.
textLabel
.
text
=
[
self
.
arrayData
objectAtIndex
:
indexPath
.
row
];
cell
.
textLabel
.
text
=
[
[
self
.
arrayData
objectAtIndex_opple
:
indexPath
.
row
]
typename
];
return
cell
;
...
...
@@ -276,7 +286,12 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//选择数据
SceneCondition
*
condition
=
[[
SceneCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
condition
.
page
=
page
;
[
self
getSceneLibrarydatas
:
condition
];
}
...
...
Lighting/Podfile.lock
View file @
92a4b538
...
...
@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- IQKeyboardManager (4.0.
3
)
- IQKeyboardManager (4.0.
2
)
- JSONModel (1.2.0)
- Masonry (0.6.4)
- MBProgressHUD (0.9.2)
...
...
@@ -32,9 +32,9 @@ PODS:
- MMDrawerController/Core
- MMDrawerController/Subclass (0.6.0):
- MMDrawerController/Core
- SDWebImage (3.7.
6
):
- SDWebImage/Core (= 3.7.
6
)
- SDWebImage/Core (3.7.
6
)
- SDWebImage (3.7.
5
):
- SDWebImage/Core (= 3.7.
5
)
- SDWebImage/Core (3.7.
5
)
- SVProgressHUD (2.0.3)
DEPENDENCIES:
...
...
@@ -51,14 +51,14 @@ DEPENDENCIES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
IQKeyboardManager:
be9695ffc5a52077deb4847608f338771022d6d1
IQKeyboardManager:
2341089c4ae25fa2fa82ce356a259fcd267dc6b6
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
Masonry: 281802d04d787ea2973179ee8bcb50500579ede2
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4
MMDrawerController: e3a54a5570388463ad3b36975251575b50c4e1a0
SDWebImage:
c325cf02c30337336b95beff20a13df489ec0ec9
SDWebImage:
69c6303e3348fba97e03f65d65d4fbc26740f461
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
COCOAPODS: 0.39.0
Lighting/podfile
View file @
92a4b538
platform
:ios
,
'9.0'
pod
'MBProgressHUD'
,
'~> 0.9.2'
pod
'SVProgressHUD'
,
'~> 2.0.3'
pod
'IQKeyboardManager'
,
'~> 4.0.0
'
pod
'IQKeyboardManager'
,
'~> 4.0.0
’
pod '
MMDrawerController
', '
~>
0.6
.
0
'
pod '
MJExtension
', '
~>
3.0
.
10
'
pod '
Masonry
', '
~>
0.6
.
4
'
...
...
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