Numbers are positional parameters. The parameters that follow the format string are placed in the string depending on their position in the parameter list. The first parameter goes to slot% 1, the second goes to slot% 2, etc. The goal is to deal with languages ββwhere the order of terms / words / etc can change from your default. You cannot change the order of the parameters at runtime, but you can make sure that the parameters are in the right place on the line.
Example
NSLog(@"% 1$@ , % 2$@ ", @"Red", @"Blue"); NSLog(@"% 2$@ , % 1$@ ", @"Red", @"Blue");
Output
Red, Blue Blue, Red
Note that the format string has changed, but the options are in the same order.
source share