Print array in objective-c?

前端 未结 1 867
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 02:51

I need to check my values from NSArray which are stored dynamically. How should I print the array values in Objective-C?

1条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 03:24

    NSLog(@"%@",yourArray);
    

    This actually calls the description method of your NSArray and prints it to the log. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/description

    0 讨论(0)
提交回复
热议问题