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

ViewDidLoad is calld after transition. #13

Open
TheAppleWizz opened this issue Feb 14, 2013 · 4 comments
Open

ViewDidLoad is calld after transition. #13

TheAppleWizz opened this issue Feb 14, 2013 · 4 comments

Comments

@TheAppleWizz
Copy link

Hi, Thank you so much for your code but i have a little problem. The view loads its data after it shows up as a design point it doesn't look good. For example do you notice when you push or percent a view with apples transitions it waits a few seconds and then loads the view.

Thanks again,
TheAppleWizz

@mpospese
Copy link
Owner

Could you be more specific about which methods you're using?
When using presentViewController:foldStyle:completion: or presentViewController:flipStyle:completion:, viewDidLoad is called before the transition begins - that's easy to confirm.

@marcburkhardt
Copy link

Hi, I also have the same problem. I want to present a modal view controller with a fold transition. The modal view controller is loaded from a storyboard and contains a UITableView. The table view gets populated after the transition finished, and the styles for the navigation bar and buttons using UIAppearance are applied after the transition as well.
I put a few NSLog's in the code to see when certain methods like viewDidLoad get called, and you're right, they're all called before the transition ends.

What's the crux of the matter? Thanks in advance.

@marcburkhardt
Copy link

Well, I could find a workaround for the problem, but I'm still not very happy with it.
I put the following lines just before the -perform method:

[presentingController presentViewController:viewControllerToPresent animated:NO completion:nil];
[presentingController dismissViewControllerAnimated:NO completion:nil];

@TheAppleWizz
Copy link
Author

When I have the chance I'll try it.

Thanks

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