1/25/2024 0 Comments Magic mouse utilities 2.16 crackI also tried to add a source to this specific run loop, but i dont see a way to connect between the source and the specific notification. I want to know why i do not get the handler called if Im running () on the thread which runs the createObserver function ? why i must run the run loop from the main thread? I have tried almost everything. Im only getting the handler(the print), when Im switching the dispatch_main() into CFRunLoopRun() on the main thread, but i do not know if i can do it and what it can cause? In my project, Im using dispatch_main() in the main function of the project(who is in c++,Xcode). This method(createObserver() runs from a background thread). This is just an example how Im using this code in my project Var observer = (įorName: NSWorkspace.didActivateApplicationNotification, Im trying to detect events of focus change(when the active window changed) in swift, by adding observer like this:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |