6/4/15 – Adam Shaw

Today I made some great progress on the Scrolling Label, generally adding a lot of functionality and capabilities, as well as starting to look at the UI side of things. I added a lot of extensions to the UI family of objects, like UIView, UIFont, etc. which allow the implementation to be very clean (e.g. you now just have to say “self.view.addSubview(scrollingLabel)”, instead of having to pass “self” (a view controller), into the scrolling label as a parameter, because I added an extension to UIView.) I did a lot of work on scaling the text around the label in which it is placed, so it never goes over the size given, and is fully modular, so the user or we as the researches can easily change the size of the font, which at the moment is just given by a top-of-file declared variable, but could easily be controlled by a button. I added a LOT of top-of-file variable declarations, so that there are almost zero “magic variables” in the class. I spent a lot of time in the afternoon getting the WPM feature working. This was difficult, because my label implementation does not actually track words, just the distance the underlying UILabel has travelled. As a solution, I added a lot of extensions to the string class which allowed me to find number of words, index a word position with a string by an index pointing to a character within that index and more. I also created a new class, a stopwatch, which I implemented cleanly into my original design. The result is a nice system which displays an accurate WPM count, and can be further improved (tomorrow’s work) to show what words the user is slowing down the system for. One thing I am going to keep working on is fully implementing the timer within the class itself, because at the moment the timer has to be instantiated in the view controller, but I think I can find a work-around for that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s