0

I am looking for a simple way to get just the integer number for the current thread. For context I am using this as part of our global logging messages and don't need all the excessively verbose text that results from the just printing out the currentThread object.

Code:

NSLog(@"%@", [NSThread currentThread]);

Result:

<NSThread: 0x10a81e160>{name = (null), num = 1}

How do I easily just get the value of "num"?

Nate McIntyre
  • 63
  • 1
  • 7

1 Answers1

0

You can not get 'num' value directly, because it is a private variable. Another workaround is to parse description value.