-
Notifications
You must be signed in to change notification settings - Fork 750
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
RetainCycle when select case "case viewController(_: UIViewController)" #359
Comments
If you say |
Yes, when vc will be destroyed, need to destroy view(Alert), this process should be automatically. Alert don't should keep vc. |
I'll think about it. in the meantime, you can call |
Assuming I make this a weak reference, SwiftMessages still needs to update it's internal bookkeeping in order to present the next message in the queue via some kind of auto-dismiss based on the VC being deallocated. How would you propose that SwiftMessages detects when your view controller is deallocated? |
Try this, but this code will be work only with vc.
Or
But you will need to cast to your type class use "as?". |
The question was how would you propose detecting when the view controller is deallocated (not how to make a weak reference)? As I said, SwiftMessages needs to update its internal bookkeeping when the VC is deallocated in order to show the next message. |
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
SwiftMessage presenter still retains the view controller, see SwiftKickMobile/SwiftMessages#359.
Select "case viewController(_: UIViewController)", and set duration == .forever. When dismiss or pop vc, we get retain cycle.
The text was updated successfully, but these errors were encountered: