1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// KWMBrandCaramelCell.h
// iCemarose
//
// Created by 陈荣科 on 16/8/29.
// Copyright © 2016年 kollway. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "KWMRuleView.h"
#import "Buy/Buy.h"
#import "KWMDataProduct.h"
@class KWMBrandCaramelCell;
@protocol KWMBrandCaramelCellDelegate <NSObject>
- (void)kwm_onClickLeftIamge:(KWMBrandCaramelCell *)brandCell;
- (void)kwm_onClickRightIamge:(KWMBrandCaramelCell *)brandCell;
- (void)kwm_openRule:(BUYProduct *)product Or:(KWMDataProduct *)dataProduct And:(KWMBrandCaramelCell *)brandCell;
@end
@interface KWMBrandCaramelCell : UITableViewCell
@property (nonatomic) KWMRuleView *vRuleLeft;
@property (nonatomic) KWMRuleView *vRuleRight;
@property (weak, nonatomic) id<KWMBrandCaramelCellDelegate>delegate;
@property (weak, nonatomic) IBOutlet UIView *vRootLeft;
@property (weak, nonatomic) IBOutlet UIView *vRootRight;
@property (weak, nonatomic) IBOutlet UILabel *lbDiscountLeft;
@property (weak, nonatomic) IBOutlet UILabel *lbDiscountRight;
@property (weak, nonatomic) IBOutlet UILabel *lbPriceLeft;
@property (weak, nonatomic) IBOutlet UILabel *lbPriceRight;
@property (weak, nonatomic) IBOutlet UILabel *lbBrandLeft;
@property (weak, nonatomic) IBOutlet UILabel *lbBrandRight;
@property (weak, nonatomic) IBOutlet UIImageView *ivIconLeft;
@property (weak, nonatomic) IBOutlet UIImageView *ivIconRight;
@property (weak, nonatomic) IBOutlet UIButton *btnRuleLeft;
@property (weak, nonatomic) IBOutlet UIButton *btnRuleRight;
@property (weak, nonatomic) IBOutlet UIView *vLBackground;
@property (weak, nonatomic) IBOutlet UIView *vRBackground;
@property (nonatomic) BOOL isShowBrandTitle;
@property(nonatomic) NSInteger count;
@property (nonatomic) BUYProduct *leftProduct;
@property (nonatomic) BUYProduct *rightProduct;
@property (nonatomic) KWMDataProduct *leftDataProduct;
@property (nonatomic) KWMDataProduct *rightDataProduct;
//原价price居中向右移动的距离
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLeft;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceRight;
- (IBAction)onClickRuleLeftBtn:(id)sender;
- (IBAction)onClickRuleRightBtn:(id)sender;
- (void)setData:(BUYProduct *)leftProduct rightProduct:(BUYProduct *)rightProduct;
- (void)setDataProduct:(KWMDataProduct *)leftDataProduct rightProduct:(KWMDataProduct *)rightDataProduct;
//展开标尺
- (void)openRule:(BOOL)isLeft;
@end