forked from liuchaogenius/DianjiaApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
364 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// YDCXDetailCell.h | ||
// YHB_Prj | ||
// | ||
// Created by Johnny's on 15/9/4. | ||
// Copyright (c) 2015年 striveliu. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
@class DJYDCXDetailList; | ||
|
||
@interface YDCXDetailCell : UITableViewCell | ||
@property (strong, nonatomic) IBOutlet UILabel *labelName; | ||
@property (strong, nonatomic) IBOutlet UILabel *labelNum; | ||
@property (strong, nonatomic) IBOutlet UILabel *labelZhe; | ||
@property (strong, nonatomic) IBOutlet UILabel *labelSum; | ||
@property (strong, nonatomic) IBOutlet UILabel *labelPri; | ||
|
||
+ (CGFloat)heightForCell; | ||
- (void)setCellWithMode:(DJYDCXDetailList *)aMode; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// YDCXDetailCell.m | ||
// YHB_Prj | ||
// | ||
// Created by Johnny's on 15/9/4. | ||
// Copyright (c) 2015年 striveliu. All rights reserved. | ||
// | ||
|
||
#import "YDCXDetailCell.h" | ||
#import "DJYDCXDetailList.h" | ||
|
||
@implementation YDCXDetailCell | ||
|
||
- (void)awakeFromNib { | ||
// Initialization code | ||
} | ||
|
||
+(CGFloat)heightForCell | ||
{ | ||
return 90; | ||
} | ||
|
||
- (void)setCellWithMode:(DJYDCXDetailList *)aMode | ||
{ | ||
[self resetCell]; | ||
self.labelName.text = aMode.productName; | ||
self.labelNum.text = [NSString stringWithFormat:@"%d", (int)aMode.saleNum]; | ||
self.labelPri.text = [NSString stringWithFormat:@"%.2f", aMode.salePrice]; | ||
self.labelSum.text = [NSString stringWithFormat:@"%.2f", aMode.payableMoney]; | ||
self.labelZhe.text = [NSString stringWithFormat:@"%.2f%%", aMode.discountRate]; | ||
} | ||
|
||
- (void)resetCell | ||
{ | ||
self.labelName.text = @""; | ||
self.labelNum.text = @""; | ||
self.labelPri.text = @""; | ||
self.labelSum.text = @""; | ||
self.labelZhe.text = @""; | ||
} | ||
|
||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { | ||
[super setSelected:selected animated:animated]; | ||
|
||
// Configure the view for the selected state | ||
} | ||
|
||
@end |
Oops, something went wrong.