当手机字体调大,APP字体与系统字体联动
struct ContentView: View {
@ScaledMetric var size:CGFloat = 40
var body: some View {
VStack{
Image(systemName: "message")
.resizable()
.frame(width: size, height: size, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
Text("CY")
.font(.system(size: size))
}
}
}
-
当修改系统字体尺寸时,即可在app中实现联动
网友评论