iOS

ios——swiftUI常用修饰符

 .offset(y:-80)

//位移                                                                                                                                          

.font(.system(size: 100, weight: .light))

.font(.largeTitle)

//字体大小

.frame(width: 100, height: 100)

//控件大小

.background(Color.blue.opacity(0.4))

//背景

.background(.ultraThinMaterial)

//透明模糊背景

.overlay(Color.blue)

//前景

 .clipShape(RoundedRectangle(cornerRadius: 40, style: .circular))

//剪裁

.opacity(0.5)

//透明度

.rotation3DEffect(Angle(degrees: 20), axis:(x:0,y:-10,z: 0))

//3D变换

.matchedGeometryEffect(id: “menu1”, in: namespace)

//匹配几何

 .padding()

//填充

.edgesIgnoringSafeArea(.all)

//忽略安全区

 .scaleEffect(3)

//缩放

.disabled(disable)

//禁用

.animation(.spring( response: 0.1), value: show)

//动画

.resizable()

//图片适配大小

.foregroundColor(Color.white)

//前景色

留言

您的电子邮箱地址不会被公开。