I need to push to other view controller when I get error from API call. All SwiftUI examples push are using navigation view and navigation link. I can't seem to make it work to push without action button.
Post
Replies
Boosts
Views
Activity
Currently using Attributed String in Foundation we could have several text stylings in a long string by using something like this:
attributedSentence.setAttributes(redTextAttributes, range: NSRange(location: 0, length: 3))
How do we achieve this in SwiftUI?
Yes we can concat string like this
Text("Hi there").foregroundColor(.red) + Text("how are you"?).foregroundColor(.blue)
But this static approach is not possible if we apply localisation in our app. Each language have different grammar which leads to different word structure.
How could we have a consistent "Hi there" in red color regardless of it's language?