From c656fe956b6efe9ed2e4eba1174d2532919a58b1 Mon Sep 17 00:00:00 2001 From: CMK Date: Tue, 22 Jun 2021 17:52:14 +0800 Subject: [PATCH] fix: segmented control width issue in notification scene --- Mastodon/Scene/Notification/NotificationViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Mastodon/Scene/Notification/NotificationViewController.swift b/Mastodon/Scene/Notification/NotificationViewController.swift index 47fee4d66..eb319548b 100644 --- a/Mastodon/Scene/Notification/NotificationViewController.swift +++ b/Mastodon/Scene/Notification/NotificationViewController.swift @@ -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([