分隔线改为 1 物理像素发丝线,修复 UIScreen.main 弃用警告

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 22:29:06 +08:00
parent 2220f4be52
commit 9893d5408a
3 changed files with 25 additions and 8 deletions
@@ -106,10 +106,7 @@ final class WordDetailViewController: UIViewController {
meaningLabel.font = .preferredFont(forTextStyle: .title2)
meaningLabel.numberOfLines = 0
let divider = UIView()
divider.backgroundColor = .separator
divider.translatesAutoresizingMaskIntoConstraints = false
divider.heightAnchor.constraint(equalToConstant: 1.0 / UIScreen.main.scale).isActive = true
let divider = HairlineView()
let exampleTitle = makeCaption("例句")
let exampleLabel = UILabel()