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
Post a Comment