From b2c7735256570b58cb9f533e45cb24258cc3681e Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 3 Jul 2020 17:07:57 -0400 Subject: [PATCH] Fix Preferences button not appearing --- .../Screens/Profile/MyProfileTableViewController.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Tusker/Screens/Profile/MyProfileTableViewController.swift b/Tusker/Screens/Profile/MyProfileTableViewController.swift index 4776b0ab..f5ee6779 100644 --- a/Tusker/Screens/Profile/MyProfileTableViewController.swift +++ b/Tusker/Screens/Profile/MyProfileTableViewController.swift @@ -7,7 +7,6 @@ // import UIKit -import SwiftUI class MyProfileTableViewController: ProfileTableViewController { @@ -32,14 +31,18 @@ class MyProfileTableViewController: ProfileTableViewController { } }) } - - navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Preferences", style: .plain, target: self, action: #selector(preferencesPressed)) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } + override func viewDidLoad() { + super.viewDidLoad() + + navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Preferences", style: .plain, target: self, action: #selector(preferencesPressed)) + } + @objc func preferencesPressed() { present(PreferencesNavigationController(mastodonController: mastodonController), animated: true) }