Return array value as NSString
How can you return an array value (witch is a number) as a string?
Current code:
return [numbers objectAtIndex:row];
Have also tried:
return @"%@", [numbers objectAtIndex:row];
开发者_如何学PythonWith no luck..
Thanks :) PS: Yes, I am stupid. (:
return [[numbers objectAtIndex:row] description];
In C / ObjC / C++ / Javascript / D / many other C-based languages, the comma operator does not create an array / tuple.
(a,b,c,d,e)
is similar to
e
(while evaluating a
and b
and c
and d
as a side-effect).
精彩评论