The markdown feature of the Text element is a great feature!

You can just type your markdown string and SwiftUI will render the text formatted.

Let’s see different ways to use it.


You can use a string literal

Text("This will be bold")

Or you can pass the text from a variable

let markdownText = "This will be bold"

// […]



Now you can markdown text in your app. Happy coding!

I hope I helped you with you journey with SwiftUI and iOS development.

See you in the next guide!

What are you thoughts about this? Tweet me @franceleonidev and share your opinion.

Source link