01, 02, 03, 04, 05..
001, 002, 003, 004, 005..
0001, 0002, 0003, 0004, 0005..
You get the pattern? Good!
int num = 1; [NSString stringWithFormat:@"%02d", num];
001, 002, 003, 004, 005..
[NSString stringWithFormat:@"%03d", num];
0001, 0002, 0003, 0004, 0005..
[NSString stringWithFormat:@"%04d", num];
You get the pattern? Good!