murze murze - 1 year ago 72
Objective-C Question

How to append a string to NSMutableString

i'm an absolute newbie with objective-c

with this code

NSMutableString *teststring;
[teststring appendString:@"hey"];

nothing gets displayed in the console.

Surely i'm doing something wrong here... :-)

Answer Source

Change first line to

NSMutableString *teststring = [NSMutableString string];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download