1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // JLMyFacePackgeCell.m
- // shiku_im
- //
- // Created by JayLuo on 2019/12/12.
- // Copyright © 2019 Reese. All rights reserved.
- //
- #import "JLMyFacePackgeCell.h"
- @interface JLMyFacePackgeCell()
- @property (weak, nonatomic) IBOutlet UIButton *button;
- @property (weak, nonatomic) IBOutlet UIImageView *imageView;
- @property (weak, nonatomic) IBOutlet UILabel *label;
- @end
- @implementation JLMyFacePackgeCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- _button.layer.cornerRadius = 5;
- _button.layer.masksToBounds = YES;
- _imageView.layer.cornerRadius = 5;
- _imageView.layer.masksToBounds = YES;
- }
- - (void)setModel:(JLFacePackgeModel *)model {
- _model = model;
- NSString *path = model.path? model.path: model.url;
- [_imageView sd_setImageWithURL:[NSURL URLWithString:path]];
- _label.text = model.faceName;
- }
- - (void)setJLMyFacePackgeCellDeleteCallBack:(void (^)(NSString * _Nonnull))JLMyFacePackgeCellDeleteCallBack {
- _JLMyFacePackgeCellDeleteCallBack = JLMyFacePackgeCellDeleteCallBack;
- }
- - (IBAction)deleteEmoji:(UIButton *)sender {
- if (_JLMyFacePackgeCellDeleteCallBack) {
- _JLMyFacePackgeCellDeleteCallBack(_model.faceName);
- }
- }
- @end
|