联系我们字体修改和关联宠物笼的设置问题修改

This commit is contained in:
kai60
2020-06-28 18:07:46 +08:00
parent 5cfacf22d4
commit 196f47005e
7 changed files with 178 additions and 82 deletions
@@ -39,11 +39,18 @@ Strong UITextView *textView;
// Do any additional setup after loading the view.
}
-(void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
[self protocolIsSelect:YES];
}
-(UITextView *)textView{
if (!_textView) {
_textView = InitObject(UITextView);
_textView.adjustsFontForContentSizeCategory=YES;
[self protocolIsSelect:YES];
}
return _textView;
@@ -69,8 +76,21 @@ range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]
range:[[attributedString string] rangeOfString:@"插排及热流器售后服务热线点击这里。"]];
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:NSMakeRange(0, attributedString.length)];
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:18] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
CGFloat fontSize=18;
if (self.view.frame.size.width>410)
{
fontSize=18;
}
else if (self.view.frame.size.width>370)
{
fontSize=15;
}
else
{
fontSize=12;
}
[attributedString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:fontSize] range:NSMakeRange(0, attributedString.length)];
[attributedString addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:fontSize] range:[[attributedString string] rangeOfString:@"http://u.eqxiu.com/s/KmmVl87l"]];
[attributedString addAttribute:NSLinkAttributeName value:@"tel://18667812003" range:[[attributedString string] rangeOfString:@"18667812003"]];
@@ -87,7 +107,7 @@ _textView.delegate=self;
_textView.editable=NO;
_textView.scrollEnabled = NO;
_textView.scrollEnabled = YES;
}
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange {