Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
43 lines (36 loc) · 1.54 KB

File metadata and controls

43 lines (36 loc) · 1.54 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// AboutPointViewController.m
// Coding_iOS
//
// Created by Easeeeeeeeee on 2017/9/18.
// Copyright © 2017年 Coding. All rights reserved.
//
#import "AboutPointViewController.h"
@interface AboutPointViewController ()
@property (weak, nonatomic) IBOutlet UILabel *aboutL;
@end
@implementation AboutPointViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.title = @"关于码币";
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:_aboutL.text];
//段落
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
[paragraphStyle setLineSpacing:5.0];
// [paragraphStyle setParagraphSpacing:10];
[paragraphStyle setLineBreakMode:_aboutL.lineBreakMode];
[paragraphStyle setAlignment:_aboutL.textAlignment];
[attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [_aboutL.text length])];
//标题
NSArray *titleList = @[@"什么是码币", @"码币的用途", @"如何获取码币"];
for (NSString *title in titleList) {
NSRange textR = [_aboutL.text rangeOfString:title];
if (textR.location != NSNotFound) {
[attributedString addAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15 weight:UIFontWeightMedium],
NSForegroundColorAttributeName: kColorDark3} range:textR];
}
}
_aboutL.attributedText = attributedString;
}
@end
Morty Proxy This is a proxified and sanitized view of the page, visit original site.