forked from zelo72/mastodon-ios
chore: use instance method to observe highlighted property
This commit is contained in:
parent
384fe6018e
commit
a0aa8b9194
|
@ -227,7 +227,8 @@ extension MastodonRegisterViewController {
|
||||||
setupOnboardingAppearance()
|
setupOnboardingAppearance()
|
||||||
defer { setupNavigationBarBackgroundView() }
|
defer { setupNavigationBarBackgroundView() }
|
||||||
|
|
||||||
NSObject.KeyValueObservingPublisher<UIButton, Bool>(object: photoButton, keyPath: \.isHighlighted, options: NSKeyValueObservingOptions.new)
|
|
||||||
|
photoButton.publisher(for: \.isHighlighted, options: .new)
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.sink { [weak self] isHighlighted in
|
.sink { [weak self] isHighlighted in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|
Loading…
Reference in New Issue