6/26/15 – Adam Shaw

Well, after testing tons of configurations of code today, commenting out this line, setting that object to nil, rewriting that function etc. etc., I think I know how to fix the black bars bug; rewrite the whole thing. My reasons for this: no amount of switching, flipping, refactoring or commenting changed the behavior. BUT, turning the iPad off and then on again increased the number of cycles until failure to 5, instead of 4. This means the problem is NOT in the code, but something is just… happening? Anyway, I then ran two tests. I had a feeling the problem might be rooted in UITransitionViews, private undocumented subclasses of the UIView, which Apple uses as backend for all segue transitions. I thought this because my program was creating a view, but they would not disappear upon segue, which, though it had no impact on memory or cpu, may have some consequence somewhere that I couldn’t see. I made a new program to test this theory, just a simple view cycling program, and in that the transition views disappeared after use. But then I found a way to make them disappear in my code, and the problem persisted… So that test was helpful, but unconclusive. I then made a new program and copied the central part of the problem/my code into it, that being the options view controller transitioning to a main view controller containing a scrolling label, and the problem WAS NOT PRESENT. That means that the core functionality of my code does not cause the bug, if indeed it is my code that causes the problem. Therefore, I am going to rewrite all of my code into a new project, refactoring and making things pretty along the way, and see if that fixes it. To be fair, the black bars bug is fairly inconsequential, because we will end up using a much smaller font, so the cycle limit will be around 25 or so, but at this point I just want to fix it. At that point I can convert to swift 2.0. Thats my goal for the immediate future.

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