-
Notifications
You must be signed in to change notification settings - Fork 65
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
I can't use self.presentingViewController to find the parent view controller #64
Comments
presentingViewController is not the parent! if you use:
No crash because self.presentingViewController cannot be found. You have to write:
This is not relative to Swift at all! |
@frank61003 to retrieve the data back from the controller you have two options.
I personally recommend the delegation pattern as it is more typed, but that is up to you. Implementation steps:
|
@iDevelopper
Here is the introduction about the presentingViewController I think the problem is in vc2.modalPresentationStyle = UIModalPresentationStyle.custom. After I changing my code to vc2.modalPresentationStyle = UIModalPresentationStyle.overCurrentContext. Below code can work well.
|
Hi
I use the AZTabBarController to controller my tab bar. When I present a new view, It works well. I got an issue to bring the data back to the parent viewController. I use self.presentingViewController to get my parent view controller. but it crash at all. Below are my code in the childViewController.
Error message:
It seems that swift get confused about the presentingViewController. How to solve this question? Thank you.
The text was updated successfully, but these errors were encountered: