Open darronschall opened 1 year ago
Will it work with this Canvas ?
import SwiftUI
import shared
import RswiftResources
extension Text {
init(
resourceKey: KeyPath<MR.strings, ResourcesStringResource>,
bundle: KeyPath<MR.strings, ResourcesStringResource>
) {
self.init(
LocalizedStringKey(MR.strings()[keyPath: resourceKey].resourceId),
bundle: MR.strings()[keyPath: resourceKey].bundle
)
}
}
Text(resourceKey: \.menu_broadcast, bundle: \.menu_broadcast)
Hello!
I've been using moko-resources, and made some SwiftUI extensions that make integration easier. I added one of these to the README in #486, but have since added a few more.
These extensions make integration with SwiftUI easy, e.g.:
It might be nice to incorporate these into moko-resources for other projects using SwiftUI.