In your first line, you are trying to assign NSString * (@ "I hate ...") to NSMutableString * (teststring).
Your source code should give you a compilation warning:
incompatible types Objective-Initialization 'struct NSString *', expected 'structure NSMutableString *'
The following will allow your sample code to compile and work correctly:
NSMutableString *teststring=[NSMutableString stringWithString:@"I hate programming my iPhone"];
source share