iphone - How to make the 'int' to 'string' with special format? -
int score=8; scorelabel.text=[nsstring stringwithformat:@"%5d",score];
i want make scorelabe show text '00008',but when line code executing,the result '8',can 1 tell me how make it?
try:
[nsstring stringwithformat:@"%05d", score]
Comments
Post a Comment