Objective-C: NSMutableString error -


i keep getting error code, app telling me trying mutate object not mutable. can take , explain doing wrong? thanks.

thisrow = [nsstring stringwithformat:@"%i", startpointx2]; nsmutablestring* setcoordstr = [[nsmutablestring alloc] init]; [setcoordstr appendformat: thisrow];  if(w==1) {     thiscol =  [nsstring stringwithformat:@"%i", endpointy];     [setcoordstr insertstring:thiscol atindex:[setcoordstr length]];  } else {     for(startpointy; startpointy<endpointy+1; startpointy++) {         thiscol =  [nsstring stringwithformat:@"%i", startpointy];         [setcoordstr insertstring:thiscol atindex:[setcoordstr length]];     }  }  nslog(@"%@ ", setcoordstr); 

you used appendstring: instead of first appendformat:and insertstring:atindex:


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -