Add chevron (#690)

spoiler: for selecting a language and registration-status
This commit is contained in:
Nathan Mattes 2022-12-20 18:41:04 +01:00
parent 5e4820739f
commit 6b0547d3d4
1 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,11 @@ class PickServerCategoryView: UIView {
return label
}()
//TODO: @zeitschlag add chevron
let chevron: UIImageView = {
let chevron = UIImageView(image: UIImage(systemName: "chevron.down"))
chevron.translatesAutoresizingMaskIntoConstraints = false
return chevron
}()
init() {
super.init(frame: .zero)
@ -34,11 +38,14 @@ class PickServerCategoryView: UIView {
}
private func _init() {
let container = UIStackView()
container.axis = .horizontal
container.spacing = 4
container.distribution = .fillProportionally
container.addArrangedSubview(titleLabel)
container.addArrangedSubview(chevron)
container.translatesAutoresizingMaskIntoConstraints = false
addSubview(container)
let constraints = [
@ -50,7 +57,6 @@ class PickServerCategoryView: UIView {
NSLayoutConstraint.activate(constraints)
container.addArrangedSubview(titleLabel)
layer.borderColor = UIColor.black.cgColor
layer.borderWidth = 1.0