守则:
VStack(alignment: .trailing) {
Image("Useful")
.resizable()
.ignoresSafeArea()
.scaledToFill()
.frame(width: 105, height: 105)
.padding(.trailing, -60.0)
}问题是,图像不在旁边,在图像和小部件附近有一个很小的缺口,如照片中所示。

如何使这一小差距消失:)
发布于 2020-09-29 13:39:42
如果我正确地理解了你的担忧,这里有可能的解决方案

var body: some View {
Color.clear.overlay(
Image("plant")
.resizable()
.scaledToFill()
.frame(width: 105, height: 105)
, alignment: .bottomTrailing)
}https://stackoverflow.com/questions/64119196
复制相似问题