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
1 changed files with 5 additions and 0 deletions

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([