Fix Preferences button not appearing

This commit is contained in:
Shadowfacts 2020-07-03 17:07:57 -04:00
parent 1d815d6cd6
commit b2c7735256
1 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,6 @@
// //
import UIKit import UIKit
import SwiftUI
class MyProfileTableViewController: ProfileTableViewController { 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) { required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented") 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() { @objc func preferencesPressed() {
present(PreferencesNavigationController(mastodonController: mastodonController), animated: true) present(PreferencesNavigationController(mastodonController: mastodonController), animated: true)
} }