Friday, September 17, 2010


I've been working on OttoJotts all night and now I'm starting to get a headache from something I'm trying to do. The plan I had was to change the color of the letters in the word a person guessed to show them which letters were correct (blue) and which were correct and in the correct position (green). The problem is that there doesn't appear to be an easy way to change the color of a single letter without making a single UILabel object (which I don't want to do) - it would separate the letter and make it look pretty funky.
There is a type called NSAttributedString and NSMutableAttributedString which seem to satisfy my needs, but what I need (apparently) isn't available on iOS 4. And while I can create these objects, I can't seem to modify them easily. Or even difficultly. The problem seems to lie in a constant called NSForegroundColorAttributeName (jeez, Apple) that's not declared anywhere but AppKit. Unfortunately, AppKit is not an iPhone/iOS framework - just Mac OS X. So while I can create these things, I can't seem to manipulate them and change colors like I want. *headdesk*
I've got the code working for the new game play for the difficulty levels - that came together surprisingly quickly. I still need to do a little work on serializing (saving/restoring) the data, but for now, within the bounds of a single instantiation of the game, it seems to be working beautifully. I've got a lot more testing on it to make sure it's solid, but so far it's looking good.
Now all I need is to get it to display properly. *headdesk*