How to declare good old C-Array in Objective-C inline? -
this piece of code:
nsuinteger indexarr[] = {1,2,3,4}; nsindexset *indexset = [nsindexpath indexpathwithindexes:indexarr length:4];
is there way declare indexarr inline, like
nsindexset *indexset = [nsindexpath indexpathwithindexes:{1,2,3,4} length:4];
or something? it's because i'm writing test reference paths , want save lines of code not usefull anybody...
best regards, hijolen
the problem attempt need cast compiler knows right type.
nsindexset *indexset = [nsindexpath indexpathwithindexes:(nsuinteger[]){1,2,3,4} length:4];
Comments
Post a Comment