FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Coding-iOS/Coding_iOS/Controllers/AboutPointViewController.m at master · ElvYM/Coding-iOS · GitHub
ElvYM
/
Coding-iOS
Public
forked from
coding/Coding-iOS
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Controllers
/
AboutPointViewController.m
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (36 loc) · 1.55 KB
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Controllers
/
AboutPointViewController.m
Copy path
File metadata and controls
43 lines (36 loc) · 1.55 KB
Raw
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
Back
|
FazBrowse Home
|
New Git URL