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

John Randak
John Randak
2,552 Points

migrating view controllers to a new storyboard

Hi!

So, I'm building an app that probably has 100 or so views now and this is causing the interface to slow down (a lot!). Clicking between 2 storyboards takes about 10 seconds or so right now. I've read on stackOverflow that one way to avoid this is to create multiple story boards. How can I take 30 or 40 view controllers from my current (main) storyboard and transfer them to a new storyboard so that connections will still work? Please and thank you!

John

3 Answers

Stefan Jansen
Stefan Jansen
8,974 Points

100 storyboards? oO

don't you mean views?

John Randak
John Randak
2,552 Points

haha, yes! 100 views!

Stefan Jansen
Stefan Jansen
8,974 Points

I think you need to review your current strategy. It seems that you should reuse views where possible, of course it depends on the type of application you are building.

John Randak
John Randak
2,552 Points

I think you're probably right. I'm new to XCODE and wasn't entirely sure how to change a textView field using an object from an array. Each view controller needs to be able to scroll, but they all have vastly different word counts. Some have 100 words, some have 1,000.

Stefan Jansen
Stefan Jansen
8,974 Points

That is definitely the wrong way to go. I think you can do with just 1 view controller! :)

You can make your view controller in such a way that the size of the array doesn't matter. As long as the objects in there are all of the same type.