-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropDownMenuTableViewCell.swift
More file actions
66 lines (48 loc) · 1.66 KB
/
DropDownMenuTableViewCell.swift
File metadata and controls
66 lines (48 loc) · 1.66 KB
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
//
// DropDownMenuTableViewCell.swift
// WhoDo-Swift
//
// Created by mac on 2017/4/26.
// Copyright © 2017年 lanxiao. All rights reserved.
//
import UIKit
import SnapKit
class DropDownMenuTableViewCell: UITableViewCell {
public var label :UILabel!
public var lineView:UIView!
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.addView()
}
func addView(){
label = UILabel.init()
label.font = UIFont.systemFont(ofSize: 15)
label.textColor = UIColor.darkText
label.textAlignment = .center
self.contentView.addSubview(label)
label.snp.makeConstraints { (make) in
make.top.equalTo(8)
make.left.equalTo(0)
make.right.equalTo(self.contentView).offset(0)
make.height.equalTo(24)
}
lineView = UIView.init()
lineView.backgroundColor = UIColor.orange
self.contentView.addSubview(lineView)
lineView.snp.makeConstraints { (make) in
make.top.equalTo(self.label.snp.bottom).offset(7)
make.left.equalTo(self.contentView).offset(0)
make.right.equalTo(self.contentView).offset(0)
make.height.equalTo(1)
}
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func awakeFromNib() {
super.awakeFromNib()
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
}