iPhone: How to determine if thread is main thread?

IphoneObjective C

Iphone Problem Overview


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?

Iphone Solutions


Solution 1 - Iphone

Like this: [NSThread isMainThread]

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHenleyView Question on Stackoverflow
Solution 1 - IphoneNoah WitherspoonView Answer on Stackoverflow