ios - Xcode Loop into Array -


for loop error; want repeat [demophoto] line can me please

sample file: https://www.dropbox.com/s/177kvpp72pfh8ul/mytest.zip?dl=0

allphoto = [nsmutablearray array]; [allphoto addobject:@"http://www.ed.ac.uk/polopoly_fs/1.129149!/filemanager/mohamad-hanif-awang-senik_2ndlrg.jpg"]; [allphoto addobject:@"http://thehandmadephotograph.com/wp-content/uploads/2014/08/smithsonian-photo-contest-winner-2012-crop.jpg__800x600_q85_crop.jpg"]; [allphoto addobject:@"https://cdn.tutsplus.com/photo/uploads/legacy/352_greatphototuts/greatphototuts-68.jpg"];      [self setphotos:@[      for(int i=0; < [allphoto count]; i++){         [demophoto photowithproperties: @{@"imagefile": @"1.jpg" }],     }   ]]; 

i guess want:

nsmutablearray *temparray = [nsmutablearray new]; for(int i=0; < [allphoto count]; i++){     [temparray addobject:[demophoto photowithproperties: @{@"imagefile": @"1.jpg" }]]; } [self setphotos:temparray]; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -