9
9
import UIKit
10
10
11
11
class DDLoggerSwiftTableViewCell : UITableViewCell {
12
- private lazy var mCollapseLabel : UILabel = {
13
- var label = UILabel ( )
14
- label. translatesAutoresizingMaskIntoConstraints = false
15
- label. font = UIFont . systemFont ( ofSize: 14 , weight: . bold)
16
- return label
17
- } ( )
18
-
19
12
private lazy var mContentLabel : UILabel = {
20
13
var label = UILabel ( )
21
14
label. translatesAutoresizingMaskIntoConstraints = false
@@ -56,20 +49,14 @@ class DDLoggerSwiftTableViewCell: UITableViewCell {
56
49
private func _createUI( ) -> Void {
57
50
self . backgroundColor = UIColor . clear
58
51
59
- self . contentView. addSubview ( mCollapseLabel)
60
- self . mCollapseLabel. leftAnchor. constraint ( equalTo: self . contentView. leftAnchor, constant: 10 ) . isActive = true
61
- self . mCollapseLabel. centerYAnchor. constraint ( equalTo: self . contentView. centerYAnchor) . isActive = true
62
- self . mCollapseLabel. widthAnchor. constraint ( equalToConstant: 20 ) . isActive = true
63
- self . mCollapseLabel. heightAnchor. constraint ( equalToConstant: 20 ) . isActive = true
64
-
65
52
self . contentView. addSubview ( self . mContentLabel)
66
- self . mContentLabel. leftAnchor. constraint ( equalTo: self . mCollapseLabel . rightAnchor , constant: 10 ) . isActive = true
67
- self . mContentLabel. rightAnchor. constraint ( equalTo: self . contentView. rightAnchor, constant: - 10 ) . isActive = true
53
+ self . mContentLabel. leftAnchor. constraint ( equalTo: self . contentView . leftAnchor , constant: 16 ) . isActive = true
54
+ self . mContentLabel. rightAnchor. constraint ( equalTo: self . contentView. rightAnchor, constant: - 16 ) . isActive = true
68
55
self . mContentLabel. topAnchor. constraint ( equalTo: self . contentView. topAnchor, constant: 15 ) . isActive = true
69
56
self . mContentLabel. bottomAnchor. constraint ( equalTo: self . contentView. bottomAnchor, constant: - 10 ) . isActive = true
70
57
71
58
self . contentView. addSubview ( self . mIDLabel)
72
- self . mIDLabel. rightAnchor. constraint ( equalTo: self . contentView. rightAnchor, constant: - 10 ) . isActive = true
59
+ self . mIDLabel. rightAnchor. constraint ( equalTo: self . contentView. rightAnchor, constant: - 16 ) . isActive = true
73
60
self . mIDLabel. topAnchor. constraint ( equalTo: self . contentView. topAnchor, constant: 3 ) . isActive = true
74
61
}
75
62
@@ -79,10 +66,7 @@ class DDLoggerSwiftTableViewCell: UITableViewCell {
79
66
self . mContentLabel. textColor = loggerItem. mLogItemType. textColor ( )
80
67
var contentString = loggerItem. getFullContentString ( )
81
68
if model. isCollapse {
82
- mCollapseLabel. text = " 🗂 "
83
69
contentString = contentString. dd. subString ( rang: NSRange ( location: 0 , length: DDLoggerSwift . cellDisplayCount) )
84
- } else {
85
- mCollapseLabel. text = loggerItem. icon ( )
86
70
}
87
71
loggerItem. getHighlightAttributedString ( contentString: contentString, highlightString: highlightText) { ( hasHighlightStr, hightlightAttributedString) in
88
72
if model. isCollapse {
0 commit comments