Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Programmatically Present View Controller.

Hi, I want to programmatically present a view controller.

My app downloads some data from the internet, carries out some data handling and then loads the next view.

I've previously successfully used performSegueWithIdentifer however for some reason it is adding a huge delay into the app.

I've used presentViewController with no delay but I can't use this, it was just to test whether I was missing something obvious.

I have an NSLog when the last data handling method completes and one when the next view controller is loaded. Using 'presentViewController' the time between logs is 14ms. When using performSegueWithIdentifer is a staggering 8.5secs!

I literally commented out one line and tested with the other. No other code changes.

Has anyone else experienced this or know what might be going on?

Thanks.