I keep getting an error with this code, the app is telling me I am trying to mutate an object which is not mutable. Can someone take a look and explain what I am 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 could used appendString: instead of your first appendFormat:and your insertString:atIndex:
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论