FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Coding-iOS/Coding_iOS/Views/Cell/AddCommentCell.m at master · flattech/Coding-iOS · GitHub
flattech
/
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
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Views
/
Cell
/
AddCommentCell.m
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (47 loc) · 1.62 KB
Breadcrumbs
Coding-iOS
/
Coding_iOS
/
Views
/
Cell
/
AddCommentCell.m
Copy path
File metadata and controls
51 lines (47 loc) · 1.62 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
//
//
AddCommentCell.m
//
Coding_iOS
//
//
Created by Ease on 15/6/3.
//
Copyright (c) 2015年 Coding. All rights reserved.
//
#
import
"
AddCommentCell.h
"
@interface
AddCommentCell
()
@property
(
strong
,
nonatomic
) UIImageView *iconView;
@property
(
strong
,
nonatomic
) UILabel *contentL;
@end
@implementation
AddCommentCell
- (
id
)
initWithStyle
:
(UITableViewCellStyle)
style
reuseIdentifier
:
(
NSString
*)
reuseIdentifier
{
self = [
super
initWithStyle:
style
reuseIdentifier:
reuseIdentifier];
if
(self) {
//
Initialization code
self.
backgroundColor
=
kColorTableBG
;
if
(!_iconView) {
_iconView = [UIImageView
new
];
_iconView.
image
= [UIImage
imageNamed:
@"
icon_add_comment
"
];
[
self
.contentView
addSubview:
_iconView];
}
if
(!_contentL) {
_contentL = [UILabel
new
];
_contentL.
font
= [UIFont
systemFontOfSize:
15
];
_contentL.
textColor
= [UIColor
colorWithHexString:
@"
0x222222
"
];
_contentL.
text
=
@"
添加评论
"
;
[
self
.contentView
addSubview:
_contentL];
}
[_iconView
mas_makeConstraints:
^(MASConstraintMaker *make) {
make.
size
.
mas_equalTo
(
CGSizeMake
(
20
,
20
));
make.
centerY
.
equalTo
(self.
contentView
);
make.
centerX
.
equalTo
(self.
contentView
).
offset
(-
50
);
}];
[_contentL
mas_makeConstraints:
^(MASConstraintMaker *make) {
make.
left
.
equalTo
(_iconView.
mas_right
).
offset
(
15
);
make.
centerY
.
equalTo
(self.
contentView
);
make.
height
.
mas_equalTo
(
20
);
}];
}
return
self;
}
+ (CGFloat)
cellHeight
{
return
44.0
;
}
@end
Back
|
FazBrowse Home
|
New Git URL