开发者

NSlog() to NSString

I want to take an NSLog() message and save it as a NSString.

For example, the following prints something l开发者_开发百科ike "Player coordinates (0,0)"

NSLog(@"Player cordinates(%i, %i)", xcord, ycord);

I want to save it's output (aka "Player coordinates (0,0)") into an NSString.


It can be done like that:

NSString *yourString = [NSString stringWithFormat:@"Player cordinates(%i, %i)", xcord, ycord];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜