Hi,
I've tried to find a solution for this problem for weeks now but it seems no one knows how to solve it and Apple doesn't seem to care.
I have a NavigationSplitView with two columns. In the detail column I have a button - or any other clickable control - which is placed in the very top where usually the safe area resides.
The button is NOT clickable when he is in the safe area and I have NO idea why. I know I can place buttons in safe areas of other views and they are clickable.
Please have a look at the code:
`struct NavTestView: View {
var body: some View {
GeometryReader { p in
VStack(spacing: 0) {
NavigationSplitView {
List(names) {
Text($0.name).frame(width: p.size.width)
.background(Color.green)
}.listRowSpacing(p.size.height * 0.15 / 100 )
.toolbar(.hidden, for: .navigationBar)
} detail: {
TestView().ignoresSafeArea()
}.frame(width: p.size.width, height: p.size.height, alignment: .topLeading)
.background(Color.yellow)
}
}
}
}
struct TestView: View {
var body: some View {
GeometryReader { p in
let plusButton = IconButton(imageName: "plus.circle.fill", color: Color(uiColor: ThemeColor.SeaFoam.color),
imageWidth: p.size.width * 5 / 100, buttonWidth: p.size.width * 5 / 100)
let regularAddButton = Button(action: { log.info("| Regular Add Button pressed") } ) {
plusButton
}
VStack {
regularAddButton
}.frame(width: p.size.width , height: p.size.height, alignment: .top)
.background(Color.yellow)
}
}
}
`
this code produces the following screen:
Any help would be really greatly appreciated!
Thank you!
Frank