How to show the Logged Messages window in Xcode

前端 未结 5 2036
梦如初夏
梦如初夏 2020-12-30 03:23

I\'m a very new Cocoa user and running into all sorts of problems...

I\'m trying to get the content of an Array and found this code to do this.

<
5条回答
  •  灰色年华
    2020-12-30 04:10

    In the Xcode menu hit Run - Console. This is where NSLog / print / printf etc statements output.

    The key command is Command + Shift + R.

    The cocoa toString() method is called description as well.

    NSLog(@"array : %@",collection);
    

    Will execute

    NSLog(@"array : %@",[collection description]);
    

    Which will then call description on each of the collections elements.

提交回复
热议问题