Closed lingolab2 closed 4 years ago
Hi @lingolab2, sorry for the late response. I tried your code in a minimum viable example (shown below) and I didn't get any warning from xCode (with xCode v11.5):
import SwiftUI
import NavigationStack
struct Root: View {
var body: some View {
NavigationStackView {
ZStack {
Color.green.edgesIgnoringSafeArea(.all)
PushView(destination:ChildView()) {
VStack {
Image(systemName: "gear")
.resizable()
.scaledToFit()
.clipShape(Rectangle())
.shadow(color: .primary, radius: 5)
.padding([.horizontal, .top], 7)
Text("Settings").lineLimit(1)
}
.frame(minWidth: 50, maxWidth:100, alignment: .center)
}
}
}
}
}
struct ChildView: View {
var body: some View {
ZStack {
Color.yellow.edgesIgnoringSafeArea(.all)
PopView {
Text("<-")
}
}
}
}
struct Transition_Previews: PreviewProvider {
static var previews: some View {
Root()
}
}
You can copy paste my example and everything should be fine. Probably your issue doesn't strictly depend on the code you showed me. If you can show me more code (which still generates the problem) I'll try to help you. Thank you.
excellent, i’ll search in my code, sorry for the trouble. please close ticket.
On 2 Jul 2020, at 19:13, Matteo notifications@github.com wrote:
Hi @lingolab2 https://github.com/lingolab2, sorry for the late response. I tried your code in a minimum viable example (shown below) and I didn't get any warning from xCode (with xCode v11.5):
import SwiftUI import NavigationStack
struct Root: View { var body: some View { NavigationStackView { ZStack { Color.green.edgesIgnoringSafeArea(.all) PushView(destination:ChildView()) { VStack { Image(systemName: "gear") .resizable() .scaledToFit() .clipShape(Rectangle()) .shadow(color: .primary, radius: 5) .padding([.horizontal, .top], 7) Text("Settings").lineLimit(1) } .frame(minWidth: 50, maxWidth:100, alignment: .center) } } } } }
struct ChildView: View { var body: some View { ZStack { Color.yellow.edgesIgnoringSafeArea(.all) PopView { Text("<-") } } } }
struct Transition_Previews: PreviewProvider { static var previews: some View { Root() } } You can copy paste my example and everything should be fine. Probably your issue doesn't strictly depend on the code you showed me. If you can show me more code (which still generates the problem) I'll try to help you. Thank you.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/biobeats/swiftui-navigation-stack/issues/22#issuecomment-653013659, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBLCK5GKP2SS4YNVP5HYNTRZSFIFANCNFSM4OJGPKKA.
I get following warning when pushing or popping from NavigationStack