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

How could you pass value to popUp? #57

Closed
MaeseppTarvo opened this issue Nov 5, 2016 · 5 comments
Closed

How could you pass value to popUp? #57

MaeseppTarvo opened this issue Nov 5, 2016 · 5 comments

Comments

@MaeseppTarvo
Copy link

Hey! I would like to know, how you are able to pass value to popUp vc if you are using customVC. Because if you do like this it doesn't work:

// Create a custom view controller
                    let ratingVC = RatingViewController(nibName: "RatingView", bundle: nil)
                    
                    // Create the dialog
                    let popup = PopupDialog(viewController: ratingVC, buttonAlignment: .horizontal, transitionStyle: .bounceDown, gestureDismissal: true)

ratingVC.selectedProduct = self.products[indexPath.row]
                    
                    
                    
                    // Present dialog
                    self.present(popup, animated: true, completion: nil)
@moonvader
Copy link

@MaeseppTarvo did you find the answer?

@mwfire
Copy link
Member

mwfire commented Feb 5, 2017

Hey there! Have a look at the example at #87. In this example, a reference to PopupDialog is passed to the custom view controller. Make sure to use a weak reference in order to avoid retain cycles.

@mwfire
Copy link
Member

mwfire commented Feb 5, 2017

Hey @moonvader. I am not sure if I understand correctly. Could you please file a new issue with a more detailed description? Thanks!

@moonvader
Copy link

@mwfire thank you - I already found what I needed

@MaeseppTarvo
Copy link
Author

MaeseppTarvo commented Feb 5, 2017

@mwfire I've learned alot since I posted this stupid "issue". I suggest you to learn delegates to do the think you want. This question("issue") is not related to this library at all.

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