05-07-2009, 07:29 AM
|
#5 (permalink)
|
|
New Member
Join Date: May 2009
Posts: 3
|
Quote:
Originally Posted by _pi
Sure. It's important to keep in mind, that NSLog simply takes 1 NSString object, so you either need to concatenate multiple strings together using the method "stringByAppendingString" or you can create one yourself using [NSString stringWithFormat] which allows to use placeholders (such as %d, %f, %@, and so on)
Code:
NSString *s = [NSString stringWithString:@"this is the content of the string"];
NSLog([[NSString stringWithString:@"the string contains: "] stringByAppendingString:s]);
NSLog([NSString stringWithFormat:@"the string contains: %@", s]);
Hope this helps.
|
Thats great thank you.
|
|
|