let's say I want to show the following text to the user in Text
:
3 4*5, 6*7 8
The new SwiftUI behavior in iOS 15 will render this string in Markdown, making the center part italic.
CodePudding user response:
You can create the Text
using the verbatim
initializer:
Text(verbatim: “1*2 = 2*1”)
This is supported from iOS 13 and will bypass all conversions and localizations.
https://developer.apple.com/documentation/swiftui/text/init(verbatim:)