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

using structs as a data model, and having a problem deciding how to load a detailView from a tableView

Ok, I am trying to load a detail view from a tableView. No problem. I know how to do that.

I'm using structs as a data model for the rest of my app. This section of the app I am working on is a table view to display the users progress on different portions of the app.

In all my other views on the app I call "var currentQuiz = nameOfQuiz()" before the view did load to access all the data and values form the struct "nameOfQuiz()".

My problem is: What is the best way to call to the correct struct based on the tableView index