Closed
Description
I've tried a few different things... (like using Buttons instead of views) but I still haven't figured-out a reliable way to a push a viewcontroller from a FlexLout. I've figured out a workaround for PRESENTING another viewcontroller as a popup... But pushing using a navigation controller seems impossible:
https://stackoverflow.com/questions/78500667/swift-push-viewcontroller-from-flexlayout-view
You have to do something insane like this to present a popup:
func topMostController() -> UIViewController {
var topController: UIViewController = UIApplication.shared.keyWindow!.rootViewController!
while (topController.presentedViewController != nil) {
topController = topController.presentedViewController!
}
return topController
}
@objc func didTapButton() {
let topvc = topMostController()
topvc.present(vc, animated: true, completion: nil)
}
...but neither love nor money will push a viewcontroller.
Metadata
Metadata
Assignees
Labels
No labels