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.

76 lines
2.4 KiB

//
// ShortMessageDetailsViewController.m
// tongxin
//
// Created by ecell on 2023/5/31.
// Copyright © 2023 xTT. All rights reserved.
//
#import "ShortMessageDetailsViewController.h"
@interface ShortMessageDetailsViewController ()
@end
@implementation ShortMessageDetailsViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = KKWhiteColorColor;
self.zx_navTitle = self.smsModel.phone;
/// 时间
UILabel *timeLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentLeft font:Font_(12) textColor:KKGrey163 text:@"" Radius:0];
timeLabel.text = [UICommon getTimeFromTimestamp:[NSString stringWithFormat:@"%@",self.smsModel.timestamp] type:@""];
[self.view addSubview:timeLabel];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(self.view).offset(iPhoneX_NavHeight+15);
}];
UITextView *detailsText = [UICommon ui_textView:CGRectZero textColor:KKBlack20 backColor:RGB(245, 245, 245) font:Font_(14) alignment:NSTextAlignmentLeft inputView:self.view];
detailsText.textContainerInset = UIEdgeInsetsMake(15, 15, 15, 15);
detailsText.layer.cornerRadius = 12;
detailsText.layer.masksToBounds = YES;
detailsText.editable = NO;
[self.view addSubview:detailsText];
detailsText.text = self.smsModel.content;
CGFloat hh = [UICommon GetTextWidth:detailsText.text ViewHeight:ScreenWidth-140 fontSize:Font_(14) type:@"h"].size.height;
[detailsText mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view).inset(30);
make.top.equalTo(timeLabel.mas_bottom).offset(15);
make.height.mas_equalTo(hh+30);
}];
if (!self.smsModel.read.boolValue)
[self setSmsPost];
}
- (void)setSmsPost
{
[cUser.cDevice deleteAndPostDevicesSmSList:self.smsModel.id method:@"POST" success:^(id responseObject) {
} failure:^(id faiObject) {
}];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end