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

Refactor Text Edit menu context actions #1361

Merged
merged 1 commit into from
May 23, 2024

Conversation

ASalavei
Copy link
Collaborator

Use UIEditMenuInteraction for iOS 16+ for context menus in text fields.
Fix crash when using UIMenuController for iOS 12.

Solution

Move all Edit Menu code to Objc lib to:

  • hide UIEditMenuInteraction from KMM to prevent crash on launch
  • keep simple and convenient interface for Edit Menu

Fix crash when using UIMenuController for iOS 12.
@ASalavei ASalavei changed the title Refactor Text Exit menu context actions Refactor Text Edit menu context actions May 18, 2024
Copy link
Member

@MatkovIvan MatkovIvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more crashes on my iPad mini 2 (iOS 12) 🎉

@mazunin-v-jb mazunin-v-jb merged commit c50c1dd into jb-main May 23, 2024
5 of 6 checks passed
@mazunin-v-jb mazunin-v-jb deleted the andrei.salavei/edit-menu-controller branch May 23, 2024 13:02
MatkovIvan pushed a commit that referenced this pull request May 29, 2024
Use UIEditMenuInteraction for iOS 16+ for context menus in text fields.
Fix crash when using UIMenuController for iOS 12.

## Solution
Move all Edit Menu code to Objc lib to:
- hide `UIEditMenuInteraction` from KMM to prevent crash on launch
- keep simple and convenient interface for Edit Menu
@LouisCAD
Copy link

LouisCAD commented Jun 4, 2024

Is there no equivalent to @available that can be used in Kotlin code?

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