I would like to find a way to format a NSString like this:
Name: John
Location: Unknown
Type: Unknown
Status:
NSString *titleColumn = [[NSString stringWithFormat:@"%@:", title] stringByPaddingToLength:20 withString:@" " startingAtIndex:0];
serializedValue = [serializedValue stringByAppendingFormat:@"%@%@", titleColumn, value];
Btw, it would be more efficient to use an NSMutableString
for serializedValue
.