@@ -87,18 +87,10 @@ final class WordDetailViewController: UIViewController {
|
|||||||
wordLabel.font = Theme.Font.wordHero()
|
wordLabel.font = Theme.Font.wordHero()
|
||||||
wordLabel.textAlignment = .center
|
wordLabel.textAlignment = .center
|
||||||
|
|
||||||
let phoneticIcon = UIImageView(image: UIImage(
|
|
||||||
systemName: "speaker.wave.2",
|
|
||||||
withConfiguration: UIImage.SymbolConfiguration(pointSize: 13, weight: .medium)))
|
|
||||||
phoneticIcon.tintColor = .secondaryLabel
|
|
||||||
let phoneticLabel = UILabel()
|
let phoneticLabel = UILabel()
|
||||||
phoneticLabel.text = word.phonetic
|
phoneticLabel.text = word.phonetic
|
||||||
phoneticLabel.font = .preferredFont(forTextStyle: .title3)
|
phoneticLabel.font = .preferredFont(forTextStyle: .title3)
|
||||||
phoneticLabel.textColor = .secondaryLabel
|
phoneticLabel.textColor = .secondaryLabel
|
||||||
let phoneticRow = UIStackView(arrangedSubviews: [phoneticIcon, phoneticLabel])
|
|
||||||
phoneticRow.axis = .horizontal
|
|
||||||
phoneticRow.alignment = .center
|
|
||||||
phoneticRow.spacing = 6
|
|
||||||
|
|
||||||
var buttonConfig = UIButton.Configuration.filled()
|
var buttonConfig = UIButton.Configuration.filled()
|
||||||
buttonConfig.baseBackgroundColor = Theme.Color.accent
|
buttonConfig.baseBackgroundColor = Theme.Color.accent
|
||||||
@@ -115,7 +107,7 @@ final class WordDetailViewController: UIViewController {
|
|||||||
speakButton.heightAnchor.constraint(equalToConstant: 56)
|
speakButton.heightAnchor.constraint(equalToConstant: 56)
|
||||||
])
|
])
|
||||||
|
|
||||||
let stack = UIStackView(arrangedSubviews: [wordLabel, phoneticRow, speakButton])
|
let stack = UIStackView(arrangedSubviews: [wordLabel, phoneticLabel, speakButton])
|
||||||
stack.axis = .vertical
|
stack.axis = .vertical
|
||||||
stack.spacing = 16
|
stack.spacing = 16
|
||||||
stack.alignment = .center
|
stack.alignment = .center
|
||||||
|
|||||||
Reference in New Issue
Block a user