Questions tagged offset

Explore the latest questions and answers asked by our top developers.

Keyboard offset no longer functions in SwiftUI 2

So I have an ObservableObject that sets a published variable ‘currentHeight’ to the height of the keyboard: import Foundation import SwiftUI class KeyboardResponder: ObservableObject { @Published var currentHeight: CGFloat = 0 var _center: NotificationCenter init(center: NotificationCenter = .default) { _center = center _center.addObserver(self, selector: #selector(keyBoardWillShow(notification:)), name: UIResponder.keyboardWillShowNotification, object: nil) _center.addObserver(self, selector: #selector(keyBoardWillHide(notification:)), name: UIResponder.keyboardWillHideNotification, object: […]

By nickcoding
Categorised as keyboard, offset, swift, swiftui, xcode Tagged , , , ,

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us