isaced / ISEmojiView

Emoji Keyboard for iOS
MIT License
522 stars 119 forks source link

Add documentation for SwiftUI #78

Closed DeveloLongScript closed 5 months ago

DeveloLongScript commented 5 months ago

I was making a chat app, and wanted a inline emoji picker, and found this one. My project was in SwiftUI, not UIKit. I look in the README, to find absolutely nothing about how to add it using SwiftUI. But it was just dangling in my face the possiblity, with the checkmark "SwiftUI support."

I finally look in the source code to find a reference, but has UIKit in the source, meaning multiplatform apps (macOS + iOS), can't import the project because of how UIKit doesn't exist in macOS.

I find #67, and a request to give examples, but none at all, but still "SwiftUI support." as a checkbox. I don't understand why you would check this if the code for this doesn't make sense, and there is no documentation about this feature.

I just don't want people thinking that this project has SwiftUI, to continue to find nothing at all about how this project works. (like how I did)

Thanks!

DeveloLongScript commented 5 months ago

Maybe add something like "partial SwiftUI support" as a checkbox, or nothing at all as a checkbox, but the fact that SwiftUI is even a point of this project shouldn't be here as nobody really knows how SwiftUI in this project actually works.

isaced commented 5 months ago

EmojiView itself supports rendering within SwiftUI, using EmojiView_SwiftUI().

Additionally, this project is specifically tailored for the iOS platform and does not provide support for macOS or any other platforms, as stated in the README.

image
isaced commented 5 months ago

However, I believe there could be a simpler approach integrated with SwiftUI's TextEditor/TextField, perhaps by referring to the example provided by https://github.com/paescebu/CustomKeyboardKit/tree/master/Sources/CustomKeyboardKit/ViewExtensions#L26.

Maybe we can add a ViewModifier to achieve a similar effect, like this:

TextEditor(text: $text)
    .emojiKeyboardView()
DeveloLongScript commented 5 months ago

Thank you for responding, I can understand that this project isn’t directly supported with macOS, but I don’t think people wanting a approach even on iOS needs to go looking deep into issues to find something that was already advertised on the README.

Your approach with Textfield looks interesting, and I could probably help. Really, I’m just requesting documentation, and it to be put in the README so people, that are looking for a solution get one and not a issue like this one to find the real documentation for a feature advertised

Edit: I think I should have been more specific with what I wanted in this issue

Thanks!

DeveloLongScript commented 5 months ago

Merge #79.