You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep the current BottomPopup. When PushView().push(with: .verticalSlide) is called on the pop-up view page, the pop-up view is in front of PushView, blocking PushView.
I checked to make sure that this issue has not already been filed
Expected Behavior
Keep the current BottomPopup. When the pop-up view page PushView().push(with: .verticalSlide), the pop-up view should be behind PushView
Current Behavior
Keep the current BottomPopup. When the page of the pop-up view is PushView().push(with: .verticalSlide), the pop-up view should be in front of PushView, blocking PushView.
The two libraries don't know about each other so the popup will remain in front until it's dismissed. I added this extension to NavigatableView to push and remove all current popups
public extension NavigatableView {
// Pushes a new view. Stacks previous one
@discardableResult func pushClean(with animation: TransitionAnimation) -> some NavigatableView {
Task {
await PopupStack.dismissAllPopups()
}
return push(with: animation)
}
}
Then just call .pushClean(with: animation) instead of .push(with: animation)
Keep the current BottomPopup. When PushView().push(with: .verticalSlide) is called on the pop-up view page, the pop-up view is in front of PushView, blocking PushView.
Prerequisites
Expected Behavior
Keep the current BottomPopup. When the pop-up view page PushView().push(with: .verticalSlide), the pop-up view should be behind PushView
Current Behavior
Keep the current BottomPopup. When the page of the pop-up view is PushView().push(with: .verticalSlide), the pop-up view should be in front of PushView, blocking PushView.
Code Sample
import SwiftUI
import MijickPopups
import MijickNavigationView
struct Bottom_Stack1Popup: BottomPopup ,NavigatableView {
var body: some View {
VStack(spacing: 0) {
createBrandingContent()
createActionButton()
createDismissButton()
}.frame(height: 300)
.padding(.horizontal, 28)
.padding(.bottom, 8)
.padding(.top, 40)
}
func configurePopup(config: BottomPopupConfig) -> BottomPopupConfig {
config.cornerRadius(40)
.heightMode(.auto)
}
}
private extension Bottom_Stack1Popup {
func createBrandingContent() -> some View {
BrandingContent()
.padding(.bottom, 40)
}
func createActionButton() -> some View {
PrimaryButton("Push next", action: onActionButtonTap)
.padding(.bottom, 10)
}
func createDismissButton() -> some View {
PrimaryButton("Dismiss", action: onDismissButtonTap)
.changeAppearance(to: .accentedAlternative)
}
}
private extension Bottom_Stack1Popup {
func onActionButtonTap() {
PushView().push(with: .verticalSlide)
}
}
import SwiftUI
import MijickPopups
import MijickNavigationView
struct PushView: NavigatableView, BottomPopup {
var body: some View {
VStack {
Divider()
Text("Push View")
.font(.largeTitle)
.foregroundColor(.white)
Text("Hello, World!")
Spacer()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.red)
}
}
Screenshots
The text was updated successfully, but these errors were encountered: