GiGaMaskTime/GIGA/Modules/Me/View/HistoryView/MasHistoryFirstViewCell.m

57 lines
1.7 KiB
Objective-C

//
// MasHistoryFirstViewCell.m
// GIGA
//
// Created by lianxiang on 2018/9/24.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "MasHistoryFirstViewCell.h"
@implementation MasHistoryFirstViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] init];
NSTextAttachment *attch = [[NSTextAttachment alloc] init];
attch.image = [UIImage imageNamed:@"history_heart"];
attch.bounds = CGRectMake(0,-4, 12.9, 12.5);
NSAttributedString *imastr=[NSAttributedString attributedStringWithAttachment:attch];
[attri appendAttributedString:imastr];
NSAttributedString *titleStr = [[NSAttributedString alloc] initWithString:@" 清零小规则" attributes:@{NSFontAttributeName:[UIFont fontWithName:@"PingFangSC-Semibold" size:10],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[attri appendAttributedString:titleStr];
[self.guizeBtn setAttributedTitle:attri forState:UIControlStateNormal];
}
- (void)layoutSubviews{
[super layoutSubviews];
}
- (void)layoutIfNeeded{
[super layoutIfNeeded];
self.timeView.layer.masksToBounds = NO;
self.timeView.layer.cornerRadius = self.timeView.frame.size.height /2;
self.timeView.layer.shadowOpacity = 0.3;
self.timeView.layer.shadowOffset = CGSizeMake(1, 1);
self.timeView.layer.shadowColor = [UIColor blackColor].CGColor;
self.timeView.layer.borderWidth = 5;
self.timeView.layer.borderColor = GIGARGB(253, 191,191, 1).CGColor;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end