52 lines
1.1 KiB
Mathematica
52 lines
1.1 KiB
Mathematica
![]() |
//
|
||
|
// 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
|