Commit 6c952a8a authored by 曹云霄's avatar 曹云霄

正常进度

parent 7be88176
//
// ProductCollectionViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/5/4.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ProductCollectionViewCell : UICollectionViewCell
/**
* 产品图片
*/
@property (weak, nonatomic) IBOutlet UIImageView *productImageView;
/**
* 产品参数
*/
@property (weak, nonatomic) IBOutlet UILabel *productParameter;
/**
* 产品价格
*/
@property (weak, nonatomic) IBOutlet UILabel *productPrice;
/**
* 加入购物车
*/
@property (weak, nonatomic) IBOutlet UIButton *addShoppingbags;
@end
//
// ProductCollectionViewCell.m
// Lighting
//
// Created by 曹云霄 on 16/5/4.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ProductCollectionViewCell.h"
@implementation ProductCollectionViewCell
@end
//
// ProductDetailsViewController.h
// Lighting
//
// Created by 曹云霄 on 16/5/4.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface ProductDetailsViewController : BaseViewController
@end
//
// ProductDetailsViewController.m
// Lighting
//
// Created by 曹云霄 on 16/5/4.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ProductDetailsViewController.h"
@interface ProductDetailsViewController ()
@end
@implementation ProductDetailsViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (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
...@@ -10,4 +10,16 @@ ...@@ -10,4 +10,16 @@
@interface ProductLibraryViewController : BaseViewController @interface ProductLibraryViewController : BaseViewController
/**
* 产品列表
*/
@property (weak, nonatomic) IBOutlet UICollectionView *productCollectionView;
/**
* UICollectionViewFlowLayout
*/
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *productCollectionLayout;
@end @end
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
// //
#import "ProductLibraryViewController.h" #import "ProductLibraryViewController.h"
#import "ProductCollectionViewCell.h"
@interface ProductLibraryViewController () @interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
@end @end
...@@ -18,8 +19,79 @@ ...@@ -18,8 +19,79 @@
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor blueColor]; self.view.backgroundColor = [UIColor blueColor];
[self uiConfigAction];
} }
#pragma mark -布局
- (void)uiConfigAction
{
self.productCollectionLayout.itemSize = CGSizeMake((ScreenWidth-100)/3, (ScreenWidth-100)/3);
self.productCollectionLayout.sectionInset = UIEdgeInsetsMake(20, 30, 20, 30);
self.productCollectionLayout.minimumLineSpacing = 20;
self.productCollectionLayout.minimumInteritemSpacing = 20;
self.productCollectionView.dataSource = self;
self.productCollectionView.dataSource = self;
[self CreatescreeningButton];
}
#pragma mark -筛选按钮
- (void)CreatescreeningButton
{
UIButton *screeningbutton = [UIButton buttonWithType:UIButtonTypeSystem];
screeningbutton.frame = CGRectMake(ScreenWidth-100, ScreenHeight*6/10, 50, 50);
//阴影层
CALayer *layer = [CALayer layer];
layer.frame = CGRectMake(ScreenWidth-97.5, ScreenHeight*6/10+2.5, 45, 45);//保证layer的size比筛选按钮高宽都短5像素
layer.backgroundColor = [UIColor blackColor].CGColor;
layer.shadowOffset = CGSizeMake(0, 8);
layer.shadowOpacity = 0.7;
layer.cornerRadius = 25;
[self.view.layer addSublayer:layer];
//筛选按钮
screeningbutton.layer.masksToBounds = YES;
screeningbutton.layer.cornerRadius = 25;
[screeningbutton setTitle:@"筛选" forState:UIControlStateNormal];
screeningbutton.titleLabel.font = [UIFont systemFontOfSize:15];
[screeningbutton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[screeningbutton setTitleColor:kMainBlueColor forState:UIControlStateSelected];
screeningbutton.backgroundColor = kMainBlueColor;
[self.view addSubview:screeningbutton];
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ProductCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productcell" forIndexPath:indexPath];
return cell;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 20;
}
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB27761CD9DFBA009A0813 /* ProductLibraryViewController.m */; }; 29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB27761CD9DFBA009A0813 /* ProductLibraryViewController.m */; };
29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */; }; 29BB277D1CD9DFCB009A0813 /* CustomerManagementViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */; };
29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277F1CD9DFD7009A0813 /* AboutViewController.m */; }; 29BB27801CD9DFD7009A0813 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29BB277F1CD9DFD7009A0813 /* AboutViewController.m */; };
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */; };
29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */; };
745C665EA695DD3EC6271ADE /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDC80D439AC474587DD59064 /* libPods.a */; }; 745C665EA695DD3EC6271ADE /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDC80D439AC474587DD59064 /* libPods.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -128,6 +130,10 @@ ...@@ -128,6 +130,10 @@
29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomerManagementViewController.m; sourceTree = "<group>"; }; 29BB277C1CD9DFCB009A0813 /* CustomerManagementViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomerManagementViewController.m; sourceTree = "<group>"; };
29BB277E1CD9DFD7009A0813 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; }; 29BB277E1CD9DFD7009A0813 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = "<group>"; };
29BB277F1CD9DFD7009A0813 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; }; 29BB277F1CD9DFD7009A0813 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = "<group>"; };
29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductCollectionViewCell.h; sourceTree = "<group>"; };
29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductCollectionViewCell.m; sourceTree = "<group>"; };
29C584EB1CDA429500C6F677 /* ProductDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsViewController.h; sourceTree = "<group>"; };
29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProductDetailsViewController.m; sourceTree = "<group>"; };
CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; CA5ED00287EA4EE622158E3C /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; }; D537F80EFAB9298B3ADA241A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
DDC80D439AC474587DD59064 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; DDC80D439AC474587DD59064 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -509,8 +515,8 @@ ...@@ -509,8 +515,8 @@
29BB276E1CD9DEDA009A0813 /* ProductLibraryVC */ = { 29BB276E1CD9DEDA009A0813 /* ProductLibraryVC */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
29BB27751CD9DFBA009A0813 /* ProductLibraryViewController.h */, 29C584E61CDA247500C6F677 /* view */,
29BB27761CD9DFBA009A0813 /* ProductLibraryViewController.m */, 29C584E51CDA246900C6F677 /* controller */,
); );
name = ProductLibraryVC; name = ProductLibraryVC;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -533,6 +539,26 @@ ...@@ -533,6 +539,26 @@
name = AboutVC; name = AboutVC;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
29C584E51CDA246900C6F677 /* controller */ = {
isa = PBXGroup;
children = (
29BB27751CD9DFBA009A0813 /* ProductLibraryViewController.h */,
29BB27761CD9DFBA009A0813 /* ProductLibraryViewController.m */,
29C584EB1CDA429500C6F677 /* ProductDetailsViewController.h */,
29C584EC1CDA429500C6F677 /* ProductDetailsViewController.m */,
);
name = controller;
sourceTree = "<group>";
};
29C584E61CDA247500C6F677 /* view */ = {
isa = PBXGroup;
children = (
29C584E71CDA249200C6F677 /* ProductCollectionViewCell.h */,
29C584E81CDA249200C6F677 /* ProductCollectionViewCell.m */,
);
name = view;
sourceTree = "<group>";
};
4333C4B25549A396FC0CD944 /* Frameworks */ = { 4333C4B25549A396FC0CD944 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -692,6 +718,7 @@ ...@@ -692,6 +718,7 @@
29BB27681CD9D38E009A0813 /* AllpriceTableViewCell.m in Sources */, 29BB27681CD9D38E009A0813 /* AllpriceTableViewCell.m in Sources */,
29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */, 29BB27771CD9DFBA009A0813 /* ProductLibraryViewController.m in Sources */,
2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */, 2933934F1CD3158B000D997B /* instructionsLabe.m in Sources */,
29C584E91CDA249300C6F677 /* ProductCollectionViewCell.m in Sources */,
299876361CD997F100C90D0A /* PersonInformationTableViewCell.m in Sources */, 299876361CD997F100C90D0A /* PersonInformationTableViewCell.m in Sources */,
2962D0711CD1A58B0058829D /* RightViewController.m in Sources */, 2962D0711CD1A58B0058829D /* RightViewController.m in Sources */,
29706DA91CD082990003C412 /* AppDelegate.m in Sources */, 29706DA91CD082990003C412 /* AppDelegate.m in Sources */,
...@@ -702,6 +729,7 @@ ...@@ -702,6 +729,7 @@
2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */, 2949BABD1CD2EFA00049385A /* InformationTableViewCell.m in Sources */,
29706DB21CD082990003C412 /* Lighting.xcdatamodeld in Sources */, 29706DB21CD082990003C412 /* Lighting.xcdatamodeld in Sources */,
2962D0811CD1E6010058829D /* UIView+Frame.m in Sources */, 2962D0811CD1E6010058829D /* UIView+Frame.m in Sources */,
29C584ED1CDA429500C6F677 /* ProductDetailsViewController.m in Sources */,
0447085E1CD7C06B00555827 /* LoginViewController.m in Sources */, 0447085E1CD7C06B00555827 /* LoginViewController.m in Sources */,
2928F83B1CD0A0CE0036D761 /* CustomTabbarController.m in Sources */, 2928F83B1CD0A0CE0036D761 /* CustomTabbarController.m in Sources */,
044708611CD7C1E800555827 /* MainSetViewController.m in Sources */, 044708611CD7C1E800555827 /* MainSetViewController.m in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment