SwiftUI-ColorPicker-车轮尺寸

问题描述

我正在使用ColorPicker。车轮尺寸有问题。 我想要更大。 我正在使用Xcode 12.1。希望有人能帮助我。谢谢。

这些是我的代码:

struct SwiftUIView: View {
    @State private var bgColor = Color.blue
    var body: some View {
        ColorPicker("Set the background color",selection: $bgColor)
            .frame(maxWidth: .infinity,maxHeight: .infinity)
            .background(bgColor)
    }
}

enter image description here

解决方法

您可以使用scaleEffect缩放色轮。

enter image description here

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...