Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable IQKeyboardManager inside swiftui #2032

Open
seniorAyman opened this issue Mar 24, 2024 · 2 comments
Open

disable IQKeyboardManager inside swiftui #2032

seniorAyman opened this issue Mar 24, 2024 · 2 comments

Comments

@seniorAyman
Copy link

Describe the bug
I want to disable IQKeyboardManager inside swiftui view

To Reproduce
Steps to reproduce the behavior:

  1. I write IQKeyboardManager.shared.enable = false in onAppear
  2. i get a compiler error "Main actor-isolated class property 'shared' can not be mutated from a non-isolated context"

Versions

Xcode: 15.1
Mac OS: 14.2
Simulator/Device: 15 pro max
Simulator/Device Name: iPhone 14 Pro Max
Library Version: 7.0.2

Additional context
Add any other context about the problem here.

@tapan-torinit
Copy link

Hey any update on it? I just install IQKeyboard swift library and getting the same error in UIKit. The same things worked in IQKeyboard obj-c library

@hackiftekhar
Copy link
Owner

Write it inside the task instead of onAppear may fix the issue I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants