Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c Nslog文本数据?_Objective C - Fatal编程技术网

Objective c Nslog文本数据?

Objective c Nslog文本数据?,objective-c,Objective C,如何将NSlogs中的数据放入以下内容: [tweetSheet setInitialText:@"I just scored xx 'touches'"]; NSlog NSLog(@"Game over score: %i",counter); 产出 2012-01-06 04:27:00.296 [317:707] Game over score: **31** 31我想在第一行代码中的xx上使用NSString的-stringWithFormat:方法: [tweetSheet s

如何将NSlogs中的数据放入以下内容:

[tweetSheet setInitialText:@"I just scored xx 'touches'"];
NSlog

NSLog(@"Game over score: %i",counter);
产出

2012-01-06 04:27:00.296 [317:707] Game over score: **31**

31我想在第一行代码中的xx上使用
NSString
-stringWithFormat:
方法:

[tweetSheet setInitialText:[NSString stringWithFormat:@"I just scored %d 'touches'", counter]];

使用
NSString
-stringWithFormat:
方法:

[tweetSheet setInitialText:[NSString stringWithFormat:@"I just scored %d 'touches'", counter]];