62

How to determine if the current thread inside a method is a main thread, or just a thread that is asynchronous and created? Does the ID tell me?

Henley
  • 19,640
  • 29
  • 114
  • 195

1 Answers1

152

Like this: [NSThread isMainThread]

omz
  • 52,865
  • 5
  • 126
  • 139
Noah Witherspoon
  • 56,657
  • 16
  • 129
  • 131