Prepping info for a data grid in Swift
<p>I'm making an app that will eventually have a second view controller that displays a grid of information from results of previous days. I've already worked out the app to gather the information I need, which would look as follows:</p>

<pre><code>var s = 0
var d = 0
var h = 0.0
var m = 0.0
var date = NSDate()
</code></pre>

<p>So I'm wondering how I can run a function to prep these numbers to be used in a grid in a different view controller later on. There may be no other way to do it than to send it to an outside database, but I'd rather not do that. I think I'm going to want to use either a struct or a class maybe. Maybe I only need a dictionary? I don't know, but I'm going to want to save this information at the end of every day. I could write some psuedo code, but I'm not sure how to do this.</p>

<pre><code>func saveDailyResults() {
    ??? date = {
        s, d, h, m
    }

    allDates.append(){
        date
    }
}
</code></pre>

<p>I think what I'm looking for would be a way to make some thing like this: </p>

<pre><code>var allResultsFromAllDays = [(2016-08-08, 2, 302, 2.3, 4.5),(2016-08-07, 1, 247, 2.4, 4.7),(2016-08-06, 3, 345, 2.9, 6.5)]
</code></pre>

<p>...Which I could append every day when new results come in.</p>

<p>I'd like to be able to later on build something that looks like this from the information. <a href="https://i.stack.imgur.com/Gnxk9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gnxk9.png" alt="Like this but Row would be date and Column would be s, d, h, m"></a>
Thanks for any help you can give me! </p>