Files
yuyin_ios/SweetParty/主类/音悦新增/酒吧厅&新人厅/YYQianyueSelfAlert.m
2025-08-08 11:05:33 +08:00

49 lines
1.4 KiB
Objective-C
Executable File

//
// 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