According to the documentation on Objective-C string format specifiers, they comply with the IEEE printf specification, which allows you to specify field alignment and length.
This lets you use something like the following to get the results you want:
NSString *rightAligned = @"foo";
NSString *leftAligned = @"1";
NSLog(@"| %15@ | %-15@ |", rightAligned, leftAligned);
// prints "| foo | 1 |"
EDIT:
Per rmaddy's comments, if you're using [NSString stringWithFormat:]
you may have to convert your NSStrings to C-strings to get this to work:
NSString *result = [NSString stringWithFormat:@"| %15s | %-15s |",
[rightAligned cStringUsingEncoding:NSUTF8StringEncoding],
[leftAligned cStringUsingEncoding:NSUTF8StringEncoding]];
NSLog(@"%@", result);