[ad_1]
After I’m designing in SwiftUI, my design goes contained in the protected space. Right here I am utilizing full top and full width. I desire a design the place my design does not overlap with protected areas. Somebody assist me to eliminate this. I’ve offered a pattern picture beneath with describes my points.
import SwiftUI
struct ColorSplash: View {
@State var pickedImage : UIImage = UIImage(systemName: "picture.on.rectangle.angled")!
var physique: some View {
VStack{
HStack{
Textual content("Shade Splash")
.font(.headline)
Spacer()
Picture(systemName: "arrow.triangle.2.circlepath.digital camera.fill")
}.padding()
Spacer()
ImageView(pickedImage: $pickedImage)
Spacer()
HStack(alignment: .middle, spacing: 30 ){
Textual content("Handbook")
Rectangle()
.fill(.grey)
.body(width: 2, top: getRect().top * 0.01, alignment: .middle)
Textual content("Computerized")
}.body(width: getRect().width, top: getRect().top * 0.025, alignment: .middle)
.background(.grey.opacity(0.3))
}
}
}
struct ColorSplash_Previews: PreviewProvider {
static var previews: some View {
ColorSplash()
}
}
[ad_2]

