Friday, July 26, 2013

iOS - To print if the code is running on main thread or not.

NSLog(@"Code is%@ running on Main Thread", ([NSThread isMainThread] ? @"" : @" NOT"));