Saturday, September 17, 2011

Quick hit - load start, end quiz number from pref storage

Ok, this is going to have to be a quick one because I'm just getting started late. Let's do something simple and easy. Where were we last time? Oh, I have a good idea. In the settings screen, let's set up the default start and end quiz numbers to pull from prefs.

How about this:


// Initialize start, end numbers

if (startNumInt == 0){
startNumInt = 1;
}

NSString* startNumString = [NSString stringWithFormat:@"%d", startNumInt];


[startNum setText:startNumString];

if (endNumInt == 0){
endNumInt = 10;
}

NSString* endNumString = [NSString stringWithFormat:@"%d", endNumInt];


[endNum setText:endNumString];

No comments:

Post a Comment