You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.9 KiB
73 lines
1.9 KiB
![]()
2 years ago
|
//
|
||
|
// MapMessageView.m
|
||
|
// LekangGuard
|
||
|
//
|
||
|
// Created by ecell on 2022/11/18.
|
||
|
//
|
||
|
|
||
|
#import "MapMessageView.h"
|
||
|
|
||
|
@interface MapMessageView ()
|
||
|
|
||
|
@end
|
||
|
|
||
|
@implementation MapMessageView
|
||
|
|
||
|
- (instancetype)initWithFrame:(CGRect)frame
|
||
|
{
|
||
|
self = [super initWithFrame:frame];
|
||
|
if (self)
|
||
|
{
|
||
|
self.backgroundColor = KKClearColor;
|
||
|
[self subViews];
|
||
|
}
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (void)setLaloModel:(LatestLocationModel *)laloModel
|
||
|
{
|
||
|
_laloModel = laloModel;
|
||
|
}
|
||
|
|
||
|
- (void)subViews
|
||
|
{
|
||
|
/// 定位图片
|
||
|
UIImageView *mapImg = [UICommon ui_imageView:CGRectZero fileName:@""];
|
||
|
self.mapImg = mapImg;
|
||
|
[self addSubview:mapImg];
|
||
|
[mapImg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(self).offset(10);
|
||
|
make.centerY.equalTo(self);
|
||
|
make.size.mas_equalTo(CGSizeMake(30, 30));
|
||
|
}];
|
||
|
|
||
|
/// 定位时间Label
|
||
|
UILabel *timeLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontADA_(10) textColor:KKTextBlackColor text:@"" Radius:3];
|
||
|
self.timeLabel = timeLabel;
|
||
|
[self addSubview:timeLabel];
|
||
|
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(mapImg.mas_right).inset(15);
|
||
|
make.top.equalTo(self).offset(15);
|
||
|
}];
|
||
|
|
||
|
/// 位置
|
||
|
UILabel *addLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:FontADA_(12) textColor:KKTextBlackColor text:GJText(@"当前位置未知,点击进行定位") Radius:0];
|
||
|
self.addLabel = addLabel;
|
||
|
[self addSubview:addLabel];
|
||
|
[addLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||
|
make.left.equalTo(timeLabel.mas_left);
|
||
|
make.right.equalTo(self.mas_right).inset(15);
|
||
|
make.top.equalTo(self.mas_centerY);
|
||
|
}];
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
// Only override drawRect: if you perform custom drawing.
|
||
|
// An empty implementation adversely affects performance during animation.
|
||
|
- (void)drawRect:(CGRect)rect {
|
||
|
// Drawing code
|
||
|
}
|
||
|
*/
|
||
|
|
||
|
@end
|