Commit 500f8825 authored by admin's avatar admin

修复小bug

parent 50ba09db
......@@ -259,10 +259,15 @@
cell.introLabel.text = @"参考说明";
cell.introDetailLabel.text = [NSString stringWithFormat:@"%@", _taskModel.reference];
NSString *refrer = [NSString stringWithFormat:@"%@", _taskModel.reference];
if (refrer == nil || refrer == NULL || [refrer isEqual:[NSNull null]] || refrer == Nil || [refrer isEqualToString:@"(null)"]) {
cell.introDetailLabel.text = @"";
} else {
NSString *str = [NSString stringWithFormat:@"<style> html{ font-size: 15px; color: #444444 } </style>%@", _taskModel.reference];
NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[str dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType ,NSForegroundColorAttributeName:kLightBlack,NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} documentAttributes:nil error:nil];
cell.introDetailLabel.attributedText = attrStr;
}
return cell;
}
......
......@@ -78,10 +78,16 @@
cell.introLabel.text = @"参考说明";
cell.introDetailLabel.text = [NSString stringWithFormat:@"%@", _taskModel.reference];
NSString *refrer = [NSString stringWithFormat:@"%@", _taskModel.reference];
if (refrer == nil || refrer == NULL || [refrer isEqual:[NSNull null]] || refrer == Nil || [refrer isEqualToString:@"(null)"]) {
cell.introDetailLabel.text = @"";
} else {
NSString *str = [NSString stringWithFormat:@"<style> html{ font-size: 15px; color: #444444 } </style>%@", _taskModel.reference];
NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[str dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType ,NSForegroundColorAttributeName:kLightBlack,NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} documentAttributes:nil error:nil];
cell.introDetailLabel.attributedText = attrStr;
}
return cell;
}
......
......@@ -1036,9 +1036,16 @@
- (void)searchClick:(UIButton *)sender
{
if (!_searchTextField.text) {
SearchViewController *searchVC = [[SearchViewController alloc] init];
searchVC.customStr = _searchTextField.text;
[self.navigationController pushViewController:searchVC animated:YES];
} else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"请输入关键字!" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
}
}
//- (void)searchClick:(UIButton *)sender
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment