Files
ifish/Ifish/controllers/IfishTabControllers/设备/QianDao/View/QianDaoGongLueViewCell.m
T
2017-08-15 16:59:01 +08:00

43 lines
2.2 KiB
Objective-C

//
// QianDaoGongLueViewCell.m
// Ifish
//
// Created by imac on 17/3/6.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "QianDaoGongLueViewCell.h"
@implementation QianDaoGongLueViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
NSMutableAttributedString * firstString = [[NSMutableAttributedString alloc] initWithString:@"首次签到+1金币,连续签到每天递增+1,7天后回到1,第7天可额外获得一个神秘礼物。"];
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:8];
[firstString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [firstString length])];
[firstString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(17, 2)];
[firstString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:156.0/255.0 blue:1.0/255.0 alpha:1] range:NSMakeRange(37, 4)];
self.firstLabel.attributedText = firstString;
NSMutableAttributedString * secString = [[NSMutableAttributedString alloc] initWithString:@"*金币兑换比例:100金币≈1人民币"];
[secString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(0, 1)];
[secString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(8, 3)];
self.secondLabel.attributedText = secString;
NSMutableAttributedString * thirdString = [[NSMutableAttributedString alloc] initWithString:@"*一切解释权归©爱鱼奇所有"];
[thirdString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(0, 1)];
self.thirdlabel.attributedText = thirdString;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end