Commit c8c2a756 authored by 曹云霄's avatar 曹云霄

caoyunxiao

parent 6f2dbf49
......@@ -83,6 +83,9 @@
- (IBAction)LoginButtonClick:(UIButton *)sender {
[self SetTheRootViewController];
return;
if (self.userName.text.length == 0) {
[self ErrorMBProgressView:@"用户名不能为空"];
......
......@@ -14,7 +14,7 @@
#import "screeningSecondView.h"
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate>
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate,TableviewSelectedIndexdelegate>
/**
* 筛选背景框View
......@@ -61,7 +61,7 @@
[self uiConfigAction];
[self getScreeningdatas];
[self getGoodsListdatas];
}
......@@ -99,6 +99,36 @@
#pragma mark -获取商品列表数据
- (void)getGoodsListdatas
{
GoodsCondition *conditon = [[GoodsCondition alloc]init];
conditon.page = 0;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/query"] WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) {
NSLog(@"%@",returnValue);
}
else
{
// [self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
} WithFailureBlock:^(id error) {
}];
}
/*
{
code = 0;
......@@ -302,9 +332,6 @@
}
}
#pragma mark -创建分类View
- (void)CreateClassificationView
{
......@@ -321,6 +348,8 @@
{
self.screenSecondView = [[[NSBundle mainBundle] loadNibNamed:@"screeningSecondView" owner:self options:nil] firstObject];
self.screenSecondView.frame = CGRectMake(0, 50, 470, 310);
self.screenSecondView.delegate = self;
self.screenSecondView.datasArray = [self.screeningDatas firstObject];
[self.screenView.backgroundView addSubview:self.screenSecondView];
}
......@@ -338,15 +367,18 @@
//筛选
else if (self.screenView.sortingSegmented.selectedSegmentIndex == 1)
{
self.screenSecondView.datasArray = [self.screeningDatas objectAtIndex_opple:buttontag];
}
}
#pragma mark -筛选子模块的
- (void)tableSelectedindex:(NSInteger)index
{
[self screeningButtonClick:index];
self.screenView.indexselected = index;
}
......
......@@ -37,8 +37,7 @@
#pragma mark -获取场景筛选数据
- (void)getdatasAction
{
......
//
// ScreeningSecondCollectionReusableView.h
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ScreeningSecondCollectionReusableView : UICollectionReusableView
/**
* 区头按钮
*/
@property (nonatomic,strong) UIButton *alltitleButton;
@end
//
// ScreeningSecondCollectionReusableView.m
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ScreeningSecondCollectionReusableView.h"
#define WIDTH self.frame.size.width
@implementation ScreeningSecondCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame]) {
[self uiConfigAction];
}
return self;
}
#pragma mark -UI
- (void)uiConfigAction
{
self.alltitleButton = [UIButton buttonWithType:UIButtonTypeSystem];
self.alltitleButton.layer.masksToBounds = YES;
self.alltitleButton.layer.cornerRadius = kCornerRadius;
[self.alltitleButton setTitle:@"全部" forState:UIControlStateNormal];
[self addSubview:self.alltitleButton];
self.alltitleButton.titleLabel.font = [UIFont systemFontOfSize:12];
[self.alltitleButton setBackgroundColor:kMainBlueColor];
[self.alltitleButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[self.alltitleButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake((WIDTH-127)/3, 35));
make.right.equalTo(self.mas_right).offset(-30);
make.top.equalTo(self.mas_top).offset(20);
}];
}
@end
......@@ -75,7 +75,10 @@
/**
* 选中按钮(其他设为未选中状态)
*/
@property (nonatomic,assign) NSInteger indexselected;
......
......@@ -110,8 +110,15 @@
}
#pragma mark -切换按钮的选中状态
- (void)setIndexselected:(NSInteger)indexselected
{
_indexselected = indexselected;
UIButton *buttonn = [self viewWithTag:100+indexselected];
[self RemoveAllButtonisSelected];
buttonn.selected = YES;
buttonn.backgroundColor = kMainBlueColor;
}
......
......@@ -15,7 +15,7 @@
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" tag="103" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Esb-9t-cje">
<rect key="frame" x="417" y="220" width="103" height="40"/>
<rect key="frame" x="417" y="218" width="103" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -31,7 +31,7 @@
</connections>
</button>
<button opaque="NO" tag="102" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="RRm-6s-AXb">
<rect key="frame" x="417" y="170" width="103" height="40"/>
<rect key="frame" x="417" y="163" width="103" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -47,7 +47,7 @@
</connections>
</button>
<button opaque="NO" tag="101" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Kwt-CY-h6v">
<rect key="frame" x="417" y="120" width="103" height="40"/>
<rect key="frame" x="417" y="108" width="103" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -63,7 +63,7 @@
</connections>
</button>
<button opaque="NO" tag="100" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="RPo-A8-JIT">
<rect key="frame" x="417" y="70" width="103" height="40"/>
<rect key="frame" x="417" y="53" width="103" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.90588235289999997" blue="0.90588235289999997" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -79,7 +79,7 @@
</connections>
</button>
<button opaque="NO" tag="104" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Orb-R1-ono">
<rect key="frame" x="417" y="270" width="103" height="40"/>
<rect key="frame" x="417" y="273" width="103" height="50"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.90588235294117647" green="0.90588235294117647" blue="0.90588235294117647" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
......@@ -124,14 +124,14 @@
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="iPadPro"/>
<connections>
<outlet property="backgroundView" destination="vsr-7f-kMN" id="zyu-wf-duf"/>
<outlet property="materialButton" destination="Esb-9t-cje" id="ZUu-Ry-ZGK"/>
<outlet property="shadowView" destination="440-zZ-HE8" id="R1E-o9-kaR"/>
<outlet property="sortingSegmented" destination="OYn-2j-7sG" id="e45-Q6-02g"/>
<outlet property="spaceButton" destination="RRm-6s-AXb" id="fDO-S5-0KW"/>
<outlet property="spriceButton" destination="Orb-R1-ono" id="wq0-Fs-oIW"/>
<outlet property="styleButton" destination="RPo-A8-JIT" id="dMX-M4-5zs"/>
<outlet property="typeButton" destination="Kwt-CY-h6v" id="Be2-Ql-hBp"/>
<outlet property="backgroundView" destination="vsr-7f-kMN" id="SJ0-mA-hQA"/>
<outlet property="materialButton" destination="Esb-9t-cje" id="1RF-Ec-WH6"/>
<outlet property="shadowView" destination="440-zZ-HE8" id="Rcy-4c-gSa"/>
<outlet property="sortingSegmented" destination="OYn-2j-7sG" id="mB7-Km-I9b"/>
<outlet property="spaceButton" destination="RRm-6s-AXb" id="62x-tH-IIg"/>
<outlet property="spriceButton" destination="Orb-R1-ono" id="Aig-I6-ShF"/>
<outlet property="styleButton" destination="RPo-A8-JIT" id="eIu-6r-bHf"/>
<outlet property="typeButton" destination="Kwt-CY-h6v" id="jSz-66-auL"/>
</connections>
<point key="canvasLocation" x="300" y="176"/>
</view>
......
//
// AddressViewController.h
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface AddressViewController : BaseViewController
/**
* 关闭按钮
*/
@property (weak, nonatomic) IBOutlet UIButton *turnoffButton;
/**
* title
*/
@property (weak, nonatomic) IBOutlet UILabel *changAddressLabe;
/**
* 收件人
*/
@property (weak, nonatomic) IBOutlet UITextField *recipientPerson;
/**
* 手机号
*/
@property (weak, nonatomic) IBOutlet UITextField *PhoneNumber;
/**
* 地址选择(城市选择器)
*/
@property (weak, nonatomic) IBOutlet UIButton *citySelected;
/**
* 详细地址
*/
@property (weak, nonatomic) IBOutlet UITextField *detailsAddress;
/**
* 删除按钮(取消按钮)
*/
@property (weak, nonatomic) IBOutlet UIButton *delectAddressButton;
/**
* 修改按钮(新增按钮)
*/
@property (weak, nonatomic) IBOutlet UIButton *modifyButton;
/**
* 弹出框View
*/
@property (weak, nonatomic) IBOutlet UIView *popupView;
/**
* 收货人
*/
@property (weak, nonatomic) IBOutlet UIView *recipientUserBackview;
/**
* 手机号
*/
@property (weak, nonatomic) IBOutlet UIView *phoneNumberBackview;
/**
* 详细地址
*/
@property (weak, nonatomic) IBOutlet UIView *detailsAddressBackview;
@end
//
// AddressViewController.m
// Lighting
//
// Created by 曹云霄 on 16/5/10.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "AddressViewController.h"
#import "ModifyShippingAddressView.h"
@interface AddressViewController ()
/**
* 城市选择器
*/
@property (nonatomic,strong)ModifyShippingAddressView *citySelecteview;
@end
@implementation AddressViewController
/**
* 城市选择View
*
* @return ModifyShippingAddressView
*/
- (ModifyShippingAddressView *)citySelecteview
{
if (_citySelecteview == nil) {
_citySelecteview = [[[NSBundle mainBundle] loadNibNamed:@"ModifyShippingAddressView"
owner:self options:nil]lastObject];
}
return _citySelecteview;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self uiConfigAction];
}
#pragma mark -布局
- (void)uiConfigAction
{
self.recipientUserBackview.layer.masksToBounds = YES;
self.recipientUserBackview.layer.cornerRadius = kCornerRadius;
self.phoneNumberBackview.layer.masksToBounds = YES;
self.phoneNumberBackview.layer.cornerRadius = kCornerRadius;
self.detailsAddressBackview.layer.masksToBounds = YES;
self.detailsAddressBackview.layer.cornerRadius = kCornerRadius;
self.citySelected.layer.masksToBounds = YES;
self.citySelected.layer.cornerRadius = kCornerRadius;
}
#pragma mark -取消弹出的圆角
- (void)viewWillAppear:(BOOL)animated
{
self.view.superview.layer.cornerRadius = 0;
}
#pragma mark -城市选择器
- (void)SelectedCityButtonClick
{
self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height, self.view.frame.size.width, 160);
[self.view addSubview:self.citySelecteview];
[self.citySelecteview.selectedCityButton addTarget:self action:@selector(CompleteButton) forControlEvents:UIControlEventTouchUpInside];
[UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, self.view.frame.size.height-160, self.view.frame.size.width, 160);
}completion:^(BOOL finished) {
self.citySelected.enabled = NO;
}];
}
#pragma mark -完成按钮点击
- (void)CompleteButton
{
[UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, ScreenHeight, self.view.frame.size.width, 160);
}completion:^(BOOL finished) {
[self.citySelecteview removeFromSuperview];
self.citySelecteview = nil;
self.citySelected.enabled = YES;
}];
}
#pragma mark -关闭地址输入框
- (IBAction)turnoffAddressView:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}
/*
#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
This diff is collapsed.
......@@ -16,7 +16,7 @@
#import "ModifyShippingAddressView.h"
#import "AppDelegate.h"
#import "OrderdetailsViewController.h"
#import "AddressViewController.h"
@interface GenerateOrdersViewController ()<UITableViewDelegate,UITableViewDataSource>
/**
......@@ -24,10 +24,7 @@
*/
@property (nonatomic,strong) ModifyShippingAddressView *addressView;
/**
* 城市选择器
*/
@property (nonatomic,strong)ModifyShippingAddressView *citySelecteview;
@property (nonatomic,strong) UIView *Tabbarview;
@end
......@@ -35,20 +32,6 @@
@implementation GenerateOrdersViewController
/**
* 城市选择View
*
* @return ModifyShippingAddressView
*/
- (ModifyShippingAddressView *)citySelecteview
{
if (_citySelecteview == nil) {
_citySelecteview = [[[NSBundle mainBundle] loadNibNamed:@"ModifyShippingAddressView"
owner:self options:nil]lastObject];
}
return _citySelecteview;
}
......@@ -206,37 +189,14 @@
#pragma mark -新增或者修改收货地址
- (void)CreateModifyShippingView
{
//修改收货地址弹出框
self.addressView = [[[NSBundle mainBundle] loadNibNamed:@"ModifyShippingAddressView" owner:self options:nil]firstObject];
self.addressView.frame = CGRectMake(0, ScreenHeight+NavigationHeight, ScreenWidth, ScreenHeight);
self.addressView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[self.addressView.turnoffButton addTarget:self action:@selector(TurnofffButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.addressView.citySelected addTarget:self action:@selector(SelectedCityButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.addressView];
//tabbar遮罩
self.Tabbarview = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenHeight, ScreenWidth, NavigationHeight)];
self.Tabbarview.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
[SHARED_APPDELEGATE.tabbar addSubview:self.Tabbarview];
[UIView animateWithDuration:0.2 animations:^{
self.Tabbarview.frame = CGRectMake(0, 0, ScreenWidth, NavigationHeight);
self.addressView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
}];
}
#pragma mark -关闭按钮
- (void)TurnofffButtonClick
{
[UIView animateWithDuration:0.2 animations:^{
self.addressView.frame = CGRectMake(0, ScreenHeight+NavigationHeight, ScreenWidth, ScreenHeight);
self.Tabbarview.frame = CGRectMake(0, ScreenHeight, ScreenWidth, NavigationHeight);
}];
AddressViewController *address = [[AddressViewController alloc]init];
address.preferredContentSize = CGSizeMake(315, 320);
address.modalPresentationStyle = UIModalPresentationFormSheet;
UIPopoverPresentationController *pop = address.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = address.view;
[self presentViewController:address animated:YES completion:nil];
}
......@@ -258,36 +218,7 @@
}
#pragma mark -城市选择器
- (void)SelectedCityButtonClick
{
self.citySelecteview.frame = CGRectMake(0, self.addressView.popupView.frame.size.height, self.addressView.popupView.frame.size.width, 160);
[self.addressView.popupView addSubview:self.citySelecteview];
[self.citySelecteview.selectedCityButton addTarget:self action:@selector(CompleteButton) forControlEvents:UIControlEventTouchUpInside];
[UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, self.addressView.popupView.frame.size.height-160, self.addressView.popupView.frame.size.width, 160);
}completion:^(BOOL finished) {
self.addressView.citySelected.enabled = NO;
}];
}
#pragma mark -完成按钮点击
- (void)CompleteButton
{
[UIView animateWithDuration:0.2 animations:^{
self.citySelecteview.frame = CGRectMake(0, ScreenHeight, self.addressView.popupView.frame.size.width, 160);
}completion:^(BOOL finished) {
[self.citySelecteview removeFromSuperview];
self.citySelecteview = nil;
self.addressView.citySelected.enabled = YES;
}];
}
......
......@@ -11,63 +11,6 @@
@interface ModifyShippingAddressView : UIView<UIPickerViewDelegate,UIPickerViewDataSource>
/**
* 关闭按钮
*/
@property (weak, nonatomic) IBOutlet UIButton *turnoffButton;
/**
* title
*/
@property (weak, nonatomic) IBOutlet UILabel *changAddressLabe;
/**
* 收件人
*/
@property (weak, nonatomic) IBOutlet UITextField *recipientPerson;
/**
* 手机号
*/
@property (weak, nonatomic) IBOutlet UITextField *PhoneNumber;
/**
* 邮箱
*/
@property (weak, nonatomic) IBOutlet UITextField *personEmail;
/**
* 地址选择(城市选择器)
*/
@property (weak, nonatomic) IBOutlet UIButton *citySelected;
/**
* 详细地址
*/
@property (weak, nonatomic) IBOutlet UITextField *detailsAddress;
/**
* 删除按钮(取消按钮)
*/
@property (weak, nonatomic) IBOutlet UIButton *delectAddressButton;
/**
* 修改按钮(新增按钮)
*/
@property (weak, nonatomic) IBOutlet UIButton *modifyButton;
/**
* 弹出框View
*/
@property (weak, nonatomic) IBOutlet UIView *popupView;
/**
......
......@@ -114,7 +114,6 @@
break;
}
[self.citySelected setTitle:cityString forState:UIControlStateNormal];
}
......
......@@ -48,8 +48,11 @@
self.classificationLayout.minimumInteritemSpacing = 10;
self.classificationLayout.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20);
[self.classificationCollectionView registerClass:[ScreeningFirstCollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
//section
[self.classificationCollectionView registerClass:[ScreeningCollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"Sectioncell"];
self.classificationCollectionView.dataSource = self;
self.classificationCollectionView.delegate = self;
self.classificationCollectionView.alwaysBounceVertical = YES;
}
......@@ -67,7 +70,8 @@
{
if (self.selectedIndex == 1) {
return [[self.datasArray objectAtIndex_opple:section] count];
// return [[self.datasArray objectAtIndex_opple:section][@"children"] count];
}
return self.datasArray.count;
}
......@@ -87,17 +91,21 @@
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
if (section == 0) {
return CGSizeMake(320, 80);
}else{
return CGSizeMake(320, 15);
if (self.selectedIndex == 1) {
return CGSizeMake(200, 40);
}
return CGSizeMake(0, 0);
}
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
ScreeningCollectionReusableView *sectionView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"Sectioncell" forIndexPath:indexPath];
sectionView.backgroundColor = [UIColor redColor];
return sectionView;
}
......
......@@ -8,6 +8,17 @@
#import <UIKit/UIKit.h>
/**
* tableview模块的选中
*/
@protocol TableviewSelectedIndexdelegate <NSObject>
- (void)tableSelectedindex:(NSInteger)index;
@end
@interface screeningSecondView : UIView<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
......@@ -32,7 +43,7 @@
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *screeningLayout;
/**
* 分类数据源
* 筛选数据源
*/
@property (nonatomic,strong) NSArray *datasArray;
......@@ -44,6 +55,10 @@
/**
* tableview选中代理
*/
@property (nonatomic,assign) id<TableviewSelectedIndexdelegate>delegate;
......
......@@ -8,6 +8,8 @@
#import "screeningSecondView.h"
#import "ScreeningFirstCollectionViewCell.h"
#import "ScreeningSecondCollectionReusableView.h"
#define WIDTH self.screeningCollectionView.frame.size.width
......@@ -26,26 +28,37 @@
- (void)awakeFromNib
{
[self uiConfigAction];
// [self uiConfigAction];
}
#pragma mark -获取数据
- (void)setDatasArray:(NSArray *)datasArray
{
_datasArray = datasArray;
[self uiConfigAction];
[self.screeningTableview reloadData];
[self.screeningCollectionView reloadData];
}
#pragma mark - 布局
- (void)uiConfigAction
{
self.screeningTableview.delegate = self;
self.screeningTableview.dataSource = self;
self.screeningTableview.backgroundColor = [UIColor lightGrayColor];
self.screeningTableview.backgroundColor = [UIColor grayColor];
[self.screeningTableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"tableviewcell"];
self.screeningLayout.itemSize = CGSizeMake((WIDTH-127)/3, 35);
self.screeningLayout.minimumLineSpacing = 30;
self.screeningLayout.minimumInteritemSpacing = 10;
self.screeningLayout.sectionInset = UIEdgeInsetsMake(20, 30, 20, 30);
[self.screeningCollectionView registerClass:[ScreeningFirstCollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
[self.screeningCollectionView registerClass:[ScreeningSecondCollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"screeningcell"];
self.screeningCollectionView.dataSource = self;
self.screeningCollectionView.delegate = self;
self.screeningCollectionView.alwaysBounceVertical = YES;
}
......@@ -53,7 +66,8 @@
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tableviewcell" forIndexPath:indexPath];
cell.textLabel.text = @"全部";
cell.backgroundColor = [UIColor clearColor];
cell.selectedBackgroundView.backgroundColor = [UIColor whiteColor];
cell.backgroundColor = [UIColor grayColor];
cell.textLabel.textAlignment = NSTextAlignmentCenter;
return cell;
}
......@@ -65,27 +79,52 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 70;
return 55;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([self.delegate respondsToSelector:@selector(tableSelectedindex:)]) {
[self.delegate tableSelectedindex:indexPath.row];
}
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ScreeningFirstCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
cell.titleLabe.text = @"壁灯";
cell.titleLabe.text = [self.datasArray objectAtIndex_opple:indexPath.item];
return cell;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 20;
return self.datasArray.count;
}
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
ScreeningSecondCollectionReusableView *cell = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"screeningcell" forIndexPath:indexPath];
return cell;
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{
return CGSizeMake(self.screeningCollectionView.frame.size.width, 75);
}
#pragma mark -筛选结果点击
- (IBAction)ScreeningResultButtonClick:(UIButton *)sender {
}
......
......@@ -10,7 +10,7 @@
<rect key="frame" x="0.0" y="0.0" width="470" height="310"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="0kR-UB-h2z">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="0kR-UB-h2z">
<rect key="frame" x="390" y="0.0" width="80" height="310"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
......@@ -18,7 +18,7 @@
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsVerticalScrollIndicator="NO" dataMode="none" id="M9i-37-c6i">
<rect key="frame" x="0.0" y="0.0" width="390" height="250"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="0.70412693910000002" blue="0.69044467629999995" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="8xy-wK-EQd">
<size key="itemSize" width="50" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
......
......@@ -62,6 +62,8 @@
2998763C1CD9983A00C90D0A /* CommodityListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2998763B1CD9983A00C90D0A /* CommodityListTableViewCell.m */; };
2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2998763E1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m */; };
299876421CD99E4000C90D0A /* OrderdetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 299876411CD99E4000C90D0A /* OrderdetailsViewController.m */; };
299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 299C7F581CE21FA800E7D7CB /* AddressViewController.m */; };
299C7F5B1CE21FA800E7D7CB /* AddressViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 299C7F591CE21FA800E7D7CB /* AddressViewController.xib */; };
29A8D3981CD85A58004D558F /* ClientdetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A8D3971CD85A58004D558F /* ClientdetailsViewController.m */; };
29A938221CDADE4700F21E54 /* ProductDetailsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A938211CDADE4700F21E54 /* ProductDetailsTableViewCell.m */; };
29A938251CDAE31200F21E54 /* ProductDetailsHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A938241CDAE31200F21E54 /* ProductDetailsHeaderView.m */; };
......@@ -90,6 +92,7 @@
29F725FB1CE17B0D0072FE0E /* Shoppersmanager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FA1CE17B0D0072FE0E /* Shoppersmanager.m */; };
29F725FE1CE1928F0072FE0E /* opple_objc_json_client.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */; };
29F726011CE1D05D0072FE0E /* ScreeningCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */; };
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */; };
86076CC959C487B30F69CC32 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18E6D8479D48A4650167EAF2 /* libPods.a */; };
/* End PBXBuildFile section */
......@@ -192,6 +195,9 @@
2998763E1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AttachmentInformationTableViewCell.m; sourceTree = "<group>"; };
299876401CD99E4000C90D0A /* OrderdetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderdetailsViewController.h; sourceTree = "<group>"; };
299876411CD99E4000C90D0A /* OrderdetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderdetailsViewController.m; sourceTree = "<group>"; };
299C7F571CE21FA800E7D7CB /* AddressViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddressViewController.h; sourceTree = "<group>"; };
299C7F581CE21FA800E7D7CB /* AddressViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressViewController.m; sourceTree = "<group>"; };
299C7F591CE21FA800E7D7CB /* AddressViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddressViewController.xib; sourceTree = "<group>"; };
29A8D3961CD85A58004D558F /* ClientdetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClientdetailsViewController.h; sourceTree = "<group>"; };
29A8D3971CD85A58004D558F /* ClientdetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientdetailsViewController.m; sourceTree = "<group>"; };
29A938201CDADE4700F21E54 /* ProductDetailsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProductDetailsTableViewCell.h; sourceTree = "<group>"; };
......@@ -243,6 +249,8 @@
29F725FD1CE1928F0072FE0E /* opple_objc_json_client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = opple_objc_json_client.m; sourceTree = "<group>"; };
29F725FF1CE1D05D0072FE0E /* ScreeningCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreeningCollectionReusableView.h; sourceTree = "<group>"; };
29F726001CE1D05D0072FE0E /* ScreeningCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningCollectionReusableView.m; sourceTree = "<group>"; };
29F726021CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreeningSecondCollectionReusableView.h; sourceTree = "<group>"; };
29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreeningSecondCollectionReusableView.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>"; };
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>"; };
/* End PBXFileReference section */
......@@ -435,6 +443,9 @@
2928F8411CD0ABAC0036D761 /* ShoppingViewController.m */,
299249351CDB3C6500786B1E /* GenerateOrdersViewController.h */,
299249361CDB3C6500786B1E /* GenerateOrdersViewController.m */,
299C7F571CE21FA800E7D7CB /* AddressViewController.h */,
299C7F581CE21FA800E7D7CB /* AddressViewController.m */,
299C7F591CE21FA800E7D7CB /* AddressViewController.xib */,
);
name = controller;
sourceTree = "<group>";
......@@ -612,6 +623,8 @@
29834EB21CDF1EAA001A484F /* screeningSecondView.h */,
29834EB31CDF1EAA001A484F /* screeningSecondView.m */,
29834EB51CDF1EB6001A484F /* screeningSecondView.xib */,
29F726021CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.h */,
29F726031CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m */,
);
name = screeningSecondView;
sourceTree = "<group>";
......@@ -988,6 +1001,7 @@
29EAAE971CDC4B2900C4DBA2 /* The Swift Programming Language 中文版 - v1.2.pdf in Resources */,
2928F83D1CD0A9CD0036D761 /* qq.png in Resources */,
29834EC61CDF76C1001A484F /* UserViewController.xib in Resources */,
299C7F5B1CE21FA800E7D7CB /* AddressViewController.xib in Resources */,
29706DB41CD082990003C412 /* Assets.xcassets in Resources */,
29706DAF1CD082990003C412 /* Main.storyboard in Resources */,
29EC331B1CE023D5005F0C13 /* ChangePasswordViewController.xib in Resources */,
......@@ -1050,8 +1064,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
29F726041CE1E96E0072FE0E /* ScreeningSecondCollectionReusableView.m in Sources */,
04A14A281CE0FC5600DAD5F3 /* RightSubView.m in Sources */,
29EC331F1CE02AFA005F0C13 /* PopoverViewController.m in Sources */,
299C7F5A1CE21FA800E7D7CB /* AddressViewController.m in Sources */,
29BB276C1CD9DE74009A0813 /* FollowHeartViewController.m in Sources */,
2928F8381CD09E730036D761 /* CustomButton.m in Sources */,
2998763F1CD9985B00C90D0A /* AttachmentInformationTableViewCell.m in Sources */,
......
......@@ -119,7 +119,7 @@
/**
* 筛选框复选按钮圆角尺寸
*/
#define kSelectedCornerRadius 20
#define kSelectedCornerRadius 25
/**
......
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