The following two methods are in one of my controllers. the buttonPressed method is connected to a button and works properly.
However, I get an error when I add the call to workWithAString. Wondering what I’m missing here and would appreciate your advice.
-(NSString *) workWithAString: (NSString *) string1
{
NSString *string2 = [[NSString alloc] initWithString:string1];
// Here I will do some other things with string2
return string2;
}
-(IBAction)button1Pressed
{
NSString *modifiedString1 = [[NSString alloc] initWithString:InputValue.text];
modifiedString1 = [[self workWithAString: modifiedString1 ]; // Expected identifier error here
}
You have two brackets for some reason …