57 lines
1.1 KiB
Objective-C
57 lines
1.1 KiB
Objective-C
//
|
|
// MessageToolMenuCollectionViewCell.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2022/4/20.
|
|
//
|
|
|
|
#import "MessageToolMenuCollectionViewCell.h"
|
|
///Third
|
|
#import <Masonry/Masonry.h>
|
|
@interface MessageToolMenuCollectionViewCell ()
|
|
|
|
@property (nonatomic,strong) UIImageView *logoImageView;
|
|
|
|
@end
|
|
|
|
|
|
@implementation MessageToolMenuCollectionViewCell
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
self = [super initWithFrame:frame];
|
|
if (self) {
|
|
[self initSubViews];
|
|
[self initSubViewConstraints];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
#pragma mark - Private Method
|
|
- (void)initSubViews {
|
|
[self.contentView addSubview:self.logoImageView];
|
|
}
|
|
|
|
- (void)initSubViewConstraints {
|
|
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.edges.mas_equalTo(self.contentView);
|
|
}];
|
|
}
|
|
|
|
#pragma mark - Getters And Setters
|
|
- (void)setImageName:(NSString *)imageName {
|
|
_imageName = imageName;
|
|
if (_imageName) {
|
|
self.logoImageView.image = [UIImage imageNamed:_imageName];
|
|
}
|
|
}
|
|
|
|
- (UIImageView *)logoImageView {
|
|
if (!_logoImageView) {
|
|
_logoImageView = [[UIImageView alloc] init];
|
|
_logoImageView.userInteractionEnabled = YES;
|
|
}
|
|
return _logoImageView;
|
|
}
|
|
|
|
@end
|