nsthread
MBProgressHUD blocking user interaction
In order to achieve a non-modal behavior, simply disable the user interaction on the MBProgressHUD so that the touches will fall through it. Objective-C theHUD.userInteractionEnabled = NO; Swift 4.x theHUD.isUserInteractionEnabled = false
Difference in scheduling NSTimer in main thread and background thread?
NSTimer requires an active run loop, when initialized in Main Thread it automatically uses the main run loop. If you need to make a background timer you need attach it to the thread’s run loop and invoke run() to make it active. NSTimer needs one live NSRunLoop to execute it’s events. In main thread, the … Read more
Objective-C find caller of method
StackI hope that this helps: NSString *sourceString = [[NSThread callStackSymbols] objectAtIndex:1]; // Example: 1 UIKit 0x00540c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163 NSCharacterSet *separatorSet = [NSCharacterSet characterSetWithCharactersInString:@” -[]+?.,”]; NSMutableArray *array = [NSMutableArray arrayWithArray:[sourceString componentsSeparatedByCharactersInSet:separatorSet]]; [array removeObject:@””]; NSLog(@”Stack = %@”, [array objectAtIndex:0]); NSLog(@”Framework = %@”, [array objectAtIndex:1]); NSLog(@”Memory address = %@”, [array objectAtIndex:2]); NSLog(@”Class caller = %@”, [array … Read more
How to check current thread in Swift 3?
Looks like it’s simply Thread.isMainThread in Swift 3.