// // THMineHeaderView.m // TreeHole // // Created by iOS on 2023/7/28. // Copyright © 2023 CYH. All rights reserved. // #import "THMineHeaderView.h" #import "PYAppService.h" #import "FeedbackViewController.h" #import "SettingsViewController.h" #import "EditProfileViewController.h" @implementation THMineHeaderView - (void)layoutSubviews { [super layoutSubviews]; NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.descLbl.text]; NSRange range = [self.descLbl.text rangeOfString:@"去完善"]; // 设置部分文本的颜色 [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:254/255.0 green:209/255.0 blue:164/255.0 alpha:1.0] range:range]; self.descLbl.attributedText = attributedString; self.descLbl.superview.layer.cornerRadius = 5; self.descLbl.superview.layer.borderWidth = 1; self.descLbl.superview.layer.borderColor = [UIColor colorWithRed:254/255.0 green:209/255.0 blue:164/255.0 alpha:0.3].CGColor; [self.descLbl.superview addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(setInfo)]]; } - (void)setInfo { EditProfileViewController *VC = [EditProfileViewController new]; [PYAppService pushViewControllerAnimated:VC]; } - (IBAction)settingAction:(id)sender { [PYAppService pushViewControllerAnimated:[SettingsViewController new]]; } - (IBAction)qaAction:(id)sender { [PYAppService pushViewControllerAnimated:[FeedbackViewController new]]; } @end