Skip to content

Unwind from a presented view controller results in a blank 'black screen' #9

@senabhishek

Description

@senabhishek

This is the code in my AppDelegate:

    let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let middle = storyboard.instantiateViewController(withIdentifier: "DashboardStoryboardVC")
    let top = storyboard.instantiateViewController(withIdentifier: "CashoutStoryboardVC")
    let bottom = storyboard.instantiateViewController(withIdentifier: "AnalyticsStoryboardVC")
    let snapContainer = SnapContainerViewController.containerViewWith(nil,
                                                                      middleVC: middle,
                                                                      rightVC: nil,
                                                                      topVC: top,
                                                                      bottomVC: bottom)
    self.window?.rootViewController = snapContainer
    self.window?.makeKeyAndVisible()

I have modified your SnapContainerViewController to make the left and right as optional and top and bottom as mandatory view controllers. Now when I present a view controller via a segue from the middle view controller, after dismissing it through either an unwind segue or even a dismiss(), I get back a black blank screen.

I checked the rootViewController and see that it is still set to the snapContainer viewController as shown in the code above. Can you tell me what I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions