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
I have a UITabBarController in which contains multiple NotificationCenter listeners. For every listener, I use Presentr as a bottom half modal to notify the user an event occur or a new message is received. I import Presentr from the GitHub repo directly (I figured out that the code of v1.3.2 on Cocoapod has some difference with the latest Github version).
It works fine if I use Presentr with the predefined .bottomHalf config. But when I tried with custom settings like below, it will always trigger a warning message: Attempt to present * on *whose view is not in the window hierarchy", and sometimes it caused the app crashed.
let presenter: Presentr = {
let width = ModalSize.fluid(percentage: 0.96)
let height = ModalSize.fluid(percentage: 0.46)
let center = ModalCenterPosition.bottomCenter
let customType = PresentationType.custom(width: width, height: height, center: center)
let customPresenter = Presentr(presentationType: customType)
customPresenter.transitionType = .coverVertical
customPresenter.dismissTransitionType = .coverVertical
customPresenter.dismissAnimated = true
customPresenter.roundCorners = true
customPresenter.cornerRadius = 16
// customPresenter.backgroundColor = .green
// customPresenter.backgroundOpacity = 0.5
customPresenter.dismissOnSwipe = true
customPresenter.dismissOnSwipeDirection = .top
return customPresenter
}()
Do you have any suggestion? I didn't figure out the reason caused this error. Thank you so much!
The text was updated successfully, but these errors were encountered:
Thanks for your attention.
I have a UITabBarController in which contains multiple NotificationCenter listeners. For every listener, I use Presentr as a bottom half modal to notify the user an event occur or a new message is received. I import Presentr from the GitHub repo directly (I figured out that the code of v1.3.2 on Cocoapod has some difference with the latest Github version).
It works fine if I use Presentr with the predefined .bottomHalf config. But when I tried with custom settings like below, it will always trigger a warning message: Attempt to present * on *whose view is not in the window hierarchy", and sometimes it caused the app crashed.
Do you have any suggestion? I didn't figure out the reason caused this error. Thank you so much!
The text was updated successfully, but these errors were encountered: