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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -