swift 照片将圆角矩形修改为矩形 | 您所在的位置:网站首页 › html设置input圆角矩形 › swift 照片将圆角矩形修改为矩形 |
下面的代码: import Foundation import SwiftUI struct SignInButtonStyle: ButtonStyle{ func makeBody(configuration: Configuration) -> some View { ZStack{ RoundedRectangle(cornerRadius: 20) .fill(Color(red: 27/255, green: 57/255, blue: 255/255)) .frame(width: 315, height: 72) HStack{ Spacer() VStack{ ZStack(alignment: .topTrailing){ Image("Ellipse 4") Image("Ellipse 5") } Spacer() } } VStack{ HStack{ Text("Sign in") .font(.custom("Manrope", size: 20)) .foregroundColor(.white) Spacer() Image(systemName:"arrow.forward") .font(.custom("Manrope", size: 20)) .foregroundColor(.white) } .padding(.horizontal, 20) } configuration.label } .frame(width: 315, height: 72) .opacity(configuration.isPressed ? 0.7 : 1) } } extension ButtonStyle where Self == SignInButtonStyle{ static var signIn: SignInButtonStyle{.init()} }按钮如下所示: 右角不再圆了,我不确定如何修复这个问题。我试着用面膜,但不确定如何正确处理。这是正确的按钮: |
CopyRight 2018-2019 实验室设备网 版权所有 |