I am trying to split a string into an array. This is the code that i’m using (also, I’m using ARC):
test = @"this$is$a$test";
myarray = [test componentSeparatedByString:@"$"];
test and myarray are synthesized properties.
I’m getting an error:
receiver type ‘nsstring’ for instance message does not declare a method with selector ‘componentseparatedbystring’
Can anyone help me with this matter?
thank you
It is
componentsnotcomponent. Make sure you refer to the documentation when you get warnings stating that a method does not exist.