49 lines
1.4 KiB
Mathematica
49 lines
1.4 KiB
Mathematica
|
|
//
|
||
|
|
// YYQianyueSelfAlert.m
|
||
|
|
// YaYin
|
||
|
|
//
|
||
|
|
// Created by bj_szd on 2023/7/12.
|
||
|
|
// Copyright © 2023 YaYin. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "YYQianyueSelfAlert.h"
|
||
|
|
|
||
|
|
@interface YYQianyueSelfAlert ()
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@implementation YYQianyueSelfAlert
|
||
|
|
|
||
|
|
- (void)awakeFromNib {
|
||
|
|
[super awakeFromNib];
|
||
|
|
|
||
|
|
[self createUI];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)createUI {
|
||
|
|
WEAK_SELF
|
||
|
|
[self.touchImgV dg_Tapped:^{
|
||
|
|
[weakSelf removeFromSuperview];
|
||
|
|
}];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)setDataDict:(NSDictionary *)dataDict {
|
||
|
|
_dataDict = dataDict;
|
||
|
|
|
||
|
|
NSString *nick_name = [dataDict[@"sign_user_info"] safeStringForKey:@"nick_name"];
|
||
|
|
NSString *str = [NSString stringWithFormat:@"恭喜您成功签约 %@ 为艺人", nick_name];
|
||
|
|
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
|
||
|
|
style.lineSpacing = 5;
|
||
|
|
style.alignment = NSTextAlignmentCenter;
|
||
|
|
|
||
|
|
NSDictionary *attributeDict = @{NSFontAttributeName:[UIFont systemFontOfSize:25 weight:UIFontWeightHeavy],
|
||
|
|
NSForegroundColorAttributeName:[UIColor whiteColor],
|
||
|
|
NSParagraphStyleAttributeName:style
|
||
|
|
};
|
||
|
|
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:str attributes:attributeDict];
|
||
|
|
[attrStr yy_setColor:HEXCOLOR(0xFF5157) range:[str rangeOfString:nick_name]];
|
||
|
|
self.resultLab.attributedText = attrStr;
|
||
|
|
}
|
||
|
|
|
||
|
|
@end
|