Advertisement
IbrahimHassan

AttributedStringSwiftUI3

Jun 30th, 2021
1,228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.29 KB | None | 0 0
  1. struct ContentView: View {
  2.     var body: some View {
  3.         Text(makeAttributedString())
  4.     }
  5.    
  6.     func makeAttributedString() -> AttributedString {
  7.         var string = AttributedString("Some Attributed String")
  8.         string.foregroundColor = .blue
  9.         return string
  10.     }
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement