I have a string array as such:
NSArray *names;
names = [NSArray arrayWithObjects:
@"FirstList",
@"SecondList",
@"ThirdList",
nil];
I'm trying to assign an element of this string array to a string variable as such:
NSString *fileName = names[0]; // "Incompatible types in initialization"
or with casting
NSString *fileName = (NSString)names[0]; // "Conversion to non-scalar type requested"
I'm trying to do this, so I can use the string in a method that takes a string as an argument, such as:
NSString *plistPath = [bundle pathForResource:filetName ofType:@"plist"];
Is there no way to assign an element of a string array to a string variable?