Hex in a stringWithFormat BAD ACCESS

后端 未结 2 1685
渐次进展
渐次进展 2021-01-27 15:04

Here is a part of my code:

I have a string which is formed by a stringWithFormat like this:

NSString * DestChoice = [NSString stringWithFormat:@\"%@\", D         


        
2条回答
  •  感动是毒
    2021-01-27 16:10

    The only problem I am seeing with your code is

    NSString * DestChoice = [NSString stringWithFormat:stringWithFormat:@"%@", Dest1String];
    

    Instead, you could use

    NSString * DestChoice = [NSString stringWithString:@"%@", Dest1String];
    

    Other than that, there is no problem. I am getting correct result.

提交回复
热议问题