ergunemr / BottomPopup

BottomPopup provides a popup-like presentation style to any view controller
MIT License
881 stars 90 forks source link

Bottom popup loading issue #15

Open arishanapalli opened 5 years ago

arishanapalli commented 5 years ago

I have integrated bottom popup into one of my application. Which do have tableview on selected and row i am trying to pop up exampleViewController. its loading first time quickly as per given inputs, on second time its takes time. On double click on tableviewcell its loading quickly. Did not understand what went wrong.

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

        print("Selected Index",indexPath.row)
        guard let popupVC = storyboard?.instantiateViewController(withIdentifier: "StatusDetailViewController") as? StatusDetailViewController else { return }
        popupVC.height = 600
        popupVC.topCornerRadius = 30
        popupVC.presentDuration = 0.3
        popupVC.dismissDuration = 0.3
        popupVC.shouldDismissInteractivelty = true
        popupVC.popupDelegate = self
        present(popupVC, animated: true, completion: nil)

    }

StatusDetailViewController is same as ExamplePopupViewController.

zealoussys commented 3 years ago

@arishanapalli ,

Present your popupvc into dispatchqueue like,

DispatchQueue.main.async { self.present(popupVC, animated: true, completion: nil) }