52 lines
1.1 KiB
Objective-C
52 lines
1.1 KiB
Objective-C
//
|
|
// XPRoomPostionBaseItemView.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2021/10/15.
|
|
//
|
|
|
|
#import "XPRoomPostionBaseItemView.h"
|
|
///Third
|
|
#import <Masonry/Masonry.h>
|
|
|
|
@interface XPRoomPostionBaseItemView ()
|
|
///头像
|
|
@property (nonatomic,strong) UIImageView *avatarImageView;
|
|
@end
|
|
|
|
@implementation XPRoomPostionBaseItemView
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame {
|
|
self = [super initWithFrame:frame];
|
|
if (self) {
|
|
[self initSubViews];
|
|
[self initSubViewConstraints];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
#pragma mark - Private Method
|
|
- (void)initSubViews {
|
|
[self addSubview:self.avatarImageView];
|
|
}
|
|
|
|
- (void)initSubViewConstraints {
|
|
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.right.top.mas_equalTo(self);
|
|
make.height.mas_equalTo(self.mas_width);
|
|
}];
|
|
}
|
|
|
|
|
|
#pragma mark - Getters And Setters
|
|
- (UIImageView *)avatarImageView {
|
|
if (!_avatarImageView) {
|
|
_avatarImageView = [[UIImageView alloc] init];
|
|
_avatarImageView.userInteractionEnabled = YES;
|
|
_avatarImageView.image = [UIImage imageNamed:@"room_position_normal"];
|
|
}
|
|
return _avatarImageView;
|
|
}
|
|
|
|
@end
|