Zstack button circle (2020)

Time:2021-5-11

This paper introduces the making process of round text button
Technology used

code

import SwiftUI

struct ContentView: View {
    var body: some View {
          Button(action: {
              }){
                  ZStack{
                      Circle()
                      .frame(width: 100, height: 100)
                      .foregroundColor(.blue)
                    Text("Press me")
                        .foregroundColor(.white)
                  }
              }
    }
}

effect

Zstack button circle (2020)

More swiftui tutorials and code focus columns

  • Please pay attention to my column icloudend, swiftui tutorial and source code