id type to NSString

"id type" just tells us the return value is an object — nothing beyond that. It could already be an NSString object, or it could be something else. If all the objects in this array are strings, your work is done. If they're something else, you need some way to get that something else into a string.


An id could be a pointer any object, and it will get promoted to any object pointer type automatically (sort of like void * in C). The code you show there looks correct. There's no need for an explicit cast, though you could add one if you really want to.

If the object you're getting out of the array is not, in fact, an NSString, you will have to do some other work to get the object you want.


yep, just cast it

NSString *value = (NSString *)[appDelegate.bird_arr objectAtIndex:rowClicked];

If you want to double check that it really is an NSString use

[someId isKindOfClass:[NSString class]]