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

Crash on cell Getting #15

Open
veersr9 opened this issue Aug 24, 2020 · 4 comments
Open

Crash on cell Getting #15

veersr9 opened this issue Aug 24, 2020 · 4 comments

Comments

@veersr9
Copy link

veersr9 commented Aug 24, 2020

   `private func showType2(indexPath: IndexPath, bottomDismiss: Bool = false) {
    let storyboard = UIStoryboard(name: "Main", bundle: nil)
    let viewController = storyboard.instantiateViewController(withIdentifier: "type2") as! Type2ViewController
    
    // Get tapped cell location
    let cell = tableview.cellForRow(at: indexPath) as? CardCollectionViewCell
    cell!.settings.cardContainerInsets = UIEdgeInsets(top: 8.0, left: 16.0, bottom: 8.0, right: 16.0)
    cell!.settings.isEnabledBottomClose = bottomDismiss
    
    transition = CardTransition(cell: cell!, settings: cell!.settings)
    viewController.settings = cell!.settings
    viewController.transitioningDelegate = transition
    
    // If `modalPresentationStyle` is not `.fullScreen`, this should be set to true to make status bar depends on presented vc.
    //viewController.modalPresentationCapturesStatusBarAppearance = true
    viewController.modalPresentationStyle = .custom
    
    presentExpansion(viewController, cell: cell!, animated: true)
}`

"Fatal error: Unexpectedly found nil while unwrapping an Optional value: file- cell is getting nil"

@League2EB
Copy link

Has this problem been solved?

@League2EB
Copy link

@chelemen-razvan
@SpectralDragon
Please help !

@SpectralDragon
Copy link
Contributor

Not enough information to solve your problem. Seem like you don't implement CardCollectionViewCell for your cells.

@League2EB
Copy link

League2EB commented Oct 1, 2020

like
@SpectralDragon
I added the following code to my controller to run,it's ok

extension AViewController: CardsViewController {

}

but , please the issues ... i don't understand how to fix it

this is my BViewConrollerCode and Video

extension BViewController: CardDetailViewController {

    var cardContentView: UIView {
        return collectionView
    }

    var scrollView: UIScrollView? {
        return collectionView
    }

}

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

3 participants