Today was quite successful as well! I spent the better part of the morning working on implementing multiple text samples one after another. This actually proved to be more difficult than I had thought it would be, essentially because my scrolling labels are not UIObjects in and of themselves, but instead are basically containers for both a uitextview, and a uiscrollview. This means when I wanted to reset the components of a scrollLabel, I have to do recreate it, but also remove it from the superview and subsequently readd it. This process gave me a valuable opportunity to remake some of my code for the MainViewController so that it would be more separated into readable chunks, which hopefully will be good for future adaptations of the code.
Besides implementing reading from a text file, and random text samples, the other major milestone I got done today was packaging all the data we want neatly into a single dictionary. I quite like the type of the dictionary, it is a Dictionary<String,(Double,Dictionary<Suple,Double>)>. Yeah, you read that correctly, it is a dictionary, which has keys of type String, which then maps to values of type Tuple, which contain a Double, and dictionaries with generic key Suple (my invented “super-Tuple”), and value Double. To put this in perspective, the dictionary has a key which maps indicates which text sample it came from, and then the value is a combination of the total time elapsed for the reading, and then a dictionary which contains all the gyroscopic data which I implemented yesterday.
I ended the day by implementing a working email system, but it is rather clunky (it requires the user to actually press send, and the email has a non-anonymous user), so tomorrow I will try to set up an Alamofire https request so we can easily send the dictionary data in JSON form, thus making data retrieval easy. I have a few other questions about the app, but will ask those tomorrow.