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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -