ios - How to remove conflicting return type? -
i dividing string , and storing in splitarray
, want return it.
but getting conflicting array
on first line
- (nsarray *)subdividingstring:(nsstring *)string { nsarray *splitarray = [string componentsseparatedbystring:@" "]; return splitarray; }
first: there nothing wrong code, having issue (e.g. call subdividingstring:
).
second: shouldn't introduce method doing 1 doing already. use
nsstring *mystring = @"some string"; nsarray *chunks = [mystring componentsseparatedbystring:@" "];
Comments
Post a Comment