Files
yinmeng-ios/xplan-ios/Main/Room/View/BaseUIView/XPRoomBackUIView.m

52 lines
1.1 KiB
Mathematica
Raw Normal View History

2021-10-14 21:10:04 +08:00
//
// XPRoomBaseUIView.m
// xplan-ios
//
// Created by on 2021/10/11.
// View
#import "XPRoomBackUIView.h"
///Third
#import <Masonry/Masonry.h>
@interface XPRoomBackUIView ()
///
@property (nonatomic,strong) UIImageView *backImageView;
@end
@implementation XPRoomBackUIView
- (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.backImageView];
}
- (void)initSubViewConstraints {
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
}
#pragma mark - Getters And Setters
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.userInteractionEnabled = YES;
_backImageView.image = [UIImage imageNamed:@"room_background"];
_backImageView.layer.masksToBounds = YES;
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
}
return _backImageView;
}
@end