编辑代码

var myString = "Hello world!     -  swift.jsrun.net"
print(myString)
NavigationView {
    VStack {
        ZStack {
            Rectangle()
                .fill(Color.secondary)

            // 显示图片
        }
        .onTapGesture {
            // 选择图片
        }

        HStack {
            Text("强度")
            Slider(value: self.$filterIntensity)
        }.padding(.vertical)

        HStack {
            Button("切换滤镜") {
                // 切换滤镜
            }

            Spacer()

            Button("保存") {
                // 保存图片
            }
        }
    }
    .padding([.horizontal, .bottom])
    .navigationBarTitle("Instafilter")
}
if image != nil {
    image?
        .resizable()
        .scaledToFit()
} else {
    Text("Tap to select a picture")
        .foregroundColor(.white)
        .font(.headline)
}