开发者

NSMutableString

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜