In this video we are going to explore how we can stylize text for our Text views in SwiftUI.
We will start by looking at how we can create a `Text` view with the Markdown-formatted base language version of the string as the localization key,
We will also see how we can utilize string interpolation to combine and stylize our strings and present them in a text view.
And finally, we will take a quick look at the power of Attributed strings in SwiftUI.
If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch
Table of Contents:
0:00 Introduction
1:30 Styling with MarkDown
7:42 String Interpolation
12:25 AttributedStrings
Starter Project Files:
(If you are having problems downloading zip files, use Safari. Chrome restricts zip files by default)
https://www.createchsol.com/StarterPr...
Completed Project:
https://github.com/StewartLynch/TextV...
References mentioned in video:
Markdown rendering using Text in SwiftUI - SwiftLee
https://www.avanderlee.com/swiftui/ma...)
Swift: A Simple Way To Work With Attributed Strings | by Alexander Martirosov | Medium
/ swift-a-simple-way-to-work-with-attributed...
Text modifiers in SwiftUI
https://nilcoalescing.com/blog/TextMo...
Markdown Guide for Developers. Markdown is a powerful conversational… | by Cesar William Alvarenga | Better Programming
https://betterprogramming.pub/markdow...)
Attributed Strings with SwiftUI - The SwiftUI Lab
https://swiftui-lab.com/attributed-st...
Formatting interpolated strings in SwiftUI - a free SwiftUI by Example tutorial
https://www.hackingwithswift.com/quic...
How to add advanced text styling using AttributedString - a free SwiftUI by Example tutorial
https://www.hackingwithswift.com/quic...)
Other References:
Stewart Lynch's YouTube Channel:
/ @stewartlynch
Stewart Lynch on Mastodon:
https://iosdev.space/@StewartLynch
Stewart Lynch on Twitter:
/ stewartlynch
Stewart Lynch on LinkedIn
/ stewartlynch