Advertisement
Guest User

SwiftUI Apple Music Profile

a guest
Sep 29th, 2024
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 1.99 KB | None | 0 0
  1. struct ContentView: View {
  2.     var body: some View {
  3.         ZStack {
  4.             // 1
  5.             Image("profile")
  6.                 .resizable()
  7.                 .aspectRatio(contentMode: .fill)
  8.                 .blur(radius: 32)
  9.                 .overlay(.regularMaterial)
  10.             
  11.             // 2
  12.             Image("profile")
  13.                 .resizable()
  14.                 .aspectRatio(contentMode: .fill)
  15.                 .blur(radius: 32)
  16.                 .mask { // 3
  17.                     VStack {
  18.                         Image("profile")
  19.                             .clipShape(Circle())
  20.                             .shadow(color: .black.opacity(0.15), radius: 3)
  21.                         
  22.                         Text("John Appleseed")
  23.                             .font(.title.bold())
  24.                         
  25.                         Text("@johnappl3s33d")
  26.                             .font(.callout)
  27.                     }
  28.                 }
  29.                 .overlay { // 4
  30.                     VStack {
  31.                         Image("profile")
  32.                             .clipShape(Circle())
  33.                             .shadow(color: .black.opacity(0.15), radius: 3)
  34.                         
  35.                         Text("John Appleseed")
  36.                             .font(.title.bold())
  37.                             .opacity(.zero) // 5
  38.                         
  39.                         Text("@johnappl3s33d")
  40.                             .font(.callout)
  41.                             .opacity(.zero)
  42.                     }
  43.                 }
  44.         }
  45.     }
  46. }
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement