开发者

NSMutableString

开发者 https://www.devze.com 2023-04-03 10:57 出处:网络
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

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:@"*"];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消