52 lines
1.1 KiB
Objective-C
52 lines
1.1 KiB
Objective-C
//
|
|
// XPRoomBaseUIView.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2021/10/11.
|
|
// 最下面的View
|
|
|
|
#import "XPRoomBackContainerView.h"
|
|
///Third
|
|
#import <Masonry/Masonry.h>
|
|
|
|
@interface XPRoomBackContainerView ()
|
|
///
|
|
@property (nonatomic,strong) UIImageView *backImageView;
|
|
@end
|
|
|
|
@implementation XPRoomBackContainerView
|
|
|
|
- (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
|