FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Coding-iOS/Coding_iOS/Views/UserActiveStatusView.m at master · feihuohua/Coding-iOS · GitHub
feihuohua
/
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
/
Views
/
UserActiveStatusView.m
Copy path
More file actions
More file actions
Latest commit
History
History
History
74 lines (54 loc) · 1.65 KB
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Views
/
UserActiveStatusView.m
Copy path
File metadata and controls
74 lines (54 loc) · 1.65 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
//
UserActiveStatusView.m
//
Coding_iOS
//
//
Created by 张达棣 on 16/11/30.
//
Copyright © 2016年 Coding. All rights reserved.
//
#
import
"
UserActiveStatusView.h
"
@interface
UserActiveStatusView
()
@property
(
nonatomic
,
strong
) UILabel *titleLabel;
@property
(
nonatomic
,
strong
) UILabel *detailsLabel;
@end
@implementation
UserActiveStatusView
#
pragma mark
- 生命周期方法
- (
void
)
awakeFromNib
{
[
super
awakeFromNib
];
[
self
creatView
];
}
- (
instancetype
)
init
{
self = [
super
init
];
if
(self) {
[
self
creatView
];
}
return
self;
}
#
pragma mark
- 外部方法
#
pragma
makr - 消息
#
pragma mark
- 系统委托
#
pragma mark
- 自定义委托
#
pragma mark
- 响应方法
#
pragma mark
- 私有方法
- (
void
)
creatView
{
_titleLabel = [[UILabel
alloc
]
init
];
_titleLabel.
font
= [UIFont
systemFontOfSize:
17
];
_titleLabel.
textAlignment
= NSTextAlignmentCenter;
[
self
addSubview:
_titleLabel];
_titleLabel.
sd_layout
.
leftEqualToView
(self).
topSpaceToView
(self,
8
).
rightEqualToView
(self).
heightIs
(
24
);
_detailsLabel = [[UILabel
alloc
]
init
];
_detailsLabel.
font
= [UIFont
systemFontOfSize:
10
];
_detailsLabel.
textAlignment
= NSTextAlignmentCenter;
_detailsLabel.
textColor
= [UIColor
colorWithRGBHex:
0x76808e
];
[
self
addSubview:
_detailsLabel];
_detailsLabel.
sd_layout
.
leftEqualToView
(self).
topSpaceToView
(_titleLabel,
5
).
rightEqualToView
(self).
heightIs
(
14
);
}
#
pragma mark
- get/set方法
- (
void
)
setTitle
:
(
NSString
*)
title
{
_title = title;
_titleLabel.
text
= title;
}
- (
void
)
setDetails
:
(
NSString
*)
details
{
_details = details;
_detailsLabel.
text
= details;
}
@end
Back
|
FazBrowse Home
|
New Git URL