Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Keep the current BottomPopup, push the pop-up view page to NavigatableView, and block the PushView #171

Open
2 tasks done
Bob-GGB opened this issue Jan 15, 2025 · 0 comments

Comments

@Bob-GGB
Copy link

Bob-GGB commented Jan 15, 2025

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

  • I checked the documentation and found no answer
  • 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.

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

image

Name Version
SDK v4.0.0
Xcode 16.2
Operating System iOS 18.2
Device iPhone 16 Pro
@Bob-GGB Bob-GGB changed the title [BUG] [BUG] Keep the current BottomPopup, push the pop-up view page to NavigatableView, and block the PushView Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant