Skip to content

Commit 82a71ee

Browse files
committed
updated debug label and added to the bottom of the screen
1 parent 235440c commit 82a71ee

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

GoInfoGame/GoInfoGame/SceneDelegate.swift

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,22 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
4444
#if DEBUG
4545
if let window = self.window {
4646
// add the label left bottom of the screen
47-
let debugLabel = UILabel(frame: CGRect(x: 0, y: window.safeAreaInsets.top, width: 35, height: 12))
48-
debugLabel.text = "Debug"
47+
let debugLabel = UILabel()
48+
debugLabel.text = "DEBUG"
4949
debugLabel.tag = 100
5050
debugLabel.textAlignment = .center
51-
debugLabel.font = .systemFont(ofSize: 8)
52-
debugLabel.textColor = Asset.Colors.huskyPurple.color
51+
debugLabel.font = .boldSystemFont(ofSize: 12)
52+
debugLabel.textColor = .white
5353
debugLabel.backgroundColor = Asset.Colors.accentPink.color
54+
debugLabel.translatesAutoresizingMaskIntoConstraints = false
55+
5456
window.addSubview(debugLabel)
57+
NSLayoutConstraint.activate([
58+
debugLabel.topAnchor.constraint(equalTo: window.safeAreaLayoutGuide.bottomAnchor, constant: 0),
59+
debugLabel.widthAnchor.constraint(equalTo: window.safeAreaLayoutGuide.widthAnchor),
60+
debugLabel.heightAnchor.constraint(equalToConstant: 14)
61+
])
62+
5563
}
5664
#endif
5765
}

0 commit comments

Comments
 (0)