Have a look at the NSThread
API documentation.
There are methods like
- (BOOL)isMainThread
+ (BOOL)isMainThread
and + (NSThread *)mainThread
More Related Contents:
- Having trouble adding objects to NSMutableArray in Objective C
- Managing multiple asynchronous NSURLConnection connections
- NSString: isEqual vs. isEqualToString
- Dispatch queues: How to tell if they’re running and how to stop them
- NSTimeZone: what is the difference between localTimeZone and systemTimeZone?
- What does Apple mean when they say that a NSManagedObjectContext is owned by the thread or queue that created it?
- Getting date from [NSDate date] off by a few hours
- Understanding reference counting with Cocoa and Objective-C
- Xcode build failure “Undefined symbols for architecture x86_64”
- NULL vs nil in Objective-C
- How to use performSelector:withObject:afterDelay: with primitive types in Cocoa?
- Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
- Converting RGB data into a bitmap in Objective-C++ Cocoa
- When to use enumerateObjectsUsingBlock vs. for
- Generate a random alphanumeric string in Cocoa
- Avoiding “NSArray was mutated while being enumerated”
- Convert milliseconds to NSDate
- With ARC, what’s better: alloc or autorelease initializers?
- Compiler error “expected method not found” when using subscript on NSArray
- How to simplify callback logic with a Block?
- Get the type of a file in Cocoa
- Is there a way to specify argument position/index in NSString stringWithFormat?
- How to get global screen coordinates of currently selected text via Accessibility APIs.
- Reverse NSString text
- strong / weak / retain / unsafe_unretained / assign
- How to Implement iOS8 Interactive Notification
- Front most window using CGWindowListCopyWindowInfo
- What is the best way to unit test Objective-C code?
- Creating breakpoint in Xcode for unrecognized selector
- How to get the width of an NSString?