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

Weird behaviour in ios 17 #18

Closed
Konstix08 opened this issue Jul 22, 2023 · 11 comments
Closed

Weird behaviour in ios 17 #18

Konstix08 opened this issue Jul 22, 2023 · 11 comments

Comments

@Konstix08
Copy link

I have the emoji picker implemented in an ios 17 app and the emojipicker behaves weird. Sometimes it wont show up, sometimes it is just empty, sometimes it is placed random anywhere on the screen.
I can provide images later. But when you try you can see it yourself.

@ygee07
Copy link

ygee07 commented Jul 24, 2023

Same, for me it dismisses the picker immediately upon clicking it without being able to choose an emoji

@izyumkin
Copy link
Owner

I don't have the ability to debug the library for iOS 17 yet. But I think in the near future to install the Xcode beta and check what's new there.

If possible, describe your problems in more detail, along with screenshots, I will be grateful. And if you have any ideas how to fix these problems, I will be glad to see your pull requests.

@ygee07
Copy link

ygee07 commented Jul 25, 2023

Hi @izyumkin,

It only happens for me when using it with a Binding on ForEach

import SwiftUI
import MCEmojiPicker

struct ContentView: View {
   @State var emojis = ["😀", "😁", "😇"]
    
    var body: some View {
        VStack {
            ForEach($emojis, id: \.self) { $emoji in
                EmojiPicker(selection: $emoji)
            }
        }
    }
}

struct EmojiPicker: View {
    @Binding var selection: String
    @State private var isPresented: Bool = false
    
    var body: some View {
        Button(selection) {
            isPresented.toggle()
        }
        .padding()
        .emojiPicker(
            isPresented: $isPresented,
            selectedEmoji: $selection
        )
    }
}

Then it behaves like this.
2023-07-25 20 29 56
The picker dismisses immediately without being able to select any other emoji

@Konstix08
Copy link
Author

i solved my problem bc i adapted my code a bit. But there are a bunch of warnings and i think they are from the framework:
image

@izyumkin
Copy link
Owner

izyumkin commented Jul 25, 2023

I will try to help you guys soon

Screenshot 2023-07-25 at 20 44 25

Which beta do you work on? Maybe there is a proven stable one?

@Konstix08
Copy link
Author

i am on beta 3. I think i update tomorrow

@ygee07
Copy link

ygee07 commented Jul 26, 2023

Still seems to be an issue on the latest betas
Xcode 15 Beta 5, iOS 17 Beta 4

@izyumkin
Copy link
Owner

Sorry guys, I have a lot of work on my main job right now. I will try to fix everything by the end of next week🙏

@izyumkin
Copy link
Owner

@ygee07 The bug you had was fixed by @jfpalacios

@izyumkin
Copy link
Owner

@Konstix08 please tell me you still have a lot of warnings? I tried to get a similar result, but it's not working yet

@ygee07
Copy link

ygee07 commented Sep 14, 2023

Thank you @izyumkin @jfpalacios

@izyumkin izyumkin closed this as completed Oct 2, 2023
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