Uses selector syntax.
This commit is contained in:
parent
6224dfad03
commit
2297d218c0
|
@ -55,9 +55,8 @@ class WebFeedInspectorViewController: UITableViewController {
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(webFeedIconDidBecomeAvailable(_:)), name: .WebFeedIconDidBecomeAvailable, object: nil)
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: .main, using: { _ in
|
NotificationCenter.default.addObserver(self, selector: #selector(updateNotificationSettings), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||||
self.updateNotificationSettings()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
|
@ -197,6 +196,7 @@ extension WebFeedInspectorViewController: UITextFieldDelegate {
|
||||||
|
|
||||||
extension WebFeedInspectorViewController {
|
extension WebFeedInspectorViewController {
|
||||||
|
|
||||||
|
@objc
|
||||||
func updateNotificationSettings() {
|
func updateNotificationSettings() {
|
||||||
UNUserNotificationCenter.current().getNotificationSettings { (settings) in
|
UNUserNotificationCenter.current().getNotificationSettings { (settings) in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
Loading…
Reference in New Issue