共计 260 个字符,预计需要花费 1 分钟才能阅读完成。
SwiftUI 使用 Image 当中 ZStack 背景 容器设置大小, 但是图片尺寸太大, 影响到上下的点击区域问题.
代码如下
Button{
}label: {Text("aaa")
}
ZStack {AImageView(mainob.bgPlay.song?.cover, "customized")
.scaledToFill()
.frame(width: width , height: height)
.clipped()}.frame(width: width , height: height)
Button{
}label: {Text("aaa")
}
正文完