Published Jan 2, 2023Updated Mar 18, 2023
Contribute to Docs

The .italic() view modifier method in SwiftUI can be used to make text within a view appear in italic style.


Text("This text will be italic")


var body: some View {
Text("I hope this appears as italic.")

This will display:

SwiftUI ViewModifier Italic

All contributors

Looking to contribute?

Learn SwiftUI on Codecademy