diff --git a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift index da6f570d..d95a0357 100644 --- a/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift +++ b/Mastodon/Scene/Onboarding/Register/MastodonRegisterViewController.swift @@ -227,7 +227,8 @@ extension MastodonRegisterViewController { setupOnboardingAppearance() defer { setupNavigationBarBackgroundView() } - NSObject.KeyValueObservingPublisher(object: photoButton, keyPath: \.isHighlighted, options: NSKeyValueObservingOptions.new) + + photoButton.publisher(for: \.isHighlighted, options: .new) .receive(on: DispatchQueue.main) .sink { [weak self] isHighlighted in guard let self = self else { return }