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
74 lines (54 loc) · 1.65 KB

File metadata and controls

74 lines (54 loc) · 1.65 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
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.