dimanche 14 novembre 2021

SwiftUI - App Store Rating Section, Design Clone

I'm trying to orient a section in my app on the App Store design and build it in the same way:

enter image description here

Does anyone of you know if the code snippet is available somewhere? I only found animation challenges from the App Store.

Anyways, I tried to copy it by my own but I do not understand how the rounded Number (4,7) is getting created. Is it a custom font or is there some sort of layer around a standard font? At the moment I'm stuck cloning this layout.

Here's what I tried:

struct AppStoreRatingSection: View {
    var body: some View {
        HStack{
            VStack{
                Text("Bewertungen")
                    .font(.title)
                    .fontWeight(.heavy)
                    .foregroundColor(.primary)
                Text("4,3")
                    .font(.title)
                    .fontWeight(.heavy)
                    .foregroundColor(.primary)
            }
            Spacer()
            VStack {
                Text("Chart here")
            }
        }
        .padding(.horizontal)
    }
}

Many Thanks!

Aucun commentaire:

Enregistrer un commentaire