6/15/15 – Adam Shaw

Because there was not more work to do related directly to the study, I spent the day going back through my entire code base for the app to clean things here and there and overall make it more concise. I started out with the scrolling label class, and first I worked on cleaning up the initialization calls. This also entailed me adding a better control mechanism over the text, fontsize, fontname, and font variables of the label, because I added did/will Set functionality to all of them, as well as using the nil coalescing operator to instantiate them without a prior creation of the baseTextView. This broke the app several times, but I always got it working again in better condition than before. At 2 we met with Prof. Dave and Eli, his student researched this summer and talked for an hour and 45 minutes about topics ranging from our research this summer to tenure tracks, to professor carpools. When I got back to work I again adjusted the label code, but I found a strange bug. The size to fit of the sample text would work correctly, but any subsequent size to fit call would wrap onto a different line if the text was longer than the sample text. In essence, the size to fit operator would only adjust height, not width. I think this has actually been a problem I never realized throughout, because previously my sample text was quite long. I think the best solution to this is to make the text view into a label, which is actually a little better optimized in any case, and will allow me to set a maximum number of lines without forcing truncation. I will work on that and cleaning up the rest of the code tomorrow.

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