I'm trying to make a atm machine for a game on iPhone.
I have the custom atm buttons setup, button can't figure out ho开发者_StackOverflow中文版w to add a star in a label each time a button is pressed. So four presses leaves****
(four stars) in the label. I prefer not to
use the secure option in a textfield, as it shows pressed
number shortly.
I know i have to use a NSMutableString and UILabel.
Can someone point me in the right direction?I think this should work.
-(IBAction) buttonPressed
{
yourLabel.text = [yourLabel.text stringByAppendingString:@"*"];
}
精彩评论