1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-25 08:21:40 +01:00

fix: segmented control width issue in notification scene

This commit is contained in:
CMK 2021-06-22 17:52:14 +08:00
parent 7b66471819
commit c656fe956b

View File

@ -48,8 +48,13 @@ extension NotificationViewController {
super.viewDidLoad()
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
segmentControl.translatesAutoresizingMaskIntoConstraints = false
navigationItem.titleView = segmentControl
NSLayoutConstraint.activate([
segmentControl.widthAnchor.constraint(equalToConstant: 287)
])
segmentControl.addTarget(self, action: #selector(NotificationViewController.segmentedControlValueChanged(_:)), for: .valueChanged)
tableView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(tableView)
NSLayoutConstraint.activate([