Commit bfc73e91 authored by Sandy's avatar Sandy

封装sortview

parent 8ed4b621
...@@ -139,6 +139,8 @@ ...@@ -139,6 +139,8 @@
19D906B71CC86DA300CD42DC /* SettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906B51CC86DA300CD42DC /* SettingViewController.xib */; }; 19D906B71CC86DA300CD42DC /* SettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906B51CC86DA300CD42DC /* SettingViewController.xib */; };
19D906BB1CC87F3B00CD42DC /* OrderExpressTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906B91CC87F3B00CD42DC /* OrderExpressTableViewCell.m */; }; 19D906BB1CC87F3B00CD42DC /* OrderExpressTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906B91CC87F3B00CD42DC /* OrderExpressTableViewCell.m */; };
19D906BC1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906BA1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib */; }; 19D906BC1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906BA1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib */; };
19D906C31CC8A20F00CD42DC /* OrderDetailBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19D906C21CC8A20F00CD42DC /* OrderDetailBottomView.xib */; };
19D906C61CC8A21700CD42DC /* OrderDetailBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D906C51CC8A21700CD42DC /* OrderDetailBottomView.m */; };
19DC6AFC1CBF867E0064A9FD /* JavenShopModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */; }; 19DC6AFC1CBF867E0064A9FD /* JavenShopModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */; };
19DC6B0F1CC0AA7D0064A9FD /* MyTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6B0E1CC0AA7D0064A9FD /* MyTeamViewController.m */; }; 19DC6B0F1CC0AA7D0064A9FD /* MyTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6B0E1CC0AA7D0064A9FD /* MyTeamViewController.m */; };
19DC6B131CC0ACDE0064A9FD /* MyteamTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6B121CC0ACDE0064A9FD /* MyteamTopView.m */; }; 19DC6B131CC0ACDE0064A9FD /* MyteamTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 19DC6B121CC0ACDE0064A9FD /* MyteamTopView.m */; };
...@@ -483,6 +485,9 @@ ...@@ -483,6 +485,9 @@
19D906B81CC87F3B00CD42DC /* OrderExpressTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderExpressTableViewCell.h; sourceTree = "<group>"; }; 19D906B81CC87F3B00CD42DC /* OrderExpressTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderExpressTableViewCell.h; sourceTree = "<group>"; };
19D906B91CC87F3B00CD42DC /* OrderExpressTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderExpressTableViewCell.m; sourceTree = "<group>"; }; 19D906B91CC87F3B00CD42DC /* OrderExpressTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderExpressTableViewCell.m; sourceTree = "<group>"; };
19D906BA1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderExpressTableViewCell.xib; sourceTree = "<group>"; }; 19D906BA1CC87F3B00CD42DC /* OrderExpressTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderExpressTableViewCell.xib; sourceTree = "<group>"; };
19D906C21CC8A20F00CD42DC /* OrderDetailBottomView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderDetailBottomView.xib; sourceTree = "<group>"; };
19D906C41CC8A21700CD42DC /* OrderDetailBottomView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailBottomView.h; sourceTree = "<group>"; };
19D906C51CC8A21700CD42DC /* OrderDetailBottomView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailBottomView.m; sourceTree = "<group>"; };
19DC6AFA1CBF867E0064A9FD /* JavenShopModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenShopModel.h; sourceTree = "<group>"; }; 19DC6AFA1CBF867E0064A9FD /* JavenShopModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenShopModel.h; sourceTree = "<group>"; };
19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenShopModel.m; sourceTree = "<group>"; }; 19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenShopModel.m; sourceTree = "<group>"; };
19DC6B0D1CC0AA7D0064A9FD /* MyTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTeamViewController.h; sourceTree = "<group>"; }; 19DC6B0D1CC0AA7D0064A9FD /* MyTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTeamViewController.h; sourceTree = "<group>"; };
...@@ -766,6 +771,9 @@ ...@@ -766,6 +771,9 @@
199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */, 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */,
199B4D6B1CABBF0800451E0E /* OrderDetailTopView.h */, 199B4D6B1CABBF0800451E0E /* OrderDetailTopView.h */,
199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */, 199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */,
19D906C21CC8A20F00CD42DC /* OrderDetailBottomView.xib */,
19D906C41CC8A21700CD42DC /* OrderDetailBottomView.h */,
19D906C51CC8A21700CD42DC /* OrderDetailBottomView.m */,
199B4D831CAE43F800451E0E /* OrderDetailTableViewCell.h */, 199B4D831CAE43F800451E0E /* OrderDetailTableViewCell.h */,
199B4D841CAE43F800451E0E /* OrderDetailTableViewCell.m */, 199B4D841CAE43F800451E0E /* OrderDetailTableViewCell.m */,
199B4D851CAE43F800451E0E /* OrderDetailTableViewCell.xib */, 199B4D851CAE43F800451E0E /* OrderDetailTableViewCell.xib */,
...@@ -1392,8 +1400,8 @@ ...@@ -1392,8 +1400,8 @@
1979752B1CA90D3900407E3F /* CommodityManagement */, 1979752B1CA90D3900407E3F /* CommodityManagement */,
199BC79F1C9AA7DF00E4E0B8 /* HomeViewController.h */, 199BC79F1C9AA7DF00E4E0B8 /* HomeViewController.h */,
199BC7A01C9AA7DF00E4E0B8 /* HomeViewController.m */, 199BC7A01C9AA7DF00E4E0B8 /* HomeViewController.m */,
1929F18C1CA10C94000E9B26 /* HomeCollectionViewController.h */,
1929F18D1CA10C94000E9B26 /* HomeCollectionViewController.m */, 1929F18D1CA10C94000E9B26 /* HomeCollectionViewController.m */,
1929F18C1CA10C94000E9B26 /* HomeCollectionViewController.h */,
); );
path = ViewController; path = ViewController;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1856,6 +1864,7 @@ ...@@ -1856,6 +1864,7 @@
199B4D891CAE67C600451E0E /* SeeLogistics.xib in Resources */, 199B4D891CAE67C600451E0E /* SeeLogistics.xib in Resources */,
199BC7B21C9AD4FD00E4E0B8 /* LoginViewController.xib in Resources */, 199BC7B21C9AD4FD00E4E0B8 /* LoginViewController.xib in Resources */,
19ADD38F1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib in Resources */, 19ADD38F1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.xib in Resources */,
19D906C31CC8A20F00CD42DC /* OrderDetailBottomView.xib in Resources */,
199B4D981CAE701F00451E0E /* StoreManagermentViewController.xib in Resources */, 199B4D981CAE701F00451E0E /* StoreManagermentViewController.xib in Resources */,
199BC7C81C9BA2A300E4E0B8 /* ResetPasswordViewController.xib in Resources */, 199BC7C81C9BA2A300E4E0B8 /* ResetPasswordViewController.xib in Resources */,
197975311CA90DA400407E3F /* CommodityManagementTopView.xib in Resources */, 197975311CA90DA400407E3F /* CommodityManagementTopView.xib in Resources */,
...@@ -2011,6 +2020,7 @@ ...@@ -2011,6 +2020,7 @@
19DCCB691C9A9EB30072C3BF /* IBTObject.m in Sources */, 19DCCB691C9A9EB30072C3BF /* IBTObject.m in Sources */,
19DCCBDD1C9AA0450072C3BF /* IBTFileManager.m in Sources */, 19DCCBDD1C9AA0450072C3BF /* IBTFileManager.m in Sources */,
1900A3411CB6059000B2B7C4 /* introductionViewController.m in Sources */, 1900A3411CB6059000B2B7C4 /* introductionViewController.m in Sources */,
19D906C61CC8A21700CD42DC /* OrderDetailBottomView.m in Sources */,
19ADD3771CA4D19F00EE6E5A /* AddCommodityViewController.m in Sources */, 19ADD3771CA4D19F00EE6E5A /* AddCommodityViewController.m in Sources */,
199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */, 199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */,
19DCCBC71C9AA0450072C3BF /* NSDate+FormatterAdditions.m in Sources */, 19DCCBC71C9AA0450072C3BF /* NSDate+FormatterAdditions.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon_order_address.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icon_order_address@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -62,8 +62,9 @@ ...@@ -62,8 +62,9 @@
<constraint firstAttribute="height" constant="1" id="qzP-Z6-Apx"/> <constraint firstAttribute="height" constant="1" id="qzP-Z6-Apx"/>
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aRu-lu-Ec8"> <button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aRu-lu-Ec8" customClass="MBButtonWithFontAdapter">
<rect key="frame" x="6" y="9" width="115" height="25"/> <rect key="frame" x="6" y="9" width="115" height="25"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="添加到店铺" image="commodityUnAdded"> <state key="normal" title="添加到店铺" image="commodityUnAdded">
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</state> </state>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bloem天然草本更年期综合营养 胶囊100粒 " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dhI-dB-05Q"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bloem天然草本更年期综合营养 胶囊100粒 " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dhI-dB-05Q">
<rect key="frame" x="106" y="8" width="206" height="41"/> <rect key="frame" x="106" y="8" width="206" height="41"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="96粒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bGv-K4-Dnw"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="96粒" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bGv-K4-Dnw">
......
//
// OrderDetailBottomView.h
// ALand
//
// Created by Z on 16/4/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface OrderDetailBottomView : UIView
@property (weak, nonatomic) IBOutlet UILabel *laberRemark;
@property (weak, nonatomic) IBOutlet UIView *viewRemark;
- (void)updateHeight;
@end
//
// OrderDetailBottomView.m
// ALand
//
// Created by Z on 16/4/21.
// Copyright © 2016年 Z. All rights reserved.
//
#import "OrderDetailBottomView.h"
@implementation OrderDetailBottomView
- (void)setString:(NSString *)string {
self.laberRemark.text = string;
[self layoutIfNeeded];
self.height = self.viewRemark.bottom;
CLog(@"%f", self.height);
}
- (void)updateHeight {
self.height = self.viewRemark.bottom + 163;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
This diff is collapsed.
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated]; [super setSelected:selected animated:animated];
// Configure the view for the selected state // Configure the view for the selected state
} }
......
...@@ -17,12 +17,16 @@ typedef NS_ENUM(NSInteger, ORDERTOPTYPE) ...@@ -17,12 +17,16 @@ typedef NS_ENUM(NSInteger, ORDERTOPTYPE)
}; };
@interface OrderDetailTopView : UIView @interface OrderDetailTopView : UIView
@property (weak, nonatomic) IBOutlet UILabel *labelAddress;
@property (weak, nonatomic) IBOutlet UILabel *labelRemark;
@property (nonatomic, assign) ORDERTOPTYPE orderType; @property (nonatomic, assign) ORDERTOPTYPE orderType;
@property (weak, nonatomic) IBOutlet UILabel *labelAddress;
@property (weak, nonatomic) IBOutlet UIView *bottomView;
@property (weak, nonatomic) IBOutlet UILabel *labelName;
@property (weak, nonatomic) IBOutlet UILabel *labelPhoneNumber;
@property (nonatomic) CGFloat viewHeight; @property (nonatomic) CGFloat viewHeight;
- (void)updateTag; - (void)updateHeight;
- (CGFloat)viewHeight;
@end @end
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
#import "OrderDetailTopView.h" #import "OrderDetailTopView.h"
@interface OrderDetailTopView () @interface OrderDetailTopView ()
@property (weak, nonatomic) IBOutlet UILabel *labelBottom;
@property (weak, nonatomic) IBOutlet UIView *labelLastView;
@property (weak, nonatomic) IBOutlet UIImageView *imageViewTag;
@end @end
@implementation OrderDetailTopView @implementation OrderDetailTopView
...@@ -20,41 +17,12 @@ ...@@ -20,41 +17,12 @@
} }
- (void)updateTag {
switch (self.orderType) {
case ORDERTOPTYPE_NOPAYMENT:
self.imageViewTag.image = [UIImage imageNamed:@"order_state_noPayment"];
break;
case ORDERTOPTYPE_WAITFORDISPATCH:
self.imageViewTag.image = [UIImage imageNamed:@"order_state_unstasport"];
break;
case ORDERTOPTYPE_TRANSPORTED:
self.imageViewTag.image = [UIImage imageNamed:@"order_state_transported"];
break;
case ORDERTOPTYPE_COMMPLETE:
break;
case ORDERTOPTYPE_CANCELED:
break;
default:
break;
}
- (void)updateHeight {
self.height = self.bottomView.bottom;
} }
- (IBAction)actionCall:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", self.labelPhoneNumber.text]]];
- (CGFloat)viewHeight {
[self.labelLastView layoutIfNeeded];
return self.labelLastView.bottom;
} }
/* /*
// Only override drawRect: if you perform custom drawing. // Only override drawRect: if you perform custom drawing.
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
#import "IBTUIViewController.h" #import "IBTUIViewController.h"
#import "CommodityManagementSortView.h" #import "CommodityManagementSortView.h"
#import "JavenSortView.h"
@interface CommodityManagementViewController : IBTUIViewController @interface CommodityManagementViewController : IBTUIViewController
@property (nonatomic, strong) CommodityManagementSortView *sorView; @property (nonatomic, strong) JavenSortView *sorView;
@end @end
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#import "CommodityListModel/CommotityListModel.h" #import "CommodityListModel/CommotityListModel.h"
#import "ManagementViewController.h" #import "ManagementViewController.h"
#import "Conditions.h" #import "Conditions.h"
#import "JavenSortView.h"
#define kCellID @"commodityCell" #define kCellID @"commodityCell"
#define kPageSize @999 #define kPageSize @999
#define kCellId @"CommodityTableViewCell.h" #define kCellId @"CommodityTableViewCell.h"
...@@ -297,9 +299,9 @@ ...@@ -297,9 +299,9 @@
} }
#pragma mark =========== lazy loading =========== #pragma mark =========== lazy loading ===========
- (CommodityManagementSortView *)sorView { - (JavenSortView *)sorView {
if (!_sorView) { if (!_sorView) {
_sorView = [[CommodityManagementSortView new] sortView]; _sorView = [JavenSortView sortViewLeftTitles:@[@"销售中",@"未上架"] rightTitles:@[@"最新排序",@"销量排序",@"佣金排序",@"售价排序"]];
_sorView.frame = CGRectMake(0, _topView.bottom - 50, kWidth, 49); _sorView.frame = CGRectMake(0, _topView.bottom - 50, kWidth, 49);
} }
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
return 110; return kAutoValue(110);
} }
#pragma mark =========== searchbar delegate =========== #pragma mark =========== searchbar delegate ===========
...@@ -87,24 +87,34 @@ ...@@ -87,24 +87,34 @@
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
{ {
self.sortView.userInteractionEnabled = YES;
[self.searchBar endEditing:YES]; [self.searchBar endEditing:YES];
} }
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar
{ {
[self.sortView hide];
self.sortView.userInteractionEnabled = NO;
self.searchBar.showsCancelButton = YES; self.searchBar.showsCancelButton = YES;
return YES; return YES;
} }
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar - (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar
{ {
self.searchBar.showsCancelButton = NO; self.searchBar.showsCancelButton = NO;
return YES; return YES;
} }
- (void)cancelSearchAction { - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
self.sortView.userInteractionEnabled = YES;
}
- (void)popAction {
[super popAction];
[self.sortView hide];
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#import "CommodityManagementSortView.h" #import "CommodityManagementSortView.h"
#import "CommodityManagementViewController.h" #import "CommodityManagementViewController.h"
@interface ManagementViewController : IBTUIViewController @interface ManagementViewController : IBTUIViewController
@property (nonatomic, strong) CommodityManagementSortView *sorView; @property (nonatomic, strong) JavenSortView *sorView;
@property (nonatomic, strong) NSMutableArray *arrCellData; @property (nonatomic, strong) NSMutableArray *arrCellData;
@property (nonatomic, assign) BOOL isLeft;//判断排序判断选中了左边还是右边 @property (nonatomic, assign) BOOL isLeft;//判断排序判断选中了左边还是右边
@property (nonatomic, assign) NSInteger row;//判断排序判断选中了哪一行 @property (nonatomic, assign) NSInteger row;//判断排序判断选中了哪一行
......
...@@ -316,13 +316,17 @@ ...@@ -316,13 +316,17 @@
}]; }];
} }
- (void)popAction {
[super popAction];
[self.sorView hide];
}
#pragma mark =========== lazyloading =========== #pragma mark =========== lazyloading ===========
- (CommodityManagementSortView *)sorView { - (JavenSortView *)sorView {
if (!_sorView) { if (!_sorView) {
_sorView = [[CommodityManagementSortView new] sortView]; _sorView = [JavenSortView sortViewLeftTitles:@[@"销售中",@"未上架"] rightTitles:@[@"最新排序",@"销量排序",@"佣金排序",@"售价排序"]];
_sorView.frame = CGRectMake(0, 0, kWidth, 49); _sorView.frame = CGRectMake(0, 0, kWidth, 49);
} }
return _sorView; return _sorView;
......
...@@ -11,9 +11,13 @@ ...@@ -11,9 +11,13 @@
#import "OrderDetailTableViewCell.h" #import "OrderDetailTableViewCell.h"
#import "UITableView+Category.h" #import "UITableView+Category.h"
#import "SeeLogistics.h" #import "SeeLogistics.h"
#import "OrderDetailBottomView.h"
#define kCellId @"OrderDetailTableViewCell.h" #define kCellId @"OrderDetailTableViewCell.h"
@interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource> @interface OrderDetailViewController ()<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) OrderDetailBottomView *bottomView;
@property (nonatomic, strong) OrderDetailTopView *atopView;
@end @end
@implementation OrderDetailViewController @implementation OrderDetailViewController
...@@ -25,24 +29,22 @@ ...@@ -25,24 +29,22 @@
//tableView //tableView
self.tableView = [UITableView plainTableViewWithTarget:self cellNibName:@"OrderDetailTableViewCell" cellId:kCellId]; self.tableView = [UITableView plainTableViewWithTarget:self cellNibName:@"OrderDetailTableViewCell" cellId:kCellId];
self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight);
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = kBacroundColor; self.tableView.backgroundColor = kBacroundColor;
[self.view addSubview:self.tableView];//topView [self.view addSubview:self.tableView];//topView
OrderDetailTopView *topView = [OrderDetailTopView viewWithNibName:@"OrderDetailTopView"];
topView.width = kWidth;
topView.labelAddress.text = [NSString randomTestText];
topView.labelRemark.text = [NSString randomTestText];
topView.frame = CGRectMake(0, -topView.viewHeight, kWidth, topView.viewHeight);
self.tableView.contentInset = UIEdgeInsetsMake(topView.viewHeight, 0, 64 + 65, 0);
OrderDetailTopView *topView = [OrderDetailTopView viewWithNibName:@"OrderDetailTopView"];
self.atopView = topView;
self.atopView.labelAddress.text = [NSString randomTestText];
[self.tableView addSubview:topView]; [self.tableView addSubview:topView];
//改变tag self.bottomView = [OrderDetailBottomView viewWithNibName:@"OrderDetailBottomView"];
topView.orderType = self.orderType; self.bottomView.laberRemark.text = [NSString randomTestText];
[topView updateTag];//根据
self.tableView.tableFooterView = self.bottomView;
//底部查看物流按钮 //底部查看物流按钮
if (self.orderType == ORDERTOPTYPE_TRANSPORTED) { if (self.orderType == ORDERTOPTYPE_TRANSPORTED) {
...@@ -54,8 +56,31 @@ ...@@ -54,8 +56,31 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
- (void)viewDidLayoutSubviews {
self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight);
[self.atopView updateHeight];
self.atopView.frame = CGRectMake(0, -self.atopView.height, kWidth, self.atopView.height);
[self.bottomView updateHeight];
//self.bottomView.y = kHeight - self.bottomView.height;
self.bottomView.width = kWidth;
self.tableView.contentInset = UIEdgeInsetsMake(self.atopView.height, 0, self.bottomView.height - 250, 0);
// self.tableView.frame = CGRectMake(0, 0, kWidth, kHeight - self.atopView.height);
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 316; return 100;
} }
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
...@@ -43,6 +43,12 @@ ...@@ -43,6 +43,12 @@
//本地已有密码时登录 //本地已有密码时登录
- (void)defaultLoginAction { - (void)defaultLoginAction {
// BaseViewController *baseVC = [[BaseViewController alloc] init];
// baseVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
// [self presentViewController:baseVC animated:YES completion:nil];
//
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"passWord"]) { if ([[NSUserDefaults standardUserDefaults] objectForKey:@"passWord"]) {
NSDictionary *paramers = @{@"domain":kDomain, NSDictionary *paramers = @{@"domain":kDomain,
......
...@@ -268,19 +268,17 @@ ...@@ -268,19 +268,17 @@
} }
- (void)leftIconAnimateToDefault { - (void)leftIconAnimateToDefault {
WS(weakSelf) self.leftBtn.imageView.transform = CGAffineTransformMakeRotation(0);
[UIView animateWithDuration:0.3 animations:^{ self.isLeftOpen = NO;
weakSelf.leftBtn.imageView.transform = CGAffineTransformMakeRotation(M_PI); self.clickCount = 0;
}];
} }
- (void)rightIconAnimateToDefault { - (void)rightIconAnimateToDefault {
WS(weakSelf) self.rightBtn.imageView.transform = CGAffineTransformMakeRotation(0);
[UIView animateWithDuration:0.3 animations:^{ self.isLeftOpen = YES;
weakSelf.rightBtn.imageView.transform = CGAffineTransformMakeRotation(M_PI); self.rightClickCount = 0;
}];
} }
......
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