I wrote a function that returns an object. But this is a function that takes data from the web.So NSthread is used to call the function.
NSThread* pageThread = [[NSThread alloc]initWithTarget:self selector:@selector(threadFunction) object:nil];
How to get return value from function called via NSthread?
The "return value" should not be returned by the method, but it should update the iVar class and notify the one who was waiting for the object to be ready (by notifying that I do not necessarily mean NSNotificationCenter). Good luck.
Source: https://habr.com/ru/post/913235/More articles:TVirtualStringTree: data changed between OnMeasureItem event and OnGetText event - delphiR: find the closest index - vectorizationHow do Java "pointers" work? - javaBlurry text in WPF with ClearTypeHinting enabled? - c #Disable list skipping on Samsung Galaxy Tab 2.3.3 android - androidParsing without line breaks - c #Getting the type of GPU connection in Windows XP? - c ++Extract numbers from String - stringHow to set environment variables in makefile recipe? - makefilesetProgressDrawable fills the whole seekBar - androidAll Articles