Why does my view always pop up from the bottom right of the screen?
First I have a RoomCommonAlertView.
struct RoomCommonAlertView: View { @Binding var closeView:Bool var body: some View { VStack(spacing: 30){
Text("title").foregroundColor(RGB(51, 51, 51)).font(Font.system(size: 16,weight: .semibold)).multilineTextAlignment(.center).padding(.leading,10).padding(.trailing,10).padding(.top,15)
HStack(spacing: 17){
Text("sure").foregroundColor(RGB(179, 179, 179)).font(Font.system(size: 14,weight: .medium)).frame(width: 84,height: 30).background(RGB(255, 255, 255))
Text("cancel").foregroundColor(RGB(255, 255, 255)).font(Font.system(size: 14,weight: .medium)).frame(width: 84,height: 30).background(RGB(143, 103, 255))
}.padding(.bottom,12)
}.frame(width: 295).frame(minHeight: 135).background(Color.white).cornerRadius(14)
}
}
And use it
.popup(isPresented: $isPop) { RoomCommonAlertView(closeView: $isPop) } customize: { $0 .closeOnTap(false) .closeOnTapOutside(true) .backgroundColor(.black.opacity(0.5)) }
But it will pop up from the bottom right of the screen, how can I make it pop up from the bottom center every time? Here is the link to my demo video: https://www.youtube.com/shorts/ufa2qFP9RLk
Forgot to mention, my ExytePopupView version is 2.6.0
I seem to have found the problem. I have two views, viewA and viewB, both of which pop up. In the closing event of viewA, set the binding property of viewB to true. At this time, viewB will pop up from the bottom right. If Add a 0.3 second delay, wait until viewA closes the animation, then pop up viewB and everything will be normal. How to solve this problem? If you add a 0.3 second delay to each nest, it will be a bit troublesome.
Hey @X0217 , please provide full minimal compilable example. Please make sure it compiles and the issue reproduces on this minimal example. Have a nice day
It's been a while, so I'll close this one for now. Please feel free to reopen if you are still having the issue. Please be sure to attach minimal compilable reproducible example. Have a nice day!