2024-12-24
RoundedRectangle(cornerRadius: 25)
.fill(
LinearGradient(gradient: Gradient(colors: [Color.teal, Color.blue]), startPoint: .topLeading, endPoint: .trailing)
}
改变大小的三种方法:.font(.largeTitle), .font(.system(size:100)), .resizable().scaledToFit().frame()
//MARK: - 大小
// .font(.largeTitle)
// .font(.system(size: 100))
.resizable()
// .aspectRatio(contentMode: .fit)
.scaledToFit()
.frame(width: 300, height: 300)
//MARK: - 颜色
.foregroundStyle(.green)
}
.symbolRenderingMode(.multicolor)