Skip to content

Commit 3b90377

Browse files
committed
Update DDLoggerSwiftTableViewCell.swift
1 parent 3d8ec6a commit 3b90377

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

pod/view/DDLoggerSwiftTableViewCell.swift

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
import UIKit
1010

1111
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-
1912
private lazy var mContentLabel: UILabel = {
2013
var label = UILabel()
2114
label.translatesAutoresizingMaskIntoConstraints = false
@@ -56,20 +49,14 @@ class DDLoggerSwiftTableViewCell: UITableViewCell {
5649
private func _createUI() -> Void {
5750
self.backgroundColor = UIColor.clear
5851

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-
6552
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
6855
self.mContentLabel.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: 15).isActive = true
6956
self.mContentLabel.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -10).isActive = true
7057

7158
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
7360
self.mIDLabel.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: 3).isActive = true
7461
}
7562

@@ -79,10 +66,7 @@ class DDLoggerSwiftTableViewCell: UITableViewCell {
7966
self.mContentLabel.textColor = loggerItem.mLogItemType.textColor()
8067
var contentString = loggerItem.getFullContentString()
8168
if model.isCollapse {
82-
mCollapseLabel.text = "🗂"
8369
contentString = contentString.dd.subString(rang: NSRange(location: 0, length: DDLoggerSwift.cellDisplayCount))
84-
} else {
85-
mCollapseLabel.text = loggerItem.icon()
8670
}
8771
loggerItem.getHighlightAttributedString(contentString: contentString, highlightString: highlightText) { (hasHighlightStr, hightlightAttributedString) in
8872
if model.isCollapse {

0 commit comments

Comments
 (0)