Quote:
Originally Posted by losingSkillz
1:is there anyway to set the colour of the font of a button programmatically using [UIColour colourWithRed:redValue green:greenValue blue:blueValue];?
i know you can do this with a label but does it work for buttons too?
|
UIButton setTitleColor:forState:
Quote:
2:for the NSMutableDictionary, is it possible to have more than one object for one key? for example can you use something like this?:
Code:
[dictLabelFont setObject:[NSString stringWithFormat:@"%d", intRedColour] forKey:@"red"];
[dictLabelFont setObject:[NSString stringWithFormat:@"%d", intGreenColour] forKey:@"green"];
[dictLabelFont setObject:[NSString stringWithFormat:@"%d", intGreenColour] forKey:@"blue"];
actually for the second question i meant to say can you can store more than one object/key in a NSMutalbeDictionary right?
thanks for all of your help :-)
|
yes, you can store any number of objects/keys in a NSMutableDictionary.
btw, if you want to store float values in a dictionary, you might consider using NSNumber numberWithFloat: instead of converting to/from strings all the time.